Collections

CollectionsResource

Methods

list() -> SyncCursorURLPage[]
get/collections

Example cURL request:

curl -s \
  -H "Authorization: Bearer $REPLICATE_API_TOKEN" \
  https://api.replicate.com/v1/collections

The response will be a paginated JSON list of collection objects:

{
  "next": "null",
  "previous": null,
  "results": [
    {
      "name": "Super resolution",
      "slug": "super-resolution",
      "description": "Upscaling models that create high-quality images from low-quality images."
    }
  ]
}
get() ->
get/collections/{collection_slug}

Example cURL request:

curl -s \
  -H "Authorization: Bearer $REPLICATE_API_TOKEN" \
  https://api.replicate.com/v1/collections/super-resolution

The response will be a collection object with a nested list of the models in that collection:

{
  "name": "Super resolution",
  "slug": "super-resolution",
  "description": "Upscaling models that create high-quality images from low-quality images.",
  "full_description": "## Overview\n\nThese models generate high-quality images from low-quality images. Many of these models are based on **advanced upscaling techniques**.\n\n### Key Features\n\n- Enhance image resolution\n- Restore fine details\n- Improve overall image quality",
  "models": [...]
}
Parameters
collection_slug: str
Returns
class CollectionGetResponse:
description: str

A description of the collection

models: List[]

The models in this collection

name: str

The name of the collection

slug: str

The slug of the collection (lowercase with dashes)

full_description: Optional[str]

The full description of the collection in markdown format

Request example
200Example