{"openapi":"3.1.0","info":{"title":"chroma-frontend","description":"","license":{"name":""},"version":"1.0.0"},"paths":{"/api/v2/auth/identity":{"get":{"tags":["Authentication"],"summary":"Get user identity","description":"Returns the current user's identity, tenant, and databases.","operationId":"get_user_identity","responses":{"200":{"description":"User identity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetUserIdentityResponse"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"ApiKeyAuth":[]}]}},"/api/v2/collections/{crn}":{"get":{"tags":["Collection"],"summary":"Get collection by CRN","description":"Returns a collection by Chroma Resource Name.","operationId":"get_collection_by_crn","parameters":[{"name":"crn","in":"path","description":"Chroma Resource Name","required":true,"schema":{"type":"string"},"example":"my_tenant:my_database:my_collection"}],"responses":{"200":{"description":"Collection found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Collection"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Collection not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"ApiKeyAuth":[]}],"x-hidden":true,"x-codeSamples":[{"label":"Get collection by CRN","lang":"typescript","source":"const collection = await client.getCollectionByCrn('my_tenant:my_database:my_collection');"},{"label":"Get collection by CRN","lang":"python","source":"collection = client.get_collection_by_crn('my_tenant:my_database:my_collection')"}]}},"/api/v2/healthcheck":{"get":{"tags":["System"],"summary":"Healthcheck","description":"Returns the health status of the service.","operationId":"healthcheck","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"string"}}}},"503":{"description":"Service Unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"x-codeSamples":[]}},"/api/v2/heartbeat":{"get":{"tags":["System"],"summary":"Heartbeat","description":"Returns a nanosecond timestamp of the current time.","operationId":"heartbeat","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HeartbeatResponse"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"x-codeSamples":[{"label":"Heartbeat","lang":"typescript","source":"const timestamp = await client.heartbeat();"},{"label":"Heartbeat","lang":"python","source":"timestamp = client.heartbeat()"},{"label":"Heartbeat","lang":"rust","source":"let timestamp = client.heartbeat().await?;"}]}},"/api/v2/pre-flight-checks":{"get":{"tags":["System"],"summary":"Pre-flight checks","description":"Returns basic readiness information.","operationId":"pre_flight_checks","responses":{"200":{"description":"Pre flight checks","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChecklistResponse"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v2/reset":{"post":{"tags":["System"],"summary":"Reset database","description":"Resets the database. Requires authorization.","operationId":"reset","responses":{"200":{"description":"Reset successful","content":{"text/plain":{"schema":{"type":"boolean"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"ApiKeyAuth":[]}],"x-hidden":true}},"/api/v2/tenants":{"post":{"tags":["Tenant"],"summary":"Create tenant","description":"Creates a new tenant.","operationId":"create_tenant","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateTenantPayload"}}},"required":true},"responses":{"200":{"description":"Tenant created successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateTenantResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"ApiKeyAuth":[]}]}},"/api/v2/tenants/{tenant_name}":{"get":{"tags":["Tenant"],"summary":"Get tenant","description":"Returns an existing tenant by name.","operationId":"get_tenant","parameters":[{"name":"tenant_name","in":"path","description":"Tenant UUID","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Tenant found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetTenantResponse"},"example":{"name":"1e30d217-3d78-4f8c-b244-79381dc6a254","resource_name":null}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Tenant not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"ApiKeyAuth":[]}]},"patch":{"tags":["Tenant"],"summary":"Update tenant","description":"Updates an existing tenant by name.","operationId":"update_tenant","parameters":[{"name":"tenant_name","in":"path","description":"Tenant UUID","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateTenantPayload"}}},"required":true},"responses":{"200":{"description":"Tenant updated successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateTenantResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Tenant not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Tenant resource name already set","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"ApiKeyAuth":[]}]}},"/api/v2/tenants/{tenant}/databases":{"get":{"tags":["Database"],"summary":"List databases","description":"Lists all databases for a tenant.","operationId":"list_databases","parameters":[{"name":"tenant","in":"path","description":"Tenant UUID","required":true,"schema":{"type":"string"},"example":"1e30d217-3d78-4f8c-b244-79381dc6a254"},{"name":"limit","in":"query","description":"Limit for pagination","required":false,"schema":{"type":"integer","format":"int32","minimum":1},"example":10},{"name":"offset","in":"query","description":"Offset for pagination","required":false,"schema":{"type":"integer","format":"int32","minimum":0},"example":0}],"responses":{"200":{"description":"List of databases","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Vec"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"ApiKeyAuth":[]}],"x-codeSamples":[{"label":"List Databases","lang":"terminal","source":"chroma db list"}]},"post":{"tags":["Database"],"summary":"Create database","description":"Creates a new database for a tenant.","operationId":"create_database","parameters":[{"name":"tenant","in":"path","description":"Tenant UUID","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateDatabasePayload"}}},"required":true},"responses":{"200":{"description":"Database created successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateDatabaseResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"ApiKeyAuth":[]}],"x-codeSamples":[{"label":"Create Database","lang":"terminal","source":"chroma db create my-new-db"}]}},"/api/v2/tenants/{tenant}/databases/{database}":{"get":{"tags":["Database"],"summary":"Get database","description":"Returns a database by name.","operationId":"get_database","parameters":[{"name":"tenant","in":"path","description":"Tenant UUID","required":true,"schema":{"type":"string"},"example":"1e30d217-3d78-4f8c-b244-79381dc6a254"},{"name":"database","in":"path","description":"Database name","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Database retrieved successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Database"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Database not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"ApiKeyAuth":[]}]},"delete":{"tags":["Database"],"summary":"Delete database","description":"Deletes a database by name.","operationId":"delete_database","parameters":[{"name":"tenant","in":"path","description":"Tenant UUID","required":true,"schema":{"type":"string"},"example":"1e30d217-3d78-4f8c-b244-79381dc6a254"},{"name":"database","in":"path","description":"Database name","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Database deleted successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteDatabaseResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Database not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"ApiKeyAuth":[]}],"x-codeSamples":[{"label":"Delete Database","lang":"terminal","source":"chroma db delete my-db"}]}},"/api/v2/tenants/{tenant}/databases/{database}/collections":{"get":{"tags":["Collection"],"summary":"List collections","description":"Lists all collections in a database.","operationId":"list_collections","parameters":[{"name":"tenant","in":"path","description":"Tenant UUID","required":true,"schema":{"type":"string"},"example":"1e30d217-3d78-4f8c-b244-79381dc6a254"},{"name":"database","in":"path","description":"Database name","required":true,"schema":{"type":"string"}},{"name":"limit","in":"query","description":"Limit for pagination","required":false,"schema":{"type":"integer","format":"int32","minimum":1},"example":10},{"name":"offset","in":"query","description":"Offset for pagination","required":false,"schema":{"type":"integer","format":"int32","minimum":0},"example":0}],"responses":{"200":{"description":"List of collections","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Vec"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"ApiKeyAuth":[]}],"x-codeSamples":[{"label":"List collections","lang":"typescript","source":"const collections = await client.listCollections({ limit: 10, offset: 0 });"},{"label":"List collections","lang":"python","source":"collections = client.list_collections()"},{"label":"List collections","lang":"rust","source":"let collections = client.list_collections(10, Some(0)).await?;"}]},"post":{"tags":["Collection"],"summary":"Create collection","description":"Creates a new collection in a database.","operationId":"create_collection","parameters":[{"name":"tenant","in":"path","description":"Tenant UUID","required":true,"schema":{"type":"string"},"example":"1e30d217-3d78-4f8c-b244-79381dc6a254"},{"name":"database","in":"path","description":"Database name","required":true,"schema":{"type":"string"}}],"requestBody":{"description":"Collection creation payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateCollectionPayload"},"example":{"configuration":null,"get_or_create":false,"metadata":{"key":"value"},"name":"my_collection","schema":null}}},"required":true},"responses":{"200":{"description":"Collection created successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Collection"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"ApiKeyAuth":[]}],"x-codeSamples":[{"label":"Create collection","lang":"typescript","source":"const collection = await client.createCollection({ name: 'my_collection' });"},{"label":"Create collection","lang":"python","source":"collection = client.create_collection(name='my_collection')"},{"label":"Create collection","lang":"rust","source":"let collection = client.get_or_create_collection(\"my_collection\", None).await?;"}]}},"/api/v2/tenants/{tenant}/databases/{database}/collections/by-id/{collection_id}":{"get":{"tags":["Collection"],"summary":"Get collection by ID","description":"Returns a collection by its UUID within a specific tenant and database.","operationId":"get_collection_by_id","parameters":[{"name":"tenant","in":"path","description":"Tenant ID","required":true,"schema":{"type":"string"}},{"name":"database","in":"path","description":"Database name","required":true,"schema":{"type":"string"}},{"name":"collection_id","in":"path","description":"Collection UUID","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Collection found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Collection"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Collection not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"ApiKeyAuth":[]}],"x-codeSamples":[{"label":"Get collection by ID","lang":"typescript","source":"const collection = await client.getCollectionById({ id: 'collection-uuid-here' });"},{"label":"Get collection by ID","lang":"python","source":"collection = client.get_collection_by_id(uuid.UUID('collection-uuid-here'))"}]}},"/api/v2/tenants/{tenant}/databases/{database}/collections/{collection_id}":{"get":{"tags":["Collection"],"summary":"Get collection","description":"Returns a collection by ID or name.","operationId":"get_collection","parameters":[{"name":"tenant","in":"path","description":"Tenant UUID","required":true,"schema":{"type":"string"},"example":"1e30d217-3d78-4f8c-b244-79381dc6a254"},{"name":"database","in":"path","description":"Database name","required":true,"schema":{"type":"string"}},{"name":"collection_id","in":"path","description":"Collection UUID","required":true,"schema":{"type":"string"},"example":"1e30d217-3d78-4f8c-b244-79381dc6a254"}],"responses":{"200":{"description":"Collection found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Collection"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Collection not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"ApiKeyAuth":[]}],"x-codeSamples":[{"label":"Get collection","lang":"typescript","source":"const collection = await client.getCollection({ name: 'my_collection' });"},{"label":"Get collection","lang":"python","source":"collection = client.get_collection(name='my_collection')"},{"label":"Get collection","lang":"rust","source":"let collection = client.get_collection(\"my_collection\").await?;"}]},"put":{"tags":["Collection"],"summary":"Update collection","description":"Updates an existing collection's name or metadata.","operationId":"update_collection","parameters":[{"name":"tenant","in":"path","description":"Tenant UUID","required":true,"schema":{"type":"string"},"example":"1e30d217-3d78-4f8c-b244-79381dc6a254"},{"name":"database","in":"path","description":"Database name","required":true,"schema":{"type":"string"}},{"name":"collection_id","in":"path","description":"Collection UUID","required":true,"schema":{"type":"string"},"example":"1e30d217-3d78-4f8c-b244-79381dc6a254"}],"requestBody":{"description":"Collection update payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateCollectionPayload"},"example":{"new_configuration":null,"new_metadata":{"key":"value"},"new_name":"updated_collection_name"}}},"required":true},"responses":{"200":{"description":"Collection updated successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateCollectionResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Collection not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"ApiKeyAuth":[]}],"x-codeSamples":[{"label":"Update collection","lang":"typescript","source":"await collection.modify({ name: 'new_name', metadata: { key: 'value' } });"},{"label":"Update collection","lang":"python","source":"collection.modify(name='new_name', metadata={'key': 'value'})"},{"label":"Update collection","lang":"rust","source":"use chroma_types::Metadata;\nlet mut metadata = Metadata::new();\nmetadata.insert(\"key\".to_string(), \"value\".into());\ncollection.modify(Some(\"new_name\"), Some(metadata)).await?;"}]},"delete":{"tags":["Collection"],"summary":"Delete collection","description":"Deletes a collection in a database.","operationId":"delete_collection","parameters":[{"name":"tenant","in":"path","description":"Tenant UUID","required":true,"schema":{"type":"string"},"example":"1e30d217-3d78-4f8c-b244-79381dc6a254"},{"name":"database","in":"path","description":"Database name","required":true,"schema":{"type":"string"}},{"name":"collection_id","in":"path","description":"Collection UUID","required":true,"schema":{"type":"string"},"example":"1e30d217-3d78-4f8c-b244-79381dc6a254"}],"responses":{"200":{"description":"Collection deleted successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteCollectionResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Collection not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"ApiKeyAuth":[]}],"x-codeSamples":[{"label":"Delete collection","lang":"typescript","source":"await client.deleteCollection({ name: 'my_collection' });"},{"label":"Delete collection","lang":"python","source":"client.delete_collection(name='my_collection')"},{"label":"Delete collection","lang":"rust","source":"client.delete_collection(\"my_collection\").await?;"}]}},"/api/v2/tenants/{tenant}/databases/{database}/collections/{collection_id}/add":{"post":{"tags":["Record"],"summary":"Add records","description":"Adds records to a collection.","operationId":"collection_add","parameters":[{"name":"tenant","in":"path","description":"Tenant UUID","required":true,"schema":{"type":"string"},"example":"1e30d217-3d78-4f8c-b244-79381dc6a254"},{"name":"database","in":"path","description":"Database name","required":true,"schema":{"type":"string"}},{"name":"collection_id","in":"path","description":"Collection UUID","required":true,"schema":{"type":"string"},"example":"1e30d217-3d78-4f8c-b244-79381dc6a254"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddCollectionRecordsPayload"}}},"required":true},"responses":{"201":{"description":"Collection added successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddCollectionRecordsResponse"}}}},"400":{"description":"Invalid data for collection addition"}},"security":[{"ApiKeyAuth":[]}],"x-codeSamples":[{"label":"Add records","lang":"typescript","source":"await collection.add({ ids: ['id1', 'id2'], embeddings: [[0.1, 0.2], [0.3, 0.4]], documents: ['doc1', 'doc2'] });"},{"label":"Add records","lang":"python","source":"collection.add(ids=['id1', 'id2'], embeddings=[[0.1, 0.2], [0.3, 0.4]], documents=['doc1', 'doc2'])"},{"label":"Add records","lang":"rust","source":"collection.add(\n    vec![\"id1\".to_string(), \"id2\".to_string()],\n    vec![vec![0.1, 0.2], vec![0.3, 0.4]],\n    Some(vec![Some(\"doc1\".to_string()), Some(\"doc2\".to_string())]),\n    None,\n    None\n).await?;"}]}},"/api/v2/tenants/{tenant}/databases/{database}/collections/{collection_id}/attached_functions/{name}/detach":{"post":{"tags":["Function"],"summary":"Detach function","description":"Detaches a function from a collection.","operationId":"detach_function","parameters":[{"name":"tenant","in":"path","description":"Tenant UUID","required":true,"schema":{"type":"string"},"example":"1e30d217-3d78-4f8c-b244-79381dc6a254"},{"name":"database","in":"path","description":"Database name","required":true,"schema":{"type":"string"}},{"name":"collection_id","in":"path","description":"Collection UUID","required":true,"schema":{"type":"string"},"example":"1e30d217-3d78-4f8c-b244-79381dc6a254"},{"name":"name","in":"path","description":"Function name","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DetachFunctionRequest"}}},"required":true},"responses":{"200":{"description":"Function detached successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DetachFunctionResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"ApiKeyAuth":[]}]}},"/api/v2/tenants/{tenant}/databases/{database}/collections/{collection_id}/count":{"get":{"tags":["Record"],"summary":"Get number of records","description":"Returns the number of records in a collection.","operationId":"collection_count","parameters":[{"name":"tenant","in":"path","description":"Tenant UUID","required":true,"schema":{"type":"string"},"example":"1e30d217-3d78-4f8c-b244-79381dc6a254"},{"name":"database","in":"path","description":"Database name","required":true,"schema":{"type":"string"}},{"name":"collection_id","in":"path","description":"Collection UUID","required":true,"schema":{"type":"string"},"example":"1e30d217-3d78-4f8c-b244-79381dc6a254"},{"name":"read_level","in":"query","description":"Read level for consistency vs performance tradeoffs","required":false,"schema":{"$ref":"#/components/schemas/ReadLevel"}}],"responses":{"200":{"description":"Number of records in the collection","content":{"application/json":{"schema":{"$ref":"#/components/schemas/u32"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Collection not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"ApiKeyAuth":[]}],"x-codeSamples":[{"label":"Count records","lang":"typescript","source":"const count = await collection.count();"},{"label":"Count records","lang":"python","source":"count = collection.count()"},{"label":"Count records","lang":"rust","source":"let count = collection.count().await?;"}]}},"/api/v2/tenants/{tenant}/databases/{database}/collections/{collection_id}/delete":{"post":{"tags":["Record"],"summary":"Delete records","description":"Deletes records in a collection. Can filter by IDs or metadata.","operationId":"collection_delete","parameters":[{"name":"tenant","in":"path","description":"Tenant UUID","required":true,"schema":{"type":"string"},"example":"1e30d217-3d78-4f8c-b244-79381dc6a254"},{"name":"database","in":"path","description":"Database name","required":true,"schema":{"type":"string"}},{"name":"collection_id","in":"path","description":"Collection UUID","required":true,"schema":{"type":"string"},"example":"1e30d217-3d78-4f8c-b244-79381dc6a254"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteCollectionRecordsPayload"}}},"required":true},"responses":{"200":{"description":"Records deleted successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteCollectionRecordsResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Collection not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"ApiKeyAuth":[]}],"x-codeSamples":[{"label":"Delete records by IDs","lang":"typescript","source":"await collection.delete({ ids: ['id1', 'id2'] });"},{"label":"Delete records by metadata filter","lang":"typescript","source":"await collection.delete({ where: { category: 'old' } });"},{"label":"Delete records by IDs","lang":"python","source":"collection.delete(ids=['id1', 'id2'])"},{"label":"Delete records by metadata filter","lang":"python","source":"collection.delete(where={'category': 'old'})"},{"label":"Delete records by IDs","lang":"rust","source":"collection.delete(Some(vec![\"id1\".to_string(), \"id2\".to_string()]), None).await?;"},{"label":"Delete records by metadata filter","lang":"rust","source":"use chroma_types::{Where, MetadataExpression, MetadataComparison, MetadataValue, PrimitiveOperator};\nlet where_clause = Where::Metadata(MetadataExpression {\n    key: \"category\".to_string(),\n    comparison: MetadataComparison::Primitive(PrimitiveOperator::Equal, MetadataValue::Str(\"old\".to_string())),\n});\ncollection.delete(None, Some(where_clause)).await?;"}]}},"/api/v2/tenants/{tenant}/databases/{database}/collections/{collection_id}/fork":{"post":{"tags":["Collection"],"summary":"Fork collection","description":"Creates a fork of an existing collection.","operationId":"fork_collection","parameters":[{"name":"tenant","in":"path","description":"Tenant UUID","required":true,"schema":{"type":"string"},"example":"1e30d217-3d78-4f8c-b244-79381dc6a254"},{"name":"database","in":"path","description":"Database name","required":true,"schema":{"type":"string"}},{"name":"collection_id","in":"path","description":"Collection UUID","required":true,"schema":{"type":"string"},"example":"1e30d217-3d78-4f8c-b244-79381dc6a254"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForkCollectionPayload"}}},"required":true},"responses":{"200":{"description":"Collection forked successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Collection"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Collection not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"ApiKeyAuth":[]}],"x-codeSamples":[{"label":"Fork collection","lang":"typescript","source":"const forked = await collection.fork({ name: 'forked_collection' });"},{"label":"Fork collection","lang":"python","source":"forked = collection.fork(new_name='forked_collection')"},{"label":"Fork collection","lang":"rust","source":"let forked = collection.fork(\"forked_collection\").await?;"}]}},"/api/v2/tenants/{tenant}/databases/{database}/collections/{collection_id}/fork_count":{"get":{"tags":["Collection"],"summary":"Get fork count","description":"Returns the number of forks for a collection.","operationId":"fork_count","parameters":[{"name":"tenant","in":"path","description":"Tenant UUID","required":true,"schema":{"type":"string"},"example":"1e30d217-3d78-4f8c-b244-79381dc6a254"},{"name":"database","in":"path","description":"Database name","required":true,"schema":{"type":"string"}},{"name":"collection_id","in":"path","description":"Collection UUID","required":true,"schema":{"type":"string"},"example":"1e30d217-3d78-4f8c-b244-79381dc6a254"}],"responses":{"200":{"description":"Fork count retrieved successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForkCountResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Collection not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"ApiKeyAuth":[]}],"x-codeSamples":[{"label":"Get fork count","lang":"typescript","source":"const count = await collection.forkCount();"},{"label":"Get fork count","lang":"python","source":"count = collection.fork_count()"}]}},"/api/v2/tenants/{tenant}/databases/{database}/collections/{collection_id}/functions/attach":{"post":{"tags":["Function"],"summary":"Attach function","description":"Attaches a function to a collection.","operationId":"attach_function","parameters":[{"name":"tenant","in":"path","description":"Tenant UUID","required":true,"schema":{"type":"string"},"example":"1e30d217-3d78-4f8c-b244-79381dc6a254"},{"name":"database","in":"path","description":"Database name","required":true,"schema":{"type":"string"}},{"name":"collection_id","in":"path","description":"Collection UUID","required":true,"schema":{"type":"string"},"example":"1e30d217-3d78-4f8c-b244-79381dc6a254"}],"requestBody":{"description":"Function attachment request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AttachFunctionRequest"},"example":{"function_id":"1e30d217-3d78-4f8c-b244-79381dc6a254","name":"my_function","output_collection":"output_collection_name","params":{}}}},"required":true},"responses":{"200":{"description":" Function attached successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AttachFunctionResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"ApiKeyAuth":[]}]}},"/api/v2/tenants/{tenant}/databases/{database}/collections/{collection_id}/functions/{function_name}":{"get":{"tags":["Function"],"summary":"Get attached function","description":"Returns an attached function by name.","operationId":"get_attached_function","parameters":[{"name":"tenant","in":"path","description":"Tenant UUID","required":true,"schema":{"type":"string"},"example":"1e30d217-3d78-4f8c-b244-79381dc6a254"},{"name":"database","in":"path","description":"Database name","required":true,"schema":{"type":"string"}},{"name":"collection_id","in":"path","description":"Collection UUID","required":true,"schema":{"type":"string"},"example":"1e30d217-3d78-4f8c-b244-79381dc6a254"},{"name":"function_name","in":"path","description":"Function name","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Attached function retrieved successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetAttachedFunctionResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Attached function not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"ApiKeyAuth":[]}]}},"/api/v2/tenants/{tenant}/databases/{database}/collections/{collection_id}/get":{"post":{"tags":["Record"],"summary":"Get records","description":"Returns records from a collection by ID or metadata filter.","operationId":"collection_get","parameters":[{"name":"tenant","in":"path","description":"Tenant UUID","required":true,"schema":{"type":"string"},"example":"1e30d217-3d78-4f8c-b244-79381dc6a254"},{"name":"database","in":"path","description":"Database name","required":true,"schema":{"type":"string"}},{"name":"collection_id","in":"path","description":"Collection UUID","required":true,"schema":{"type":"string"},"example":"1e30d217-3d78-4f8c-b244-79381dc6a254"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetRequestPayload"}}},"required":true},"responses":{"200":{"description":"Records retrieved from the collection","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetResponse"},"example":{"documents":["Document 1","Document 2"],"embeddings":[[0.1,0.2,0.3],[0.4,0.5,0.6]],"ids":["record1","record2"],"include":["documents","metadatas","embeddings"],"metadatas":[{"key":"value"},{"key2":"value2"}],"uris":null}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Collection not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"ApiKeyAuth":[]}],"x-codeSamples":[{"label":"Get records by IDs","lang":"typescript","source":"const results = await collection.get({ ids: ['id1', 'id2'] });"},{"label":"Get records by metadata filter","lang":"typescript","source":"const results = await collection.get({ where: { category: 'science' }, limit: 10 });"},{"label":"Get records by IDs","lang":"python","source":"results = collection.get(ids=['id1', 'id2'])"},{"label":"Get records by metadata filter","lang":"python","source":"results = collection.get(where={'category': 'science'}, limit=10)"},{"label":"Get records by IDs","lang":"rust","source":"use chroma_types::IncludeList;\nlet response = collection.get(\n    Some(vec![\"id1\".to_string(), \"id2\".to_string()]),\n    None,\n    None,\n    None,\n    Some(IncludeList::default_get())\n).await?;"},{"label":"Get records by metadata filter","lang":"rust","source":"use chroma_types::{Where, MetadataExpression, MetadataComparison, MetadataValue, PrimitiveOperator, IncludeList};\nlet where_clause = Where::Metadata(MetadataExpression {\n    key: \"category\".to_string(),\n    comparison: MetadataComparison::Primitive(PrimitiveOperator::Equal, MetadataValue::Str(\"science\".to_string())),\n});\nlet response = collection.get(None, Some(where_clause), Some(10), None, None).await?;"}]}},"/api/v2/tenants/{tenant}/databases/{database}/collections/{collection_id}/indexing_status":{"get":{"tags":["Record"],"summary":"Get indexing status","description":"Returns the indexing status of a collection.","operationId":"indexing_status","parameters":[{"name":"tenant","in":"path","description":"Tenant UUID","required":true,"schema":{"type":"string"},"example":"1e30d217-3d78-4f8c-b244-79381dc6a254"},{"name":"database","in":"path","description":"Database name","required":true,"schema":{"type":"string"}},{"name":"collection_id","in":"path","description":"Collection UUID","required":true,"schema":{"type":"string"},"example":"1e30d217-3d78-4f8c-b244-79381dc6a254"}],"responses":{"200":{"description":"Index status retrieved successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IndexStatusResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Collection not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"ApiKeyAuth":[]}],"x-codeSamples":[{"label":"Get indexing status","lang":"typescript","source":"const status: IndexingStatus = await collection.getIndexingStatus();"},{"label":"Get indexing status","lang":"python","source":"status = collection.get_indexing_status()"},{"label":"Get indexing status","lang":"rust","source":"let status = collection.get_indexing_status().await?;"}]}},"/api/v2/tenants/{tenant}/databases/{database}/collections/{collection_id}/query":{"post":{"tags":["Record"],"summary":"Query collection","description":"Queries a collection using dense vector search with metadata and full-text search filtering.","operationId":"collection_query","parameters":[{"name":"tenant","in":"path","description":"Tenant UUID","required":true,"schema":{"type":"string"},"example":"1e30d217-3d78-4f8c-b244-79381dc6a254"},{"name":"database","in":"path","description":"Database name","required":true,"schema":{"type":"string"}},{"name":"collection_id","in":"path","description":"Collection UUID","required":true,"schema":{"type":"string"},"example":"1e30d217-3d78-4f8c-b244-79381dc6a254"},{"name":"limit","in":"query","description":"Limit for pagination","required":false,"schema":{"type":"integer","format":"int32","minimum":1},"example":10},{"name":"offset","in":"query","description":"Offset for pagination","required":false,"schema":{"type":"integer","format":"int32","minimum":0},"example":0}],"requestBody":{"description":"Query request payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QueryRequestPayload"},"example":{"include":["documents","metadatas","distances"],"n_results":10,"query_embeddings":[[0.1,0.2,0.3]]}}},"required":true},"responses":{"200":{"description":"Records matching the query","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QueryResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Collection not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"ApiKeyAuth":[]}],"x-codeSamples":[{"label":"Query with embeddings","lang":"typescript","source":"const results = await collection.query({ queryEmbeddings: [[0.1, 0.2, 0.3]], nResults: 10 });"},{"label":"Query with text","lang":"typescript","source":"const results = await collection.query({ queryTexts: ['search text'], nResults: 10 });"},{"label":"Query with embeddings","lang":"python","source":"results = collection.query(query_embeddings=[[0.1, 0.2, 0.3]], n_results=10)"},{"label":"Query with text","lang":"python","source":"results = collection.query(query_texts=['search text'], n_results=10)"},{"label":"Query with embeddings","lang":"rust","source":"let results = collection.query(\n    vec![vec![0.1, 0.2, 0.3]],\n    Some(10),\n    None,\n    None,\n    None\n).await?;"},{"label":"Query with metadata filter","lang":"rust","source":"use chroma_types::{Where, MetadataExpression, MetadataComparison, MetadataValue, PrimitiveOperator};\nlet where_clause = Where::Metadata(MetadataExpression {\n    key: \"category\".to_string(),\n    comparison: MetadataComparison::Primitive(PrimitiveOperator::Equal, MetadataValue::Str(\"science\".to_string())),\n});\nlet results = collection.query(\n    vec![vec![0.1, 0.2, 0.3]],\n    Some(10),\n    Some(where_clause),\n    None,\n    None\n).await?;"}]}},"/api/v2/tenants/{tenant}/databases/{database}/collections/{collection_id}/search":{"post":{"tags":["Record"],"summary":"Search records","description":"Searches records from a collection with dense, sparse, or hybrid vector search.","operationId":"collection_search","parameters":[{"name":"tenant","in":"path","description":"Tenant UUID","required":true,"schema":{"type":"string"},"example":"1e30d217-3d78-4f8c-b244-79381dc6a254"},{"name":"database","in":"path","description":"Database name","required":true,"schema":{"type":"string"}},{"name":"collection_id","in":"path","description":"Collection UUID","required":true,"schema":{"type":"string"},"example":"1e30d217-3d78-4f8c-b244-79381dc6a254"}],"requestBody":{"description":"Search request payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchRequestPayload"},"example":{"read_level":"IndexAndWal","searches":[{"n_results":10,"query_embeddings":[[0.1,0.2,0.3]]}]}}},"required":true},"responses":{"200":{"description":"Records searched from the collection","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Collection not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"ApiKeyAuth":[]}],"x-codeSamples":[{"label":"Search with embeddings","lang":"typescript","source":"import { Search, K, Knn } from 'chromadb';\nconst results = await collection.search(new Search().rank(Knn({ query: [0.1, 0.2, 0.3], limit: 10 })));"},{"label":"Search with embeddings","lang":"python","source":"from chromadb import Search, Knn\nsearch = Search().rank(Knn(query=[0.1, 0.2, 0.3], limit=10))\nresults = collection.search(search)"},{"label":"Search with embeddings","lang":"rust","source":"use chroma_types::plan::{SearchPayload, ReadLevel};\nuse chroma_types::operator::{RankExpr, QueryVector, Key};\nlet search = SearchPayload::default()\n    .rank(RankExpr::Knn {\n        query: QueryVector::Dense(vec![0.1, 0.2, 0.3]),\n        key: Key::Embedding,\n        limit: 10,\n        default: None,\n        return_rank: false,\n    })\n    .limit(Some(10), 0)\n    .select([Key::Document, Key::Score]);\nlet results = collection.search(vec![search]).await?;"},{"label":"Search with metadata filter","lang":"rust","source":"use chroma_types::plan::{SearchPayload, ReadLevel};\nuse chroma_types::operator::{RankExpr, QueryVector, Key};\nlet search = SearchPayload::default()\n    .r#where(Key::field(\"category\").eq(\"science\"))\n    .rank(RankExpr::Knn {\n        query: QueryVector::Dense(vec![0.1, 0.2, 0.3]),\n        key: Key::Embedding,\n        limit: 100,\n        default: None,\n        return_rank: false,\n    })\n    .limit(Some(10), 0)\n    .select([Key::Document, Key::Score]);\nlet results = collection.search(vec![search]).await?;"}]}},"/api/v2/tenants/{tenant}/databases/{database}/collections/{collection_id}/update":{"post":{"tags":["Record"],"summary":"Update records","description":"Updates records in a collection by ID.","operationId":"collection_update","parameters":[{"name":"tenant","in":"path","description":"Tenant UUID","required":true,"schema":{"type":"string"},"example":"1e30d217-3d78-4f8c-b244-79381dc6a254"},{"name":"database","in":"path","description":"Database name","required":true,"schema":{"type":"string"}},{"name":"collection_id","in":"path","description":"Collection UUID","required":true,"schema":{"type":"string"},"example":"1e30d217-3d78-4f8c-b244-79381dc6a254"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateCollectionRecordsPayload"}}},"required":true},"responses":{"200":{"description":"Collection updated successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateCollectionRecordsResponse"}}}},"404":{"description":"Collection not found"}},"security":[{"ApiKeyAuth":[]}],"x-codeSamples":[{"label":"Update records","lang":"typescript","source":"await collection.update({ ids: ['id1'], documents: ['updated doc'], metadatas: [{ key: 'value' }] });"},{"label":"Update records","lang":"python","source":"collection.update(ids=['id1'], documents=['updated doc'], metadatas=[{'key': 'value'}])"},{"label":"Update records","lang":"rust","source":"use chroma_types::UpdateMetadata;\nlet mut metadata = UpdateMetadata::new();\nmetadata.insert(\"key\".to_string(), chroma_types::UpdateMetadataValue::Str(\"value\".to_string()));\ncollection.update(\n    vec![\"id1\".to_string()],\n    None,\n    Some(vec![Some(\"updated doc\".to_string())]),\n    None,\n    Some(vec![Some(metadata)])\n).await?;"}]}},"/api/v2/tenants/{tenant}/databases/{database}/collections/{collection_id}/upsert":{"post":{"tags":["Record"],"summary":"Upsert records","description":"Upserts records in a collection (create if not exists, otherwise update).","operationId":"collection_upsert","parameters":[{"name":"tenant","in":"path","description":"Tenant UUID","required":true,"schema":{"type":"string"},"example":"1e30d217-3d78-4f8c-b244-79381dc6a254"},{"name":"database","in":"path","description":"Database name","required":true,"schema":{"type":"string"}},{"name":"collection_id","in":"path","description":"Collection UUID","required":true,"schema":{"type":"string"},"example":"1e30d217-3d78-4f8c-b244-79381dc6a254"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpsertCollectionRecordsPayload"}}},"required":true},"responses":{"200":{"description":"Records upserted successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpsertCollectionRecordsResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Collection not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"ApiKeyAuth":[]}],"x-codeSamples":[{"label":"Upsert records","lang":"typescript","source":"await collection.upsert({ ids: ['id1', 'id2'], embeddings: [[0.1, 0.2], [0.3, 0.4]], documents: ['doc1', 'doc2'] });"},{"label":"Upsert records","lang":"python","source":"collection.upsert(ids=['id1', 'id2'], embeddings=[[0.1, 0.2], [0.3, 0.4]], documents=['doc1', 'doc2'])"},{"label":"Upsert records","lang":"rust","source":"collection.upsert(\n    vec![\"id1\".to_string(), \"id2\".to_string()],\n    vec![vec![0.1, 0.2], vec![0.3, 0.4]],\n    Some(vec![Some(\"doc1\".to_string()), Some(\"doc2\".to_string())]),\n    None,\n    None\n).await?;"}]}},"/api/v2/tenants/{tenant}/databases/{database}/collections_count":{"get":{"tags":["Collection"],"summary":"Get number of collections","description":"Returns the total number of collections in a database.","operationId":"count_collections","parameters":[{"name":"tenant","in":"path","description":"Tenant UUID","required":true,"schema":{"type":"string"},"example":"1e30d217-3d78-4f8c-b244-79381dc6a254"},{"name":"database","in":"path","description":"Database name","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Count of collections","content":{"application/json":{"schema":{"$ref":"#/components/schemas/u32"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"security":[{"ApiKeyAuth":[]}],"x-codeSamples":[{"label":"Count collections","lang":"typescript","source":"const count: number = await client.countCollections();"},{"label":"Count collections","lang":"python","source":"count = client.count_collections()"},{"label":"Count collections","lang":"rust","source":"let count = client.count_collections().await?;"}]}},"/api/v2/version":{"get":{"tags":["System"],"summary":"Get version","description":"Returns the version of the server.","operationId":"version","responses":{"200":{"description":"Get server version","content":{"text/plain":{"schema":{"type":"string"}}}}},"x-codeSamples":[{"label":"Get version","lang":"typescript","source":"const version = await client.version();"},{"label":"Get version","lang":"python","source":"version = client.get_version()"}]}}},"components":{"schemas":{"AddCollectionRecordsPayload":{"type":"object","description":"Payload for adding records to a collection.\n\nRecords are added in batches. All arrays must have the same length, with each index\nrepresenting a single record. For example, `ids[0]`, `embeddings[0]`, `documents[0]`, etc.\nall belong to the same record.","required":["ids","embeddings"],"properties":{"documents":{"type":["array","null"],"items":{"type":["string","null"]}},"embeddings":{"$ref":"#/components/schemas/EmbeddingsPayload","description":"Embeddings for each record. Can contain the raw f32 arrays or base64 encoded strings."},"ids":{"type":"array","items":{"type":"string"},"description":"Unique identifiers for each record."},"metadatas":{"type":["array","null"],"items":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/HashMap"}]}},"uris":{"type":["array","null"],"items":{"type":["string","null"]}}}},"AddCollectionRecordsResponse":{"type":"object"},"AttachFunctionRequest":{"type":"object","required":["name","function_id","output_collection"],"properties":{"function_id":{"type":"string"},"name":{"type":"string"},"output_collection":{"type":"string"},"params":{}}},"AttachFunctionResponse":{"type":"object","required":["attached_function","created"],"properties":{"attached_function":{"$ref":"#/components/schemas/AttachedFunctionInfo"},"created":{"type":"boolean","description":"True if newly created, false if already existed (idempotent request)."}}},"AttachedFunctionApiResponse":{"type":"object","description":"API response struct for attached function with function_name instead of function_id","required":["id","name","function_name","input_collection_id","output_collection","tenant_id","database_id","completion_offset","min_records_for_invocation"],"properties":{"completion_offset":{"type":"integer","format":"int64","description":"Completion offset: the WAL position up to which the attached function has processed records","minimum":0},"database_id":{"type":"string","description":"Database name this attached function belongs to"},"function_name":{"type":"string","description":"Name of the function (e.g., \"record_counter\", \"statistics\")"},"id":{"$ref":"#/components/schemas/AttachedFunctionUuid","description":"Unique identifier for the attached function"},"input_collection_id":{"$ref":"#/components/schemas/CollectionUuid","description":"Source collection that triggers the attached function"},"min_records_for_invocation":{"type":"integer","format":"int64","description":"Minimum number of new records required before the attached function runs again","minimum":0},"name":{"type":"string","description":"Human-readable name for the attached function instance"},"output_collection":{"type":"string","description":"Name of target collection where attached function output is stored"},"output_collection_id":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/CollectionUuid","description":"ID of the output collection (lazily filled in after creation)"}]},"params":{"type":["string","null"],"description":"Optional JSON parameters for the function"},"tenant_id":{"type":"string","description":"Tenant name this attached function belongs to"}}},"AttachedFunctionInfo":{"type":"object","required":["id","name","function_name"],"properties":{"function_name":{"type":"string","description":"Name of the function (e.g., \"record_counter\", \"statistics\")."},"id":{"type":"string","description":"Unique identifier for the attached function."},"name":{"type":"string","description":"Human-readable name for the attached function instance."}}},"AttachedFunctionUuid":{"type":"string","format":"uuid","description":"AttachedFunctionUuid is a wrapper around Uuid to provide a type for attached function identifiers."},"BoolInvertedIndexConfig":{"type":"object","additionalProperties":false},"BoolInvertedIndexType":{"type":"object","required":["enabled","config"],"properties":{"config":{"$ref":"#/components/schemas/BoolInvertedIndexConfig"},"enabled":{"type":"boolean"}}},"BoolValueType":{"type":"object","description":"Boolean value type index configurations","properties":{"bool_inverted_index":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/BoolInvertedIndexType"}]}}},"ChecklistResponse":{"type":"object","required":["max_batch_size","supports_base64_encoding"],"properties":{"max_batch_size":{"type":"integer","format":"int32","minimum":0},"supports_base64_encoding":{"type":"boolean"}}},"Collection":{"type":"object","required":["id","name","configuration_json","tenant","database","log_position","version"],"properties":{"configuration_json":{"$ref":"#/components/schemas/CollectionConfiguration"},"database":{"type":"string"},"dimension":{"type":["integer","null"],"format":"int32"},"id":{"$ref":"#/components/schemas/CollectionUuid"},"log_position":{"type":"integer","format":"int64"},"metadata":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/HashMap"}]},"name":{"type":"string"},"schema":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/Schema"}]},"tenant":{"type":"string"},"version":{"type":"integer","format":"int32"}}},"CollectionConfiguration":{"type":"object","properties":{"embedding_function":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/EmbeddingFunctionConfiguration"}]},"hnsw":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/HnswConfiguration"}]},"spann":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/SpannConfiguration"}]}}},"CollectionUuid":{"type":"string","format":"uuid"},"CreateCollectionPayload":{"type":"object","required":["name"],"properties":{"configuration":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/CollectionConfiguration"}]},"get_or_create":{"type":"boolean"},"metadata":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/HashMap"}]},"name":{"type":"string"},"schema":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/Schema"}]}}},"CreateDatabasePayload":{"type":"object","required":["name"],"properties":{"name":{"type":"string"}}},"CreateDatabaseResponse":{"type":"object"},"CreateTenantPayload":{"type":"object","required":["name"],"properties":{"name":{"type":"string"}}},"CreateTenantResponse":{"type":"object"},"Database":{"type":"object","required":["id","name","tenant"],"properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"tenant":{"type":"string"}}},"DeleteCollectionRecordsPayload":{"allOf":[{"$ref":"#/components/schemas/RawWhereFields"},{"type":"object","properties":{"ids":{"type":["array","null"],"items":{"type":"string"}},"limit":{"type":["integer","null"],"format":"int32","minimum":0}}}],"description":"Payload for deleting records from a collection.\n\nRecords can be deleted by their IDs or by a metadata filter. At least one of `ids` or `where`\nmust be provided."},"DeleteCollectionRecordsResponse":{"type":"object","properties":{"deleted":{"type":"integer","format":"int32","minimum":0}}},"DeleteCollectionResponse":{"type":"object"},"DeleteDatabaseResponse":{"type":"object"},"DetachFunctionRequest":{"type":"object","properties":{"delete_output":{"type":"boolean","description":"Whether to delete the output collection as well when detaching the function."}}},"DetachFunctionResponse":{"type":"object","required":["success"],"properties":{"success":{"type":"boolean"}}},"EmbeddingFunctionConfiguration":{"oneOf":[{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["legacy"]}}},{"allOf":[{"$ref":"#/components/schemas/EmbeddingFunctionNewConfiguration"},{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["known"]}}}]},{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["unknown"]}}}]},"EmbeddingFunctionNewConfiguration":{"type":"object","required":["name","config"],"properties":{"config":{},"name":{"type":"string"}}},"EmbeddingsPayload":{"oneOf":[{"type":"array","items":{"type":"array","items":{"type":"number","format":"float"}}},{"type":"array","items":{"type":"string"}}]},"ErrorResponse":{"type":"object","required":["error","message"],"properties":{"error":{"type":"string"},"message":{"type":"string"}}},"FloatInvertedIndexConfig":{"type":"object","additionalProperties":false},"FloatInvertedIndexType":{"type":"object","required":["enabled","config"],"properties":{"config":{"$ref":"#/components/schemas/FloatInvertedIndexConfig"},"enabled":{"type":"boolean"}}},"FloatListValueType":{"type":"object","description":"Float list value type index configurations (for vectors)","properties":{"vector_index":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/VectorIndexType"}]}}},"FloatValueType":{"type":"object","description":"Float value type index configurations","properties":{"float_inverted_index":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/FloatInvertedIndexType"}]}}},"ForkCollectionPayload":{"type":"object","required":["new_name"],"properties":{"new_name":{"type":"string"}}},"ForkCountResponse":{"type":"object","description":"Response containing the fork count for a collection.","required":["count"],"properties":{"count":{"type":"integer","description":"The number of forks for this collection.","minimum":0}}},"FtsIndexConfig":{"type":"object","additionalProperties":false},"FtsIndexType":{"type":"object","required":["enabled","config"],"properties":{"config":{"$ref":"#/components/schemas/FtsIndexConfig"},"enabled":{"type":"boolean"}}},"GetAttachedFunctionResponse":{"type":"object","required":["attached_function"],"properties":{"attached_function":{"$ref":"#/components/schemas/AttachedFunctionApiResponse"}}},"GetRequestPayload":{"allOf":[{"$ref":"#/components/schemas/RawWhereFields"},{"type":"object","properties":{"ids":{"type":["array","null"],"items":{"type":"string"}},"include":{"$ref":"#/components/schemas/IncludeList"},"limit":{"type":["integer","null"],"format":"int32","minimum":0},"offset":{"type":["integer","null"],"format":"int32","minimum":0}}}],"description":"Records can be retrieved by their IDs or by a metadata filter. At least one of `ids` or `where`\nmust be provided. Use `include` to specify which fields to return in the response."},"GetResponse":{"type":"object","description":"All arrays have the same length, with each index representing a single record.\nOnly fields specified in the request's `include` parameter are populated.","required":["ids","include"],"properties":{"documents":{"type":["array","null"],"items":{"type":["string","null"]}},"embeddings":{"type":["array","null"],"items":{"type":"array","items":{"type":"number","format":"float"}}},"ids":{"type":"array","items":{"type":"string"}},"include":{"type":"array","items":{"$ref":"#/components/schemas/Include"},"description":"List of fields that were included in this response."},"metadatas":{"type":["array","null"],"items":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/HashMap"}]}},"uris":{"type":["array","null"],"items":{"type":["string","null"]}}}},"GetTenantResponse":{"type":"object","required":["name"],"properties":{"name":{"type":"string"},"resource_name":{"type":["string","null"]}}},"GetUserIdentityResponse":{"type":"object","required":["user_id","tenant","databases"],"properties":{"databases":{"type":"array","items":{"type":"string"},"uniqueItems":true},"tenant":{"type":"string"},"user_id":{"type":"string"}}},"HashMap":{"type":"object","additionalProperties":{"oneOf":[{"type":"boolean"},{"type":"integer","format":"int64"},{"type":"number","format":"double"},{"type":"string"},{"$ref":"#/components/schemas/SparseVector"},{"type":"array","items":{"type":"boolean"}},{"type":"array","items":{"type":"integer","format":"int64"}},{"type":"array","items":{"type":"number","format":"double"}},{"type":"array","items":{"type":"string"}}]},"propertyNames":{"type":"string"}},"HeartbeatResponse":{"type":"object","required":["nanosecond heartbeat"],"properties":{"nanosecond heartbeat":{"type":"integer","minimum":0}}},"HnswConfiguration":{"type":"object","properties":{"ef_construction":{"type":["integer","null"],"minimum":0},"ef_search":{"type":["integer","null"],"minimum":0},"max_neighbors":{"type":["integer","null"],"minimum":0},"resize_factor":{"type":["number","null"],"format":"double"},"space":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/Space"}]},"sync_threshold":{"type":["integer","null"],"minimum":0}},"additionalProperties":false},"HnswIndexConfig":{"type":"object","description":"Configuration for HNSW vector index algorithm parameters","properties":{"batch_size":{"type":["integer","null"],"minimum":0},"ef_construction":{"type":["integer","null"],"minimum":0},"ef_search":{"type":["integer","null"],"minimum":0},"max_neighbors":{"type":["integer","null"],"minimum":0},"num_threads":{"type":["integer","null"],"minimum":0},"resize_factor":{"type":["number","null"],"format":"double"},"sync_threshold":{"type":["integer","null"],"minimum":0}},"additionalProperties":false},"Include":{"type":"string","description":"Use this enum to specify which fields should be returned when retrieving records.","enum":["distances","documents","embeddings","metadatas","uris"]},"IncludeList":{"type":"array","items":{"$ref":"#/components/schemas/Include"}},"IndexStatusResponse":{"type":"object","required":["op_indexing_progress","num_unindexed_ops","num_indexed_ops","total_ops"],"properties":{"num_indexed_ops":{"type":"integer","format":"int64","minimum":0},"num_unindexed_ops":{"type":"integer","format":"int64","minimum":0},"op_indexing_progress":{"type":"number","format":"float"},"total_ops":{"type":"integer","format":"int64","minimum":0}}},"IntInvertedIndexConfig":{"type":"object","additionalProperties":false},"IntInvertedIndexType":{"type":"object","required":["enabled","config"],"properties":{"config":{"$ref":"#/components/schemas/IntInvertedIndexConfig"},"enabled":{"type":"boolean"}}},"IntValueType":{"type":"object","description":"Integer value type index configurations","properties":{"int_inverted_index":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/IntInvertedIndexType"}]}}},"Key":{"oneOf":[{"type":"string","enum":["Document"]},{"type":"string","enum":["Embedding"]},{"type":"string","enum":["Metadata"]},{"type":"string","enum":["Score"]},{"type":"object","required":["MetadataField"],"properties":{"MetadataField":{"type":"string"}}}],"description":"Represents a field key in search queries.\n\nUsed for both selecting fields to return and building filter expressions.\nPredefined keys access special fields, while custom keys access metadata.\n\n# Predefined Keys\n\n- `Key::Document` - Document text content (`#document`)\n- `Key::Embedding` - Vector embeddings (`#embedding`)\n- `Key::Metadata` - All metadata fields (`#metadata`)\n- `Key::Score` - Search scores (`#score`)\n\n# Custom Keys\n\nUse `Key::field()` or `Key::from()` to reference metadata fields:\n\n```\nuse chroma_types::operator::Key;\n\nlet key = Key::field(\"author\");\nlet key = Key::from(\"title\");\n```\n\n# Examples\n\n## Building filters\n\n```\nuse chroma_types::operator::Key;\n\n// Equality\nlet filter = Key::field(\"status\").eq(\"published\");\n\n// Comparisons\nlet filter = Key::field(\"year\").gte(2020);\nlet filter = Key::field(\"score\").lt(0.9);\n\n// Set operations\nlet filter = Key::field(\"category\").is_in(vec![\"tech\", \"science\"]);\nlet filter = Key::field(\"status\").not_in(vec![\"deleted\", \"archived\"]);\n\n// Document content\nlet filter = Key::Document.contains(\"machine learning\");\nlet filter = Key::Document.regex(r\"\\bAPI\\b\");\n\n// Combining filters\nlet filter = Key::field(\"status\").eq(\"published\")\n    & Key::field(\"year\").gte(2020);\n```\n\n## Selecting fields\n\n```\nuse chroma_types::plan::SearchPayload;\nuse chroma_types::operator::Key;\n\nlet search = SearchPayload::default()\n    .select([\n        Key::Document,\n        Key::Score,\n        Key::field(\"title\"),\n        Key::field(\"author\"),\n    ]);\n```"},"Quantization":{"type":"string","description":"Quantization implementation for SPANN vector index.","enum":["none","four_bit_rabit_q_with_u_search"]},"QueryRequestPayload":{"allOf":[{"$ref":"#/components/schemas/RawWhereFields"},{"type":"object","required":["query_embeddings"],"properties":{"ids":{"type":["array","null"],"items":{"type":"string"}},"include":{"$ref":"#/components/schemas/IncludeList"},"n_results":{"type":["integer","null"],"format":"int32","minimum":0},"query_embeddings":{"type":"array","items":{"type":"array","items":{"type":"number","format":"float"}}}}}]},"QueryResponse":{"type":"object","required":["ids","include"],"properties":{"distances":{"type":["array","null"],"items":{"type":"array","items":{"type":["number","null"],"format":"float"}}},"documents":{"type":["array","null"],"items":{"type":"array","items":{"type":["string","null"]}}},"embeddings":{"type":["array","null"],"items":{"type":"array","items":{"type":["array","null"],"items":{"type":"number","format":"float"}}}},"ids":{"type":"array","items":{"type":"array","items":{"type":"string"}}},"include":{"type":"array","items":{"$ref":"#/components/schemas/Include"}},"metadatas":{"type":["array","null"],"items":{"type":"array","items":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/HashMap"}]}}},"uris":{"type":["array","null"],"items":{"type":"array","items":{"type":["string","null"]}}}}},"RawWhereFields":{"type":"object","properties":{"where":{},"where_document":{}}},"ReadLevel":{"type":"string","enum":["index_and_wal","index_only","index_and_bounded_wal"]},"Schema":{"type":"object","description":"Schema representation for collection index configurations\n\nThis represents the server-side schema structure used for index management","required":["defaults","keys"],"properties":{"cmek":{"type":["object","null"],"description":"Customer-managed encryption key for collection data"},"defaults":{"$ref":"#/components/schemas/ValueTypes","description":"Default index configurations for each value type"},"keys":{"type":"object","description":"Key-specific index overrides\nTODO(Sanket): Needed for backwards compatibility. Should remove after deploy.","additionalProperties":{"$ref":"#/components/schemas/ValueTypes"},"propertyNames":{"type":"string"}},"source_attached_function_id":{"type":["string","null"],"description":"ID of the attached function that created this output collection (if applicable)"}}},"SearchPayload":{"type":"object","properties":{"filter":{"type":"object","properties":{"query_ids":{"type":"array","items":{"type":"string"}},"where_clause":{"type":"object"}}},"group_by":{"type":"object","properties":{"aggregate":{"type":"object"},"keys":{"type":"array","items":{"type":"string"}}}},"limit":{"type":"object","properties":{"limit":{"type":"integer"},"offset":{"type":"integer"}}},"rank":{"type":"object"},"select":{"type":"object","properties":{"keys":{"type":"array","items":{"type":"string"}}}}}},"SearchRequestPayload":{"type":"object","required":["searches"],"properties":{"read_level":{"$ref":"#/components/schemas/ReadLevel","description":"Specifies whether to include unindexed data in the search results."},"searches":{"type":"array","items":{"$ref":"#/components/schemas/SearchPayload"}}}},"SearchResponse":{"type":"object","required":["ids","documents","embeddings","metadatas","scores","select"],"properties":{"documents":{"type":"array","items":{"type":["array","null"],"items":{"type":["string","null"]}}},"embeddings":{"type":"array","items":{"type":["array","null"],"items":{"type":["array","null"],"items":{"type":"number","format":"float"}}}},"ids":{"type":"array","items":{"type":"array","items":{"type":"string"}}},"metadatas":{"type":"array","items":{"type":["array","null"],"items":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/HashMap"}]}}},"scores":{"type":"array","items":{"type":["array","null"],"items":{"type":["number","null"],"format":"float"}}},"select":{"type":"array","items":{"type":"array","items":{"$ref":"#/components/schemas/Key"}}}}},"Space":{"type":"string","enum":["l2","cosine","ip"]},"SpannConfiguration":{"type":"object","properties":{"ef_construction":{"type":["integer","null"],"minimum":0},"ef_search":{"type":["integer","null"],"minimum":0},"max_neighbors":{"type":["integer","null"],"minimum":0},"merge_threshold":{"type":["integer","null"],"format":"int32","minimum":0},"reassign_neighbor_count":{"type":["integer","null"],"format":"int32","minimum":0},"search_nprobe":{"type":["integer","null"],"format":"int32","minimum":0},"space":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/Space"}]},"split_threshold":{"type":["integer","null"],"format":"int32","minimum":0},"write_nprobe":{"type":["integer","null"],"format":"int32","minimum":0}},"additionalProperties":false},"SpannIndexConfig":{"type":"object","description":"Configuration for SPANN vector index algorithm parameters","properties":{"center_drift_threshold":{"type":["number","null"],"format":"float"},"ef_construction":{"type":["integer","null"],"minimum":0},"ef_search":{"type":["integer","null"],"minimum":0},"initial_lambda":{"type":["number","null"],"format":"float"},"max_neighbors":{"type":["integer","null"],"minimum":0},"merge_threshold":{"type":["integer","null"],"format":"int32","minimum":0},"nreplica_count":{"type":["integer","null"],"format":"int32","minimum":0},"num_centers_to_merge_to":{"type":["integer","null"],"format":"int32","minimum":0},"num_samples_kmeans":{"type":["integer","null"],"minimum":0},"quantize":{"$ref":"#/components/schemas/Quantization","description":"Quantization implementation for vector search (cloud-only feature)"},"reassign_neighbor_count":{"type":["integer","null"],"format":"int32","minimum":0},"search_nprobe":{"type":["integer","null"],"format":"int32","minimum":0},"search_rng_epsilon":{"type":["number","null"],"format":"float"},"search_rng_factor":{"type":["number","null"],"format":"float"},"split_threshold":{"type":["integer","null"],"format":"int32","minimum":0},"write_nprobe":{"type":["integer","null"],"format":"int32","minimum":0},"write_rng_epsilon":{"type":["number","null"],"format":"float"},"write_rng_factor":{"type":["number","null"],"format":"float"}},"additionalProperties":false},"SparseIndexAlgorithm":{"type":"string","description":"Sparse vector index algorithm.\n\nControls which posting list format and query engine are used for\nsparse vector search within a collection.","enum":["wand","max_score"]},"SparseVector":{"type":"object","description":"Represents a sparse vector using parallel arrays for indices and values.\n\nOn deserialization: accepts both old format `{\"indices\": [...], \"values\": [...]}`\nand new format `{\"#type\": \"sparse_vector\", \"indices\": [...], \"values\": [...]}`.\n\nOn serialization: always includes `#type` field with value `\"sparse_vector\"`.","required":["indices","values"],"properties":{"indices":{"type":"array","items":{"type":"integer","format":"int32","minimum":0},"description":"Dimension indices"},"tokens":{"type":["array","null"],"items":{"type":"string"},"description":"Tokens corresponding to each index"},"values":{"type":"array","items":{"type":"number","format":"float"},"description":"Values corresponding to each index"}}},"SparseVectorIndexConfig":{"type":"object","properties":{"algorithm":{"$ref":"#/components/schemas/SparseIndexAlgorithm","description":"Sparse index algorithm (cloud-only, tenant-gated).\nOmitted from JSON when set to the default (Wand) so that old\nservers/clients that do not know about this field can still\ndeserialize the schema."},"bm25":{"type":["boolean","null"],"description":"Whether this embedding is BM25"},"embedding_function":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/EmbeddingFunctionConfiguration","description":"Embedding function configuration"}]},"source_key":{"type":["string","null"],"description":"Key to source the sparse vector from"}},"additionalProperties":false},"SparseVectorIndexType":{"type":"object","required":["enabled","config"],"properties":{"config":{"$ref":"#/components/schemas/SparseVectorIndexConfig"},"enabled":{"type":"boolean"}}},"SparseVectorValueType":{"type":"object","description":"Sparse vector value type index configurations","properties":{"sparse_vector_index":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/SparseVectorIndexType"}]}}},"StringInvertedIndexConfig":{"type":"object","additionalProperties":false},"StringInvertedIndexType":{"type":"object","required":["enabled","config"],"properties":{"config":{"$ref":"#/components/schemas/StringInvertedIndexConfig"},"enabled":{"type":"boolean"}}},"StringValueType":{"type":"object","description":"String value type index configurations","properties":{"fts_index":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/FtsIndexType"}]},"string_inverted_index":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/StringInvertedIndexType"}]}}},"UpdateCollectionConfiguration":{"type":"object","properties":{"embedding_function":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/EmbeddingFunctionConfiguration"}]},"hnsw":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/UpdateHnswConfiguration"}]},"spann":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/UpdateSpannConfiguration"}]}}},"UpdateCollectionPayload":{"type":"object","properties":{"new_configuration":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/UpdateCollectionConfiguration"}]},"new_metadata":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/HashMap"}]},"new_name":{"type":["string","null"]}}},"UpdateCollectionRecordsPayload":{"type":"object","description":"Payload for updating existing records in a collection.\n\nRecords are added in batches. All arrays must have the same length, with each index\nrepresenting a single record. For example, `ids[0]`, `embeddings[0]`, `documents[0]`, etc.\nall belong to the same record.","required":["ids"],"properties":{"documents":{"type":["array","null"],"items":{"type":["string","null"]}},"embeddings":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/UpdateEmbeddingsPayload","description":"Updated embeddings for each record. Can contain the raw f32 arrays or base64 encoded strings."}]},"ids":{"type":"array","items":{"type":"string"}},"metadatas":{"type":["array","null"],"items":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/HashMap"}]}},"uris":{"type":["array","null"],"items":{"type":["string","null"]}}}},"UpdateCollectionRecordsResponse":{"type":"object"},"UpdateCollectionResponse":{"type":"object"},"UpdateEmbeddingsPayload":{"oneOf":[{"type":"array","items":{"type":["array","null"],"items":{"type":"number","format":"float"}}},{"type":"array","items":{"type":["string","null"]}}]},"UpdateHnswConfiguration":{"type":"object","properties":{"batch_size":{"type":["integer","null"],"minimum":0},"ef_search":{"type":["integer","null"],"minimum":0},"max_neighbors":{"type":["integer","null"],"minimum":0},"num_threads":{"type":["integer","null"],"minimum":0},"resize_factor":{"type":["number","null"],"format":"double"},"sync_threshold":{"type":["integer","null"],"minimum":0}},"additionalProperties":false},"UpdateSpannConfiguration":{"type":"object","properties":{"ef_search":{"type":["integer","null"],"minimum":0},"search_nprobe":{"type":["integer","null"],"format":"int32","minimum":0}},"additionalProperties":false},"UpdateTenantPayload":{"type":"object","required":["resource_name"],"properties":{"resource_name":{"type":"string"}}},"UpdateTenantResponse":{"type":"object"},"UpsertCollectionRecordsPayload":{"type":"object","description":"Payload for upserting records in a collection.\n\nUpsert creates records if they don't exist, or updates them if they do.\nRecords are added in batches. All arrays must have the same length, with each index\nrepresenting a single record. For example, `ids[0]`, `embeddings[0]`, `documents[0]`, etc.\nall belong to the same record.","required":["ids","embeddings"],"properties":{"documents":{"type":["array","null"],"items":{"type":["string","null"]}},"embeddings":{"$ref":"#/components/schemas/EmbeddingsPayload","description":"Embeddings for each record. Can contain the raw f32 arrays or base64 encoded strings."},"ids":{"type":"array","items":{"type":"string"}},"metadatas":{"type":["array","null"],"items":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/HashMap"}]}},"uris":{"type":["array","null"],"items":{"type":["string","null"]}}}},"UpsertCollectionRecordsResponse":{"type":"object"},"ValueTypes":{"type":"object","description":"Strongly-typed value type configurations\nContains optional configurations for each supported value type","properties":{"bool":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/BoolValueType"}]},"float":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/FloatValueType"}]},"float_list":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/FloatListValueType"}]},"int":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/IntValueType"}]},"sparse_vector":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/SparseVectorValueType"}]},"string":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/StringValueType"}]}}},"Vec":{"type":"array","items":{"type":"object","required":["id","name","configuration_json","tenant","database","log_position","version"],"properties":{"configuration_json":{"$ref":"#/components/schemas/CollectionConfiguration"},"database":{"type":"string"},"dimension":{"type":["integer","null"],"format":"int32"},"id":{"$ref":"#/components/schemas/CollectionUuid"},"log_position":{"type":"integer","format":"int64"},"metadata":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/HashMap"}]},"name":{"type":"string"},"schema":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/Schema"}]},"tenant":{"type":"string"},"version":{"type":"integer","format":"int32"}}}},"VectorIndexConfig":{"type":"object","properties":{"embedding_function":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/EmbeddingFunctionConfiguration","description":"Embedding function configuration"}]},"hnsw":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/HnswIndexConfig","description":"HNSW algorithm configuration"}]},"source_key":{"type":["string","null"],"description":"Key to source the vector from"},"space":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/Space","description":"Vector space for similarity calculation (cosine, l2, ip)"}]},"spann":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/SpannIndexConfig","description":"SPANN algorithm configuration"}]}},"additionalProperties":false},"VectorIndexType":{"type":"object","required":["enabled","config"],"properties":{"config":{"$ref":"#/components/schemas/VectorIndexConfig"},"enabled":{"type":"boolean"}}},"u32":{"type":"integer","format":"int32","minimum":0}},"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"x-chroma-token"}}}}