Replicate

App · AI Models · 31 actions

Run any of the thousands of AI models on Replicate (image, video, audio, speech and language) and collect their output. Also covers the account behind them: models and versions, deployments, fine-tuning runs it is watching, uploaded files and collections.

Actions

ActionWhat it does
Cancel a predictionStop a run that is still going, so it stops costing anything.
Create a deploymentCreate a deployment: a named endpoint that always runs one model version on hardware you choose.
Create a modelCreate a new model on Replicate.
Delete a fileDelete an uploaded file.
Delete a modelDelete a model you own.
Get a collectionOpen one curated collection and get every model in it, each with the input schema its predictions take.
Get a deploymentLook up one deployment: the model version it serves, the hardware it runs on and how far it may scale.
Get a fileLook up one uploaded file: its size, checksum, metadata and when Replicate will delete it.
Get a modelLook up one model, including the input schema its predictions take and the version it currently resolves to.
Get a model versionLook up one version of a model and the exact input and output schemas it declares.
Get a model's READMERead a model's README: the prose on its page, in Markdown.
Get a predictionCheck on a run and collect its output.
Get the connected accountLook up the user or organization this Replicate connection belongs to.
Get the webhook signing secretFetch the key Replicate signs its webhook requests with, so a workflow that receives them can prove they really came from Replicate.
List a model's examplesList the example predictions a model's author saved.
List a model's versionsList a model's versions, newest first, each with the input schema it takes.
List available hardwareList the hardware a model or deployment can be set to run on, with the SKU each one is named by.
List deploymentsList the account's deployments and what each one is currently serving.
List filesList the files this account has uploaded, most recent first, with when each one expires.
List model collectionsList the collections Replicate curates: 'Text to image', 'Super resolution' and the rest.
List predictionsList the account's runs, most recent first: from the API and from the Replicate website.
List public modelsBrowse Replicate's public models, newest release first by default.
List trainingsList the fine-tuning runs on this Replicate account, most recent first, with what each one produced.
Run a deploymentSend a prediction to one of your deployments, so it runs on the hardware and version that deployment is configured for.
Run a modelRun any model on Replicate.
Run an official modelRun one of the models Replicate maintains itself, such as black-forest-labs/flux-schnell.
Search public modelsSearch only the public model catalogue, a page at a time.
Search ReplicateSearch Replicate for models, collections and documentation pages in one go.
Update a deploymentRescale a deployment or move it onto another version or hardware.
Update a modelChange a model's description, README or the links on its page.
Upload a fileUpload a file to Replicate and get back a URL you can hand to a model that takes a file input.

Cancel a prediction

Stop a run that is still going, so it stops costing anything. A run that has already finished is left as it is.

Inputs

Predictionprediction_idtextRequired
The id of the run to stop. Pasting the prediction's page URL works too.

Outputs

completed_attext
When it finished (ISO 8601).
created_attext
When it was created (ISO 8601).
data_removedtrue/false
Whether Replicate has since deleted the input and output.
deploymenttext
The deployment that ran it, when it came from one.
errortext
Why it failed, when it did.
inputobject
The input the model was given.
is_finishedtrue/false
Whether the run is over, however it ended. Nothing about it will change again.
logstext
What the model printed while running.
modeltext
The model that ran, as owner/name.
output
Whatever the model returned: text, a number, an object, or file URLs. Empty until the run finishes.
output_fileslist
Every file URL found in the output, in order: the images, audio or video the run produced.
predict_timenumber
Seconds of compute the run used: what it is billed on.
prediction_idtext
The prediction's id: pass it to 'Get a prediction' or 'Cancel a prediction'.
sourcetext
'api' or 'web'.
started_attext
When it began running (ISO 8601).
statustext
starting, processing, succeeded, failed, canceled or aborted.
stream_urltext
A server-sent-events URL for the output as it arrives, when the model streams.
succeededtrue/false
Whether it finished successfully, so the output is there to use.
total_timenumber
Seconds from creation to completion, queueing included.
version_idtext
The exact version that ran.
web_urltext
The prediction's page on Replicate.
Example output
{
  "completed_at": "2023-09-08T16:19:34.791859Z",
  "created_at": "2023-09-08T16:19:34.907244Z",
  "data_removed": false,
  "deployment": null,
  "error": null,
  "input": {
    "text": "Alice"
  },
  "is_finished": true,
  "logs": "",
  "model": "replicate/hello-world",
  "output": "hello Alice",
  "output_files": [],
  "predict_time": 0.012683,
  "prediction_id": "gm3qorzdhgbfurvjtvhg6dckhu",
  "source": "api",
  "started_at": "2023-09-08T16:19:34.779176Z",
  "status": "succeeded",
  "stream_url": null,
  "succeeded": true,
  "total_time": 0.0142,
  "version_id": "5c7d5dc6dd8bf75c1acaa8565735e7986bc5b66206b55cca93cb72c9bf15ccaa",
  "web_url": "https://replicate.com/p/gm3qorzdhgbfurvjtvhg6dckhu"
}

Create a deployment

Create a deployment: a named endpoint that always runs one model version on hardware you choose. Leave the minimum at 0 and nothing runs (and nothing is billed) until a prediction arrives.

Inputs

NamenametextRequired
What to call the deployment. Lower case with hyphens, e.g. my-image-generator.
ModelmodeltextRequired
The model, written owner/name, for example replicate/hello-world. Pasting the model's page URL works too.
Versionversion_idtextRequired
The model version to use. Pick one from the list; it refreshes when you change the model above.
HardwarehardwaretextRequired
The hardware the model runs on. Pick one from the list.
Minimum instancesmin_instancesnumber
Optional. How many instances stay warm, from 0 to 5. 0 (the default) costs nothing while idle but makes the first prediction wait for a cold start.From 0 to 5. Default: 0.
Maximum instancesmax_instancesnumber
Optional. How far it may scale up under load, from 0 to 20. Defaults to 1.From 0 to 20. Default: 1.

Outputs

created_attext
When this release was published (ISO 8601).
created_bytext
The username that published this release.
deploymenttext
The deployment, written owner/name.
hardwaretext
The hardware SKU it runs on.
max_instancesnumber
How far it may scale up under load.
min_instancesnumber
How many instances stay warm. 0 means nothing runs, and nothing is billed, until a prediction arrives.
modeltext
The model it serves, as owner/name.
nametext
Its name within that account.
ownertext
The account that owns it.
release_numbernumber
Which release it is serving. Every change publishes a new one.
version_idtext
The exact version it serves.
Example output
{
  "created_at": "2024-02-15T16:32:57.018467Z",
  "created_by": "acme",
  "deployment": "acme/my-app-image-generator",
  "hardware": "gpu-t4",
  "max_instances": 3,
  "min_instances": 0,
  "model": "stability-ai/sdxl",
  "name": "my-app-image-generator",
  "owner": "acme",
  "release_number": 1,
  "version_id": "da77bc59ee60423279fd632efb4795ab731d9e3ca9705ef3341091fb989b7eaf"
}

Create a model

Create a new model on Replicate. It starts empty: a home for versions pushed with Cog, or for the weights a training produces. The owner has to be the account this connection belongs to, or one of its organizations.

Inputs

OwnerownertextRequired
The account that will own the model. This must be the account this connection belongs to (or one of its organizations); run 'Get the connected account' to fill it in.
NamenametextRequired
The model's name, unique within that owner. Lower case with hyphens, e.g. hot-dog-detector.
VisibilityvisibilitytextRequired
Who can see and run the model.One of: public (Public - anyone can view and run it), private (Private - only you and your organization can view and run it).
HardwarehardwaretextRequired
The hardware the model runs on. Pick one from the list.
Descriptiondescriptiontext
Optional. A one-line description of what the model does.
GitHub URLgithub_urltext
Optional. Where the model's source code lives.
Paper URLpaper_urltext
Optional. The paper the model is based on.
Licence URLlicense_urltext
Optional. The model's licence.
Cover image URLcover_image_urltext
Optional. An image to show on the model's page.

Outputs

cover_image_urltext
Its cover image.
descriptiontext
What the model does.
github_urltext
Its source code, if published.
input_schemaobject
The JSON Schema for the model's inputs, taken from the version's OpenAPI document. Its 'properties' are the names an input object may use, and 'required' the ones it must.
is_officialtrue/false
Whether Replicate maintains this model itself. Official models are always on and can be run by name.
latest_version_created_attext
When that version was published (ISO 8601).
latest_version_idtext
The version it currently resolves to.
license_urltext
Its licence, if published.
modeltext
The model, written owner/name.
nametext
The model's name within that owner.
output_schemaobject
The JSON Schema for whatever the model returns.
ownertext
The user or organization that owns it.
paper_urltext
Its paper, if there is one.
run_countnumber
How many times the model has been run.
urltext
The model's page on Replicate.
visibilitytext
'public' or 'private'.
Example output
{
  "cover_image_url": null,
  "description": "A tiny model that says hello",
  "github_url": "https://github.com/replicate/cog-examples",
  "input_schema": {
    "required": [
      "text"
    ],
    "type": "object"
  },
  "is_official": false,
  "latest_version_created_at": "2022-04-26T19:29:04.418669Z",
  "latest_version_id": "5c7d5dc6dd8bf75c1acaa8565735e7986bc5b66206b55cca93cb72c9bf15ccaa",
  "license_url": null,
  "model": "replicate/hello-world",
  "name": "hello-world",
  "output_schema": {
    "type": "string"
  },
  "owner": "replicate",
  "paper_url": null,
  "run_count": 5681081,
  "url": "https://replicate.com/replicate/hello-world",
  "visibility": "public"
}

Delete a file

Delete an uploaded file. Anything still pointing at its URL stops working, so delete it once the runs that used it are done.

Inputs

Filefile_idtextRequired
Which file to delete. Pick one of yours from the list.

Outputs

deletedtrue/false
True once Replicate has deleted it.
file_idtext
The file that was deleted.
Example output
{
  "deleted": true,
  "file_id": "cneqzikepnug6xezperrr4z55o"
}

Delete a model

Delete a model you own. Replicate only deletes private models with no versions left, so a model that has had one pushed to it has to have its versions removed on replicate.com first.

Inputs

ModelmodeltextRequired
The model, written owner/name, for example replicate/hello-world. Pasting the model's page URL works too.

Outputs

deletedtrue/false
True once Replicate has deleted it.
modeltext
The model that was deleted.
Example output
{
  "deleted": true,
  "model": "alice/hot-dog-detector"
}

Get a collection

Open one curated collection and get every model in it, each with the input schema its predictions take.

Inputs

Collectioncollection_slugtextRequired
Which collection to open. Pick one from the list.

Outputs

descriptiontext
What the collection gathers.
full_descriptiontext
The longer description, in Markdown, when there is one.
model_countnumber
How many models came back with the collection.
modelslist
The models in the collection (empty in a listing; filled in by 'Get a collection').
nametext
The collection's title.
slugtext
The collection's slug, e.g. super-resolution.
urltext
The collection's page on Replicate.
Example output
{
  "description": "Upscaling models that create high-quality images from low-quality images.",
  "full_description": null,
  "model_count": 1,
  "models": [
    {
      "cover_image_url": null,
      "description": "A tiny model that says hello",
      "github_url": "https://github.com/replicate/cog-examples",
      "input_schema": {
        "required": [
          "text"
        ],
        "type": "object"
      },
      "is_official": false,
      "latest_version_created_at": "2022-04-26T19:29:04.418669Z",
      "latest_version_id": "5c7d5dc6dd8bf75c1acaa8565735e7986bc5b66206b55cca93cb72c9bf15ccaa",
      "license_url": null,
      "model": "replicate/hello-world",
      "name": "hello-world",
      "output_schema": {
        "type": "string"
      },
      "owner": "replicate",
      "paper_url": null,
      "run_count": 5681081,
      "url": "https://replicate.com/replicate/hello-world",
      "visibility": "public"
    }
  ],
  "name": "Super resolution",
  "slug": "super-resolution",
  "url": "https://replicate.com/collections/super-resolution"
}

Get a deployment

Look up one deployment: the model version it serves, the hardware it runs on and how far it may scale.

Inputs

DeploymentdeploymenttextRequired
The deployment, written owner/name. Pick one of yours from the list.

Outputs

created_attext
When this release was published (ISO 8601).
created_bytext
The username that published this release.
deploymenttext
The deployment, written owner/name.
hardwaretext
The hardware SKU it runs on.
max_instancesnumber
How far it may scale up under load.
min_instancesnumber
How many instances stay warm. 0 means nothing runs, and nothing is billed, until a prediction arrives.
modeltext
The model it serves, as owner/name.
nametext
Its name within that account.
ownertext
The account that owns it.
release_numbernumber
Which release it is serving. Every change publishes a new one.
version_idtext
The exact version it serves.
Example output
{
  "created_at": "2024-02-15T16:32:57.018467Z",
  "created_by": "acme",
  "deployment": "acme/my-app-image-generator",
  "hardware": "gpu-t4",
  "max_instances": 3,
  "min_instances": 0,
  "model": "stability-ai/sdxl",
  "name": "my-app-image-generator",
  "owner": "acme",
  "release_number": 1,
  "version_id": "da77bc59ee60423279fd632efb4795ab731d9e3ca9705ef3341091fb989b7eaf"
}

Get a file

Look up one uploaded file: its size, checksum, metadata and when Replicate will delete it.

Inputs

Filefile_idtextRequired
Which file to look up. Pick one of yours from the list.

Outputs

content_typetext
Its MIME type.
created_attext
When it was uploaded (ISO 8601).
expires_attext
When Replicate will delete it (ISO 8601). Files are not kept forever.
file_idtext
The file's id on Replicate.
metadataobject
Whatever metadata was attached at upload time.
nametext
The file name it was stored under.
sha256text
A SHA-256 checksum of the contents.
sizenumber
Its length in bytes.
urltext
The file's address on the API. Give this to a model that takes a file input.
Example output
{
  "content_type": "application/zip",
  "created_at": "2024-02-21T12:54:18.578761Z",
  "expires_at": "2024-02-22T12:54:18.578761Z",
  "file_id": "cneqzikepnug6xezperrr4z55o",
  "metadata": {
    "customer_reference_id": 123
  },
  "name": "example.zip",
  "sha256": "f047f8e745f9996c6e386064e06cb2007b8e6bc0a968a334fc0d2b2d64012066",
  "size": 69420,
  "url": "https://api.replicate.com/v1/files/cneqzikepnug6xezperrr4z55o"
}

Get a model

Look up one model, including the input schema its predictions take and the version it currently resolves to. Read input_schema to find out what to put in a run's Model input.

Inputs

ModelmodeltextRequired
The model, written owner/name, for example replicate/hello-world. Pasting the model's page URL works too.

Outputs

cover_image_urltext
Its cover image.
descriptiontext
What the model does.
github_urltext
Its source code, if published.
input_schemaobject
The JSON Schema for the model's inputs, taken from the version's OpenAPI document. Its 'properties' are the names an input object may use, and 'required' the ones it must.
is_officialtrue/false
Whether Replicate maintains this model itself. Official models are always on and can be run by name.
latest_version_created_attext
When that version was published (ISO 8601).
latest_version_idtext
The version it currently resolves to.
license_urltext
Its licence, if published.
modeltext
The model, written owner/name.
nametext
The model's name within that owner.
output_schemaobject
The JSON Schema for whatever the model returns.
ownertext
The user or organization that owns it.
paper_urltext
Its paper, if there is one.
run_countnumber
How many times the model has been run.
urltext
The model's page on Replicate.
visibilitytext
'public' or 'private'.
Example output
{
  "cover_image_url": null,
  "description": "A tiny model that says hello",
  "github_url": "https://github.com/replicate/cog-examples",
  "input_schema": {
    "required": [
      "text"
    ],
    "type": "object"
  },
  "is_official": false,
  "latest_version_created_at": "2022-04-26T19:29:04.418669Z",
  "latest_version_id": "5c7d5dc6dd8bf75c1acaa8565735e7986bc5b66206b55cca93cb72c9bf15ccaa",
  "license_url": null,
  "model": "replicate/hello-world",
  "name": "hello-world",
  "output_schema": {
    "type": "string"
  },
  "owner": "replicate",
  "paper_url": null,
  "run_count": 5681081,
  "url": "https://replicate.com/replicate/hello-world",
  "visibility": "public"
}

Get a model version

Look up one version of a model and the exact input and output schemas it declares.

Inputs

ModelmodeltextRequired
The model, written owner/name, for example replicate/hello-world. Pasting the model's page URL works too.
Versionversion_idtextRequired
The model version to use. Pick one from the list; it refreshes when you change the model above.

Outputs

cog_versiontext
The version of Cog the model was built with.
created_attext
When the version was published (ISO 8601).
input_schemaobject
The JSON Schema for the model's inputs, taken from the version's OpenAPI document. Its 'properties' are the names an input object may use, and 'required' the ones it must.
modeltext
The model this version belongs to.
openapi_schemaobject
The version's whole OpenAPI document, if you need more than the two schemas above.
output_schemaobject
The JSON Schema for whatever the model returns.
version_idtext
The 64-character version id.
Example output
{
  "cog_version": "0.3.0",
  "created_at": "2022-04-26T19:29:04.418669Z",
  "input_schema": {
    "required": [
      "text"
    ],
    "type": "object"
  },
  "model": "replicate/hello-world",
  "openapi_schema": {
    "openapi": "3.0.2"
  },
  "output_schema": {
    "type": "string"
  },
  "version_id": "5c7d5dc6dd8bf75c1acaa8565735e7986bc5b66206b55cca93cb72c9bf15ccaa"
}

Get a model's README

Read a model's README: the prose on its page, in Markdown. Usually where the author explains what the inputs mean.

Inputs

ModelmodeltextRequired
The model, written owner/name, for example replicate/hello-world. Pasting the model's page URL works too.

Outputs

lengthnumber
How many characters it runs to.
modeltext
The model the README belongs to.
readmetext
The README's Markdown source.
urltext
The model's page on Replicate.
Example output
{
  "length": 44,
  "model": "replicate/hello-world",
  "readme": "# Hello World\n\nA tiny model that says hello.",
  "url": "https://replicate.com/replicate/hello-world"
}

Get a prediction

Check on a run and collect its output. Use this after starting a run in the background: succeeded tells you the output is ready, and output_files holds any images, audio or video it produced.

Inputs

Predictionprediction_idtextRequired
The id a run step returned. Pasting the prediction's page URL works too.

Outputs

completed_attext
When it finished (ISO 8601).
created_attext
When it was created (ISO 8601).
data_removedtrue/false
Whether Replicate has since deleted the input and output.
deploymenttext
The deployment that ran it, when it came from one.
errortext
Why it failed, when it did.
inputobject
The input the model was given.
is_finishedtrue/false
Whether the run is over, however it ended. Nothing about it will change again.
logstext
What the model printed while running.
modeltext
The model that ran, as owner/name.
output
Whatever the model returned: text, a number, an object, or file URLs. Empty until the run finishes.
output_fileslist
Every file URL found in the output, in order: the images, audio or video the run produced.
predict_timenumber
Seconds of compute the run used: what it is billed on.
prediction_idtext
The prediction's id: pass it to 'Get a prediction' or 'Cancel a prediction'.
sourcetext
'api' or 'web'.
started_attext
When it began running (ISO 8601).
statustext
starting, processing, succeeded, failed, canceled or aborted.
stream_urltext
A server-sent-events URL for the output as it arrives, when the model streams.
succeededtrue/false
Whether it finished successfully, so the output is there to use.
total_timenumber
Seconds from creation to completion, queueing included.
version_idtext
The exact version that ran.
web_urltext
The prediction's page on Replicate.
Example output
{
  "completed_at": "2023-09-08T16:19:34.791859Z",
  "created_at": "2023-09-08T16:19:34.907244Z",
  "data_removed": false,
  "deployment": null,
  "error": null,
  "input": {
    "text": "Alice"
  },
  "is_finished": true,
  "logs": "",
  "model": "replicate/hello-world",
  "output": "hello Alice",
  "output_files": [],
  "predict_time": 0.012683,
  "prediction_id": "gm3qorzdhgbfurvjtvhg6dckhu",
  "source": "api",
  "started_at": "2023-09-08T16:19:34.779176Z",
  "status": "succeeded",
  "stream_url": null,
  "succeeded": true,
  "total_time": 0.0142,
  "version_id": "5c7d5dc6dd8bf75c1acaa8565735e7986bc5b66206b55cca93cb72c9bf15ccaa",
  "web_url": "https://replicate.com/p/gm3qorzdhgbfurvjtvhg6dckhu"
}

Get the connected account

Look up the user or organization this Replicate connection belongs to. Handy for filling in the owner of a model you are about to create, so nothing is hard-coded.

Inputs

None.

Outputs

github_urltext
Its GitHub page, when it has one.
nametext
Its display name.
typetext
'user' or 'organization'.
urltext
Its page on Replicate.
usernametext
The account's username: the owner half of every model it owns.
Example output
{
  "github_url": "https://github.com/acme",
  "name": "Acme Corp, Inc.",
  "type": "organization",
  "url": "https://replicate.com/acme",
  "username": "acme"
}

Get the webhook signing secret

Fetch the key Replicate signs its webhook requests with, so a workflow that receives them can prove they really came from Replicate.

Inputs

None.

Outputs

signing_keytext
The signing key for the account's default webhook endpoint.
Example output
{
  "signing_key": "whsec_MfKQ9r8GKYqrTwjUPD8ILPZIo2LaLaSw"
}

List a model's examples

List the example predictions a model's author saved. Each one shows a real input and the output it produced, which is the quickest way to see what to send the model.

Inputs

ModelmodeltextRequired
The model, written owner/name, for example replicate/hello-world. Pasting the model's page URL works too.
Next pagecursortext
Optional. To read the following page, pass the next_cursor this action returned last time. Leave it blank for the first page.

Outputs

countnumber
How many items this page holds.
exampleslist
The example predictions on this page.
has_moretrue/false
Whether another page follows this one.
modeltext
The model these examples belong to.
next_cursortext
Pass this back in as 'Next page' to read the next page; null on the last page.
previous_cursortext
The cursor for the previous page, or null on the first page.
Example output
{
  "count": 1,
  "examples": [
    {
      "completed_at": "2023-09-08T16:19:34.791859Z",
      "created_at": "2023-09-08T16:19:34.907244Z",
      "data_removed": false,
      "deployment": null,
      "error": null,
      "input": {
        "text": "Alice"
      },
      "is_finished": true,
      "logs": "",
      "model": "replicate/hello-world",
      "output": "hello Alice",
      "output_files": [],
      "predict_time": 0.012683,
      "prediction_id": "gm3qorzdhgbfurvjtvhg6dckhu",
      "source": "api",
      "started_at": "2023-09-08T16:19:34.779176Z",
      "status": "succeeded",
      "stream_url": null,
      "succeeded": true,
      "total_time": 0.0142,
      "version_id": "5c7d5dc6dd8bf75c1acaa8565735e7986bc5b66206b55cca93cb72c9bf15ccaa",
      "web_url": "https://replicate.com/p/gm3qorzdhgbfurvjtvhg6dckhu"
    }
  ],
  "has_more": false,
  "model": "replicate/hello-world",
  "next_cursor": null,
  "previous_cursor": null
}

List a model's versions

List a model's versions, newest first, each with the input schema it takes. Use this to pin a run to a version that will not change under you.

Inputs

ModelmodeltextRequired
The model, written owner/name, for example replicate/hello-world. Pasting the model's page URL works too.
Next pagecursortext
Optional. To read the following page, pass the next_cursor this action returned last time. Leave it blank for the first page.

Outputs

countnumber
How many items this page holds.
has_moretrue/false
Whether another page follows this one.
latest_version_idtext
The newest version on this page: the one the model resolves to.
modeltext
The model these versions belong to.
next_cursortext
Pass this back in as 'Next page' to read the next page; null on the last page.
previous_cursortext
The cursor for the previous page, or null on the first page.
versionslist
The versions on this page, newest first.
Example output
{
  "count": 1,
  "has_more": false,
  "latest_version_id": "5c7d5dc6dd8bf75c1acaa8565735e7986bc5b66206b55cca93cb72c9bf15ccaa",
  "model": "replicate/hello-world",
  "next_cursor": null,
  "previous_cursor": null,
  "versions": [
    {
      "cog_version": "0.3.0",
      "created_at": "2022-04-26T19:29:04.418669Z",
      "input_schema": {
        "required": [
          "text"
        ],
        "type": "object"
      },
      "openapi_schema": {
        "openapi": "3.0.2"
      },
      "output_schema": {
        "type": "string"
      },
      "version_id": "5c7d5dc6dd8bf75c1acaa8565735e7986bc5b66206b55cca93cb72c9bf15ccaa"
    }
  ]
}

List available hardware

List the hardware a model or deployment can be set to run on, with the SKU each one is named by.

Inputs

None.

Outputs

countnumber
How many options there are.
hardwarelist
Every hardware option, cheapest first.
Example output
{
  "count": 2,
  "hardware": [
    {
      "name": "CPU",
      "sku": "cpu"
    },
    {
      "name": "Nvidia T4 GPU",
      "sku": "gpu-t4"
    }
  ]
}

List deployments

List the account's deployments and what each one is currently serving.

Inputs

Next pagecursortext
Optional. To read the following page, pass the next_cursor this action returned last time. Leave it blank for the first page.

Outputs

countnumber
How many items this page holds.
deploymentslist
The deployments on this page, most recent first.
has_moretrue/false
Whether another page follows this one.
next_cursortext
Pass this back in as 'Next page' to read the next page; null on the last page.
previous_cursortext
The cursor for the previous page, or null on the first page.
Example output
{
  "count": 1,
  "deployments": [
    {
      "created_at": "2024-02-15T16:32:57.018467Z",
      "created_by": "acme",
      "deployment": "acme/my-app-image-generator",
      "hardware": "gpu-t4",
      "max_instances": 3,
      "min_instances": 0,
      "model": "stability-ai/sdxl",
      "name": "my-app-image-generator",
      "owner": "acme",
      "release_number": 1,
      "version_id": "da77bc59ee60423279fd632efb4795ab731d9e3ca9705ef3341091fb989b7eaf"
    }
  ],
  "has_more": false,
  "next_cursor": null,
  "previous_cursor": null
}

List files

List the files this account has uploaded, most recent first, with when each one expires.

Inputs

Next pagecursortext
Optional. To read the following page, pass the next_cursor this action returned last time. Leave it blank for the first page.

Outputs

countnumber
How many items this page holds.
fileslist
The files on this page, most recent first.
has_moretrue/false
Whether another page follows this one.
next_cursortext
Pass this back in as 'Next page' to read the next page; null on the last page.
previous_cursortext
The cursor for the previous page, or null on the first page.
Example output
{
  "count": 1,
  "files": [
    {
      "content_type": "application/zip",
      "created_at": "2024-02-21T12:54:18.578761Z",
      "expires_at": "2024-02-22T12:54:18.578761Z",
      "file_id": "cneqzikepnug6xezperrr4z55o",
      "metadata": {
        "customer_reference_id": 123
      },
      "name": "example.zip",
      "sha256": "f047f8e745f9996c6e386064e06cb2007b8e6bc0a968a334fc0d2b2d64012066",
      "size": 69420,
      "url": "https://api.replicate.com/v1/files/cneqzikepnug6xezperrr4z55o"
    }
  ],
  "has_more": false,
  "next_cursor": null,
  "previous_cursor": null
}

List model collections

List the collections Replicate curates: 'Text to image', 'Super resolution' and the rest. Each one's slug opens it with 'Get a collection'.

Inputs

Next pagecursortext
Optional. To read the following page, pass the next_cursor this action returned last time. Leave it blank for the first page.

Outputs

collectionslist
The collections on this page.
countnumber
How many items this page holds.
has_moretrue/false
Whether another page follows this one.
next_cursortext
Pass this back in as 'Next page' to read the next page; null on the last page.
previous_cursortext
The cursor for the previous page, or null on the first page.
Example output
{
  "collections": [
    {
      "description": "Upscaling models that create high-quality images from low-quality images.",
      "full_description": null,
      "model_count": 0,
      "models": [],
      "name": "Super resolution",
      "slug": "super-resolution",
      "url": "https://replicate.com/collections/super-resolution"
    }
  ],
  "count": 1,
  "has_more": false,
  "next_cursor": null,
  "previous_cursor": null
}

List predictions

List the account's runs, most recent first: from the API and from the Replicate website. Filter by when they were created to look at one day's activity. Replicate keeps this listing to roughly the last three months.

Inputs

Created aftercreated_afterdate and time
Optional. Only runs created at or after this moment. Replicate answers this filter for about the last three months, and refuses a date older than that.
Created beforecreated_beforedate and time
Optional. Only runs created before this moment.
Started fromsourcetext
Optional. Narrow the list to runs started on the website.One of: all (Both - started from the API and from the Replicate website), web (Website only - started from replicate.com). Default: all.
Next pagecursortext
Optional. To read the following page, pass the next_cursor this action returned last time. Leave it blank for the first page.

Outputs

countnumber
How many items this page holds.
has_moretrue/false
Whether another page follows this one.
next_cursortext
Pass this back in as 'Next page' to read the next page; null on the last page.
predictionslist
The predictions on this page, most recent first.
previous_cursortext
The cursor for the previous page, or null on the first page.
Example output
{
  "count": 1,
  "has_more": false,
  "next_cursor": null,
  "predictions": [
    {
      "completed_at": "2023-09-08T16:19:34.791859Z",
      "created_at": "2023-09-08T16:19:34.907244Z",
      "data_removed": false,
      "deployment": null,
      "error": null,
      "input": {
        "text": "Alice"
      },
      "is_finished": true,
      "logs": "",
      "model": "replicate/hello-world",
      "output": "hello Alice",
      "output_files": [],
      "predict_time": 0.012683,
      "prediction_id": "gm3qorzdhgbfurvjtvhg6dckhu",
      "source": "api",
      "started_at": "2023-09-08T16:19:34.779176Z",
      "status": "succeeded",
      "stream_url": null,
      "succeeded": true,
      "total_time": 0.0142,
      "version_id": "5c7d5dc6dd8bf75c1acaa8565735e7986bc5b66206b55cca93cb72c9bf15ccaa",
      "web_url": "https://replicate.com/p/gm3qorzdhgbfurvjtvhg6dckhu"
    }
  ],
  "previous_cursor": null
}

List public models

Browse Replicate's public models, newest release first by default. Read the next page by passing back the next_cursor this returns.

Inputs

Sort bysort_bytext
Optional. Which date to order the models by.One of: latest_version_created_at (Latest release - when the model last published a version), model_created_at (Model created - when the model first appeared). Default: latest_version_created_at.
Ordersort_directiontext
Optional. Which end of that date range to start from.One of: desc (Newest first), asc (Oldest first). Default: desc.
Next pagecursortext
Optional. To read the following page, pass the next_cursor this action returned last time. Leave it blank for the first page.

Outputs

countnumber
How many items this page holds.
has_moretrue/false
Whether another page follows this one.
modelslist
The models on this page.
next_cursortext
Pass this back in as 'Next page' to read the next page; null on the last page.
previous_cursortext
The cursor for the previous page, or null on the first page.
Example output
{
  "count": 1,
  "has_more": true,
  "models": [
    {
      "cover_image_url": null,
      "description": "A tiny model that says hello",
      "github_url": "https://github.com/replicate/cog-examples",
      "input_schema": {
        "required": [
          "text"
        ],
        "type": "object"
      },
      "is_official": false,
      "latest_version_created_at": "2022-04-26T19:29:04.418669Z",
      "latest_version_id": "5c7d5dc6dd8bf75c1acaa8565735e7986bc5b66206b55cca93cb72c9bf15ccaa",
      "license_url": null,
      "model": "replicate/hello-world",
      "name": "hello-world",
      "output_schema": {
        "type": "string"
      },
      "owner": "replicate",
      "paper_url": null,
      "run_count": 5681081,
      "url": "https://replicate.com/replicate/hello-world",
      "visibility": "public"
    }
  ],
  "next_cursor": "cD0yMDI0LTAxLTAx",
  "previous_cursor": null
}

List trainings

List the fine-tuning runs on this Replicate account, most recent first, with what each one produced. Trainings are started on replicate.com; this watches them.

Inputs

Next pagecursortext
Optional. To read the following page, pass the next_cursor this action returned last time. Leave it blank for the first page.

Outputs

countnumber
How many items this page holds.
has_moretrue/false
Whether another page follows this one.
next_cursortext
Pass this back in as 'Next page' to read the next page; null on the last page.
previous_cursortext
The cursor for the previous page, or null on the first page.
trainingslist
The trainings on this page, most recent first.
Example output
{
  "count": 1,
  "has_more": false,
  "next_cursor": null,
  "previous_cursor": null,
  "trainings": [
    {
      "completed_at": "2024-08-01T12:31:00.000000Z",
      "created_at": "2024-08-01T12:00:00.000000Z",
      "destination": "alice/my-lora",
      "error": null,
      "input": {
        "steps": 1000
      },
      "is_finished": true,
      "logs": "",
      "model": "ostris/flux-dev-lora-trainer",
      "predict_time": 1820.4,
      "source": "api",
      "started_at": "2024-08-01T12:00:05.000000Z",
      "status": "succeeded",
      "succeeded": true,
      "total_time": 1855.0,
      "trained_version_id": "8a4a1c2f2e3d4b5c6a7b8c9d0e1f2a3b4c5d6e7f8a9b0c1d2e3f4a5b6c7d8e9f",
      "training_id": "zz4ibbonubfz7carwiefibzgga",
      "version_id": "e440909d3512c31646ee2e0c7d6f6f4923224863a6a10c494606e79fb5844497",
      "web_url": "https://replicate.com/p/zz4ibbonubfz7carwiefibzgga",
      "weights_url": "https://replicate.delivery/pbxt/weights.tar"
    }
  ]
}

Run a deployment

Send a prediction to one of your deployments, so it runs on the hardware and version that deployment is configured for.

Inputs

DeploymentdeploymenttextRequired
The deployment, written owner/name. Pick one of yours from the list.
Model inputinputobjectRequired
The model's own inputs, as a set of name/value pairs. Which names it takes depends on the model; run 'Get a model' and read its input_schema, or open the model's API tab on Replicate. Files go in as public URLs.
Wait up to (seconds)wait_secondsnumber
Optional. Hold this step open until the model finishes, up to 60 seconds, so the next step can use the output directly. Leave it blank to start the run in the background and pick the result up later with 'Get a prediction'.From 1 to 60.
Cancel after (seconds)cancel_after_secondsnumber
Optional. Stop the run automatically if it is still going after this many seconds, so a stuck model cannot keep billing. Minimum 5.At least 5.
Webhook URLwebhooktext
Optional. An https:// address Replicate calls as the run progresses, so you do not have to poll for the result.
Webhook eventswebhook_events_filtertext
Optional. Which moments to call the webhook on. Leave it blank for new output and completion. Only used when a webhook URL is set.One or more of: start (Start - immediately when it begins running), output (Output - each time it produces new output), logs (Logs - each time it writes a log line), completed (Completed - when it succeeds, fails or is canceled).

Outputs

completed_attext
When it finished (ISO 8601).
created_attext
When it was created (ISO 8601).
data_removedtrue/false
Whether Replicate has since deleted the input and output.
deploymenttext
The deployment that ran it, when it came from one.
errortext
Why it failed, when it did.
inputobject
The input the model was given.
is_finishedtrue/false
Whether the run is over, however it ended. Nothing about it will change again.
logstext
What the model printed while running.
modeltext
The model that ran, as owner/name.
output
Whatever the model returned: text, a number, an object, or file URLs. Empty until the run finishes.
output_fileslist
Every file URL found in the output, in order: the images, audio or video the run produced.
predict_timenumber
Seconds of compute the run used: what it is billed on.
prediction_idtext
The prediction's id: pass it to 'Get a prediction' or 'Cancel a prediction'.
sourcetext
'api' or 'web'.
started_attext
When it began running (ISO 8601).
statustext
starting, processing, succeeded, failed, canceled or aborted.
stream_urltext
A server-sent-events URL for the output as it arrives, when the model streams.
succeededtrue/false
Whether it finished successfully, so the output is there to use.
total_timenumber
Seconds from creation to completion, queueing included.
version_idtext
The exact version that ran.
web_urltext
The prediction's page on Replicate.
Example output
{
  "completed_at": "2023-09-08T16:19:34.791859Z",
  "created_at": "2023-09-08T16:19:34.907244Z",
  "data_removed": false,
  "deployment": null,
  "error": null,
  "input": {
    "text": "Alice"
  },
  "is_finished": true,
  "logs": "",
  "model": "replicate/hello-world",
  "output": "hello Alice",
  "output_files": [],
  "predict_time": 0.012683,
  "prediction_id": "gm3qorzdhgbfurvjtvhg6dckhu",
  "source": "api",
  "started_at": "2023-09-08T16:19:34.779176Z",
  "status": "succeeded",
  "stream_url": null,
  "succeeded": true,
  "total_time": 0.0142,
  "version_id": "5c7d5dc6dd8bf75c1acaa8565735e7986bc5b66206b55cca93cb72c9bf15ccaa",
  "web_url": "https://replicate.com/p/gm3qorzdhgbfurvjtvhg6dckhu"
}

Run a model

Run any model on Replicate. Set 'Wait up to' and the finished output comes back in this step; leave it blank and the run goes on in the background, to be picked up later with 'Get a prediction'. Leave the version blank to run whichever version the model is on now. For one of Replicate's own official models, 'Run an official model' is the simpler step.

Inputs

ModelmodeltextRequired
The model, written owner/name, for example replicate/hello-world. Pasting the model's page URL works too.
Model inputinputobjectRequired
The model's own inputs, as a set of name/value pairs. Which names it takes depends on the model; run 'Get a model' and read its input_schema, or open the model's API tab on Replicate. Files go in as public URLs.
Versionversion_idtext
Optional. The exact version to run. Leave it blank to run whichever version the model is on now, which is what you want unless you are pinning a release.
Wait up to (seconds)wait_secondsnumber
Optional. Hold this step open until the model finishes, up to 60 seconds, so the next step can use the output directly. Leave it blank to start the run in the background and pick the result up later with 'Get a prediction'.From 1 to 60.
Cancel after (seconds)cancel_after_secondsnumber
Optional. Stop the run automatically if it is still going after this many seconds, so a stuck model cannot keep billing. Minimum 5.At least 5.
Webhook URLwebhooktext
Optional. An https:// address Replicate calls as the run progresses, so you do not have to poll for the result.
Webhook eventswebhook_events_filtertext
Optional. Which moments to call the webhook on. Leave it blank for new output and completion. Only used when a webhook URL is set.One or more of: start (Start - immediately when it begins running), output (Output - each time it produces new output), logs (Logs - each time it writes a log line), completed (Completed - when it succeeds, fails or is canceled).

Outputs

completed_attext
When it finished (ISO 8601).
created_attext
When it was created (ISO 8601).
data_removedtrue/false
Whether Replicate has since deleted the input and output.
deploymenttext
The deployment that ran it, when it came from one.
errortext
Why it failed, when it did.
inputobject
The input the model was given.
is_finishedtrue/false
Whether the run is over, however it ended. Nothing about it will change again.
logstext
What the model printed while running.
modeltext
The model that ran, as owner/name.
output
Whatever the model returned: text, a number, an object, or file URLs. Empty until the run finishes.
output_fileslist
Every file URL found in the output, in order: the images, audio or video the run produced.
predict_timenumber
Seconds of compute the run used: what it is billed on.
prediction_idtext
The prediction's id: pass it to 'Get a prediction' or 'Cancel a prediction'.
sourcetext
'api' or 'web'.
started_attext
When it began running (ISO 8601).
statustext
starting, processing, succeeded, failed, canceled or aborted.
stream_urltext
A server-sent-events URL for the output as it arrives, when the model streams.
succeededtrue/false
Whether it finished successfully, so the output is there to use.
total_timenumber
Seconds from creation to completion, queueing included.
version_idtext
The exact version that ran.
web_urltext
The prediction's page on Replicate.
Example output
{
  "completed_at": "2023-09-08T16:19:34.791859Z",
  "created_at": "2023-09-08T16:19:34.907244Z",
  "data_removed": false,
  "deployment": null,
  "error": null,
  "input": {
    "text": "Alice"
  },
  "is_finished": true,
  "logs": "",
  "model": "replicate/hello-world",
  "output": "hello Alice",
  "output_files": [],
  "predict_time": 0.012683,
  "prediction_id": "gm3qorzdhgbfurvjtvhg6dckhu",
  "source": "api",
  "started_at": "2023-09-08T16:19:34.779176Z",
  "status": "succeeded",
  "stream_url": null,
  "succeeded": true,
  "total_time": 0.0142,
  "version_id": "5c7d5dc6dd8bf75c1acaa8565735e7986bc5b66206b55cca93cb72c9bf15ccaa",
  "web_url": "https://replicate.com/p/gm3qorzdhgbfurvjtvhg6dckhu"
}

Run an official model

Run one of the models Replicate maintains itself, such as black-forest-labs/flux-schnell. Official models are always on, so they are run by name and always use the current version. For any other model use 'Run a model'.

Inputs

ModelmodeltextRequired
The model, written owner/name, for example replicate/hello-world. Pasting the model's page URL works too.
Model inputinputobjectRequired
The model's own inputs, as a set of name/value pairs. Which names it takes depends on the model; run 'Get a model' and read its input_schema, or open the model's API tab on Replicate. Files go in as public URLs.
Wait up to (seconds)wait_secondsnumber
Optional. Hold this step open until the model finishes, up to 60 seconds, so the next step can use the output directly. Leave it blank to start the run in the background and pick the result up later with 'Get a prediction'.From 1 to 60.
Cancel after (seconds)cancel_after_secondsnumber
Optional. Stop the run automatically if it is still going after this many seconds, so a stuck model cannot keep billing. Minimum 5.At least 5.
Webhook URLwebhooktext
Optional. An https:// address Replicate calls as the run progresses, so you do not have to poll for the result.
Webhook eventswebhook_events_filtertext
Optional. Which moments to call the webhook on. Leave it blank for new output and completion. Only used when a webhook URL is set.One or more of: start (Start - immediately when it begins running), output (Output - each time it produces new output), logs (Logs - each time it writes a log line), completed (Completed - when it succeeds, fails or is canceled).

Outputs

completed_attext
When it finished (ISO 8601).
created_attext
When it was created (ISO 8601).
data_removedtrue/false
Whether Replicate has since deleted the input and output.
deploymenttext
The deployment that ran it, when it came from one.
errortext
Why it failed, when it did.
inputobject
The input the model was given.
is_finishedtrue/false
Whether the run is over, however it ended. Nothing about it will change again.
logstext
What the model printed while running.
modeltext
The model that ran, as owner/name.
output
Whatever the model returned: text, a number, an object, or file URLs. Empty until the run finishes.
output_fileslist
Every file URL found in the output, in order: the images, audio or video the run produced.
predict_timenumber
Seconds of compute the run used: what it is billed on.
prediction_idtext
The prediction's id: pass it to 'Get a prediction' or 'Cancel a prediction'.
sourcetext
'api' or 'web'.
started_attext
When it began running (ISO 8601).
statustext
starting, processing, succeeded, failed, canceled or aborted.
stream_urltext
A server-sent-events URL for the output as it arrives, when the model streams.
succeededtrue/false
Whether it finished successfully, so the output is there to use.
total_timenumber
Seconds from creation to completion, queueing included.
version_idtext
The exact version that ran.
web_urltext
The prediction's page on Replicate.
Example output
{
  "completed_at": "2023-09-08T16:19:34.791859Z",
  "created_at": "2023-09-08T16:19:34.907244Z",
  "data_removed": false,
  "deployment": null,
  "error": null,
  "input": {
    "text": "Alice"
  },
  "is_finished": true,
  "logs": "",
  "model": "replicate/hello-world",
  "output": "hello Alice",
  "output_files": [],
  "predict_time": 0.012683,
  "prediction_id": "gm3qorzdhgbfurvjtvhg6dckhu",
  "source": "api",
  "started_at": "2023-09-08T16:19:34.779176Z",
  "status": "succeeded",
  "stream_url": null,
  "succeeded": true,
  "total_time": 0.0142,
  "version_id": "5c7d5dc6dd8bf75c1acaa8565735e7986bc5b66206b55cca93cb72c9bf15ccaa",
  "web_url": "https://replicate.com/p/gm3qorzdhgbfurvjtvhg6dckhu"
}

Search public models

Search only the public model catalogue, a page at a time. Use 'Search Replicate' instead if you also want collections and documentation.

Inputs

Search forquerytextRequired
What the model should do, or part of its name.

Outputs

countnumber
How many items this page holds.
has_moretrue/false
Whether another page follows this one.
modelslist
The models on this page of results.
next_cursortext
Pass this back in as 'Next page' to read the next page; null on the last page.
previous_cursortext
The cursor for the previous page, or null on the first page.
querytext
The term that was searched for.
Example output
{
  "count": 1,
  "has_more": false,
  "models": [
    {
      "cover_image_url": null,
      "description": "A tiny model that says hello",
      "github_url": "https://github.com/replicate/cog-examples",
      "input_schema": {
        "required": [
          "text"
        ],
        "type": "object"
      },
      "is_official": false,
      "latest_version_created_at": "2022-04-26T19:29:04.418669Z",
      "latest_version_id": "5c7d5dc6dd8bf75c1acaa8565735e7986bc5b66206b55cca93cb72c9bf15ccaa",
      "license_url": null,
      "model": "replicate/hello-world",
      "name": "hello-world",
      "output_schema": {
        "type": "string"
      },
      "owner": "replicate",
      "paper_url": null,
      "run_count": 5681081,
      "url": "https://replicate.com/replicate/hello-world",
      "visibility": "public"
    }
  ],
  "next_cursor": null,
  "previous_cursor": null,
  "query": "hello world"
}

Search Replicate

Search Replicate for models, collections and documentation pages in one go. The best way to find a model when you know what you want it to do but not what it is called.

Inputs

Search forquerytextRequired
What you are looking for, e.g. 'remove background'.
How many modelslimitnumber
Optional. How many models to return, from 1 to 50. Defaults to 20.From 1 to 50. Default: 20.

Outputs

collectionslist
The matching collections.
model_countnumber
How many models matched.
modelslist
The matching models, best match first.
pageslist
The matching documentation pages.
querytext
The term that was searched for.
Example output
{
  "collections": [],
  "model_count": 0,
  "models": [],
  "pages": [],
  "query": "hello world"
}

Update a deployment

Rescale a deployment or move it onto another version or hardware. Fill in only what you want changed. Every change publishes a new release.

Inputs

DeploymentdeploymenttextRequired
The deployment, written owner/name. Pick one of yours from the list.
Versionversion_idtext
Optional. Point the deployment at a different model version. Paste the 64-character version id, or read it from a 'List a model's versions' step.
Hardwarehardwaretext
Optional. Move the deployment onto different hardware.
Minimum instancesmin_instancesnumber
Optional. How many instances stay warm, from 0 to 5.From 0 to 5.
Maximum instancesmax_instancesnumber
Optional. How far it may scale up under load, from 0 to 20.From 0 to 20.

Outputs

created_attext
When this release was published (ISO 8601).
created_bytext
The username that published this release.
deploymenttext
The deployment, written owner/name.
hardwaretext
The hardware SKU it runs on.
max_instancesnumber
How far it may scale up under load.
min_instancesnumber
How many instances stay warm. 0 means nothing runs, and nothing is billed, until a prediction arrives.
modeltext
The model it serves, as owner/name.
nametext
Its name within that account.
ownertext
The account that owns it.
release_numbernumber
Which release it is serving. Every change publishes a new one.
version_idtext
The exact version it serves.
Example output
{
  "created_at": "2024-02-15T16:32:57.018467Z",
  "created_by": "acme",
  "deployment": "acme/my-app-image-generator",
  "hardware": "gpu-t4",
  "max_instances": 3,
  "min_instances": 0,
  "model": "stability-ai/sdxl",
  "name": "my-app-image-generator",
  "owner": "acme",
  "release_number": 1,
  "version_id": "da77bc59ee60423279fd632efb4795ab731d9e3ca9705ef3341091fb989b7eaf"
}

Update a model

Change a model's description, README or the links on its page. Fill in only what you want changed; anything left blank is left as it is.

Inputs

ModelmodeltextRequired
The model, written owner/name, for example replicate/hello-world. Pasting the model's page URL works too.
Descriptiondescriptiontext
Optional. A new one-line description.
READMEreadmetext
Optional. The model page's README, in Markdown.
GitHub URLgithub_urltext
Optional. Where the model's source code lives.
Paper URLpaper_urltext
Optional. The paper the model is based on.
Weights URLweights_urltext
Optional. Where the model's weights are published.
Licence URLlicense_urltext
Optional. The model's licence.

Outputs

cover_image_urltext
Its cover image.
descriptiontext
What the model does.
github_urltext
Its source code, if published.
input_schemaobject
The JSON Schema for the model's inputs, taken from the version's OpenAPI document. Its 'properties' are the names an input object may use, and 'required' the ones it must.
is_officialtrue/false
Whether Replicate maintains this model itself. Official models are always on and can be run by name.
latest_version_created_attext
When that version was published (ISO 8601).
latest_version_idtext
The version it currently resolves to.
license_urltext
Its licence, if published.
modeltext
The model, written owner/name.
nametext
The model's name within that owner.
output_schemaobject
The JSON Schema for whatever the model returns.
ownertext
The user or organization that owns it.
paper_urltext
Its paper, if there is one.
run_countnumber
How many times the model has been run.
urltext
The model's page on Replicate.
visibilitytext
'public' or 'private'.
Example output
{
  "cover_image_url": null,
  "description": "A tiny model that says hello",
  "github_url": "https://github.com/replicate/cog-examples",
  "input_schema": {
    "required": [
      "text"
    ],
    "type": "object"
  },
  "is_official": false,
  "latest_version_created_at": "2022-04-26T19:29:04.418669Z",
  "latest_version_id": "5c7d5dc6dd8bf75c1acaa8565735e7986bc5b66206b55cca93cb72c9bf15ccaa",
  "license_url": null,
  "model": "replicate/hello-world",
  "name": "hello-world",
  "output_schema": {
    "type": "string"
  },
  "owner": "replicate",
  "paper_url": null,
  "run_count": 5681081,
  "url": "https://replicate.com/replicate/hello-world",
  "visibility": "public"
}

Upload a file

Upload a file to Replicate and get back a URL you can hand to a model that takes a file input. Better than inlining a large file into every run: upload it once and reuse the URL. Replicate keeps the file for a limited time and reports when in expires_at.

Inputs

FilecontenttextRequired
The file to upload: choose one, or pick a file an earlier step produced. Plain text is uploaded as-is.
File namefilenametext
Optional. What to call the file on Replicate. Fills itself in from the file you chose.
Content typecontent_typetext
Optional. The file's MIME type, e.g. image/png. Worked out from the file you chose when left blank.
Metadatametadataobject
Optional. Name/value pairs of your own to store alongside the file, so a later step can tell what it was for.

Outputs

content_typetext
Its MIME type.
created_attext
When it was uploaded (ISO 8601).
expires_attext
When Replicate will delete it (ISO 8601). Files are not kept forever.
file_idtext
The file's id on Replicate.
metadataobject
Whatever metadata was attached at upload time.
nametext
The file name it was stored under.
sha256text
A SHA-256 checksum of the contents.
sizenumber
Its length in bytes.
urltext
The file's address on the API. Give this to a model that takes a file input.
Example output
{
  "content_type": "application/zip",
  "created_at": "2024-02-21T12:54:18.578761Z",
  "expires_at": "2024-02-22T12:54:18.578761Z",
  "file_id": "cneqzikepnug6xezperrr4z55o",
  "metadata": {
    "customer_reference_id": 123
  },
  "name": "example.zip",
  "sha256": "f047f8e745f9996c6e386064e06cb2007b8e6bc0a968a334fc0d2b2d64012066",
  "size": 69420,
  "url": "https://api.replicate.com/v1/files/cneqzikepnug6xezperrr4z55o"
}

On this page