You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
|`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.
Copy file name to clipboardExpand all lines: lib/models.js
+27Lines changed: 27 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -57,8 +57,35 @@ async function listModels() {
57
57
returnresponse.json();
58
58
}
59
59
60
+
/**
61
+
* Create a new model
62
+
*
63
+
* @param {string} model_owner - 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.
64
+
* @param {string} model_name - Required. The name of the model. This must be unique among all models owned by the user or organization.
65
+
* @param {object} options
66
+
* @param {("public"|"private")} options.visibility - 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.
67
+
* @param {string} options.hardware - Required. The SKU for the hardware used to run the model. Possible values can be found by calling `Replicate.hardware.list()`.
68
+
* @param {string} options.description - A description of the model.
69
+
* @param {string} options.github_url - A URL for the model's source code on GitHub.
70
+
* @param {string} options.paper_url - A URL for the model's paper.
71
+
* @param {string} options.license_url - A URL for the model's license.
72
+
* @param {string} options.cover_image_url - A URL for the model's cover image. This should be an image file.
73
+
* @returns {Promise<object>} Resolves with the model version data
0 commit comments