v22

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

Get a model version

Example cURL request:

curl -s \
  -H "Authorization: Bearer $REPLICATE_API_TOKEN" \
  https://api.replicate.com/v1/models/replicate/hello-world/versions/5c7d5dc6dd8bf75c1acaa8565735e7986bc5b66206b55cca93cb72c9bf15ccaa

The response will be the version object:

{
  "id": "5c7d5dc6dd8bf75c1acaa8565735e7986bc5b66206b55cca93cb72c9bf15ccaa",
  "created_at": "2022-04-26T19:29:04.418669Z",
  "cog_version": "0.3.0",
  "openapi_schema": {...}
}

Every model describes its inputs and outputs with OpenAPI Schema Objects in the openapi_schema property.

The openapi_schema.components.schemas.Input property for the replicate/hello-world model looks like this:

{
  "type": "object",
  "title": "Input",
  "required": [
    "text"
  ],
  "properties": {
    "text": {
      "x-order": 0,
      "type": "string",
      "title": "Text",
      "description": "Text to prefix with 'hello '"
    }
  }
}

The openapi_schema.components.schemas.Output property for the replicate/hello-world model looks like this:

{
  "type": "string",
  "title": "Output"
}

For more details, see the docs on Cog's supported input and output types

get/models/{model_owner}/{model_name}/versions/{version_id}

Path parameters

model_ownerstring required

The name of the user or organization that owns the model.

model_namestring required

The name of the model.

version_idstring required

The ID of the version.

Response

Success

cog_versionstring nullable

The version of Cog used to create this version

created_atstring date-time

The date and time the version was created

idstring

The ID of the version

openapi_schemaobject nullable

The OpenAPI schema for the model's inputs and outputs