Skip to content

Commit e473ac4

Browse files
committed
Update README
1 parent 00a5963 commit e473ac4

File tree

1 file changed

+37
-0
lines changed

1 file changed

+37
-0
lines changed

README.md

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -236,6 +236,43 @@ const response = await replicate.models.list();
236236
}
237237
```
238238

239+
### `replicate.models.create`
240+
241+
Create a new public or private model.
242+
243+
```js
244+
const response = await replicate.models.create(model_owner, model_name, options);
245+
```
246+
247+
| name | type | description |
248+
| ------------------------- | ------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
249+
| `model_owner` | string | **Required**. The name of the user or organization that will own the model. This must be the same as the user or organization that is making the API request. In other words, the API token used in the request must belong to this user or organization. |
250+
| `model_name` | string | **Required**. The name of the model. This must be unique among all models owned by the user or organization. |
251+
| `options.visibility` | string | **Required**. Whether the model should be public or private. A public model can be viewed and run by anyone, whereas a private model can be viewed and run only by the user or organization members that own the model. |
252+
| `options.hardware` | string | **Required**. The SKU for the hardware used to run the model. Possible values can be found by calling [`replicate.hardware.list()](#replicatehardwarelist)`. |
253+
| `options.description` | string | A description of the model. |
254+
| `options.github_url` | string | A URL for the model's source code on GitHub. |
255+
| `options.paper_url` | string | A URL for the model's paper. |
256+
| `options.license_url` | string | A URL for the model's license. |
257+
| `options.cover_image_url` | string | A URL for the model's cover image. This should be an image file. |
258+
259+
### `replicate.hardware.list`
260+
261+
List available hardware for running models on Replicate.
262+
263+
```js
264+
const response = await replicate.hardware.list()
265+
```
266+
267+
```jsonc
268+
[
269+
{"name": "CPU", "sku": "cpu" },
270+
{"name": "Nvidia T4 GPU", "sku": "gpu-t4" },
271+
{"name": "Nvidia A40 GPU", "sku": "gpu-a40-small" },
272+
{"name": "Nvidia A40 (Large) GPU", "sku": "gpu-a40-large" },
273+
]
274+
```
275+
239276
### `replicate.models.versions.list`
240277

241278
Get a list of all published versions of a model, including input and output schemas for each version.

0 commit comments

Comments
 (0)