cURL
curl --request POST \ --url https://api.trychroma.com/api/v2/tenants/{tenant}/databases/{database}/collections/{collection_id}/query \ --header 'Content-Type: application/json' \ --header 'x-chroma-token: <api-key>' \ --data ' { "query_embeddings": [ [ 123 ] ], "where": "<unknown>", "where_document": "<unknown>", "ids": [ "<string>" ], "include": [ "distances" ], "n_results": 1 } '
{ "ids": [ [ "<string>" ] ], "include": [ "distances" ], "distances": [ [ 123 ] ], "documents": [ [ "<string>" ] ], "embeddings": [ [ [ 123 ] ] ], "metadatas": [ [ "<unknown>" ] ], "uris": [ [ "<string>" ] ] }
Tenant ID
Database name containing the collection
Collection ID to query
Limit for pagination
x >= 0
Offset for pagination
distances
documents
embeddings
metadatas
uris
Records matching the query
Show child attributes