cURL
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 ' { "configuration": null, "get_or_create": false, "metadata": { "key": "value" }, "name": "my_collection", "schema": null } '
{ "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>" }
Creates a new collection in a database.
Tenant UUID
Database name
Collection creation payload
Show child attributes
Schema representation for collection index configurations
This represents the server-side schema structure used for index management
Collection created successfully
Was this page helpful?