Skip to main content
POST
/
api
/
v2
/
tenants
/
{tenant}
/
databases
/
{database}
/
collections
Creates a new collection under the specified database.
curl --request POST \
  --url https://api.trychroma.com/api/v2/tenants/{tenant}/databases/{database}/collections \
  --header 'Content-Type: application/json' \
  --header 'x-chroma-token: <api-key>' \
  --data '
{
  "name": "<string>",
  "configuration": "<unknown>",
  "get_or_create": true,
  "metadata": "<unknown>",
  "schema": "<unknown>"
}
'
{
  "configuration_json": {
    "embedding_function": "<unknown>",
    "hnsw": "<unknown>",
    "spann": "<unknown>"
  },
  "database": "<string>",
  "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "log_position": 123,
  "name": "<string>",
  "tenant": "<string>",
  "version": 123,
  "dimension": 123,
  "metadata": "<unknown>",
  "schema": "<unknown>"
}

Authorizations

x-chroma-token
string
header
required

Path Parameters

tenant
string
required

Tenant ID

database
string
required

Database name containing the new collection

Body

application/json
name
string
required
configuration
object
get_or_create
boolean
metadata
object
schema
object

Schema representation for collection index configurations

This represents the server-side schema structure used for index management

Response

Collection created successfully

configuration_json
object
required
database
string
required
id
string<uuid>
required

CollectionUuid is a wrapper around Uuid to provide a type for the collection id.

log_position
integer<int64>
required
name
string
required
tenant
string
required
version
integer<int32>
required
dimension
integer<int32> | null
metadata
object
schema
object

Schema representation for collection index configurations

This represents the server-side schema structure used for index management