v22

latestOpenAPI 3.1.0raw.githubusercontent.com2025-10-15361989.5 KB

Create a model

Create a model.

Example cURL request:

curl -s -X POST \
  -H "Authorization: Bearer $REPLICATE_API_TOKEN" \
  -H 'Content-Type: application/json' \
  -d '{"owner": "alice", "name": "hot-dog-detector", "description": "Detect hot dogs in images", "visibility": "public", "hardware": "cpu"}' \
  https://api.replicate.com/v1/models

The response will be a model object in the following format:

{
  "url": "https://replicate.com/alice/hot-dog-detector",
  "owner": "alice",
  "name": "hot-dog-detector",
  "description": "Detect hot dogs in images",
  "visibility": "public",
  "github_url": null,
  "paper_url": null,
  "license_url": null,
  "run_count": 0,
  "cover_image_url": null,
  "default_example": null,
  "latest_version": null,
}

Note that there is a limit of 1,000 models per account. For most purposes, we recommend using a single model and pushing new versions of the model as you make changes to it.

post/models

Request body

cover_image_urlstring

A URL for the model's cover image. This should be an image file.

descriptionstring

A description of the model.

github_urlstring

A URL for the model's source code on GitHub.

hardwarestring required

The SKU for the hardware used to run the model. Possible values can be retrieved from the hardware.list endpoint.

license_urlstring

A URL for the model's license.

namestring required

The name of the model. This must be unique among all models owned by the user or organization.

ownerstring 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.

paper_urlstring

A URL for the model's paper.

visibility'public' | 'private' 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.

Example request

{
  "description": "Detect hot dogs in images",
  "github_url": "https://github.com/alice/hot-dog-detector",
  "hardware": "cpu",
  "name": "hot-dog-detector",
  "owner": "alice",
  "paper_url": "https://arxiv.org/abs/2504.17639",
  "visibility": "public"
}

Response

Success

cover_image_urlstring uri nullable

A URL for the model's cover image

default_exampleobject nullable

The model's default example prediction

descriptionstring nullable

A description of the model

github_urlstring uri nullable

A URL for the model's source code on GitHub

is_officialboolean

Boolean indicating whether the model is officially maintained by Replicate. Official models are always on, have stable API interfaces, and predictable pricing.

latest_versionobject nullable

The model's latest version

license_urlstring uri nullable

A URL for the model's license

namestring

The name of the model

ownerstring

The name of the user or organization that owns the model

paper_urlstring uri nullable

A URL for the model's paper

run_countinteger

The number of times the model has been run

urlstring uri

The URL of the model on Replicate

visibility'public' | 'private'

Whether the model is public or private