{"docsConfig":{"theme":"aspen","$schema":"https://mintlify.com/docs.json","name":"Chroma Docs","colors":{"primary":"#ff6446","light":"#3b82f6","dark":"#3b82f6"},"logo":{"light":"https://mintcdn.com/chroma-8943dec5/zDKM3GBjHr8r61ad/images/light-logo.svg?fit=max\u0026auto=format\u0026n=zDKM3GBjHr8r61ad\u0026q=85\u0026s=d487d229a3d00bed252f4728417390fe","dark":"https://mintcdn.com/chroma-8943dec5/zDKM3GBjHr8r61ad/images/dark-logo.svg?fit=max\u0026auto=format\u0026n=zDKM3GBjHr8r61ad\u0026q=85\u0026s=9a0a6a79ac0ebba171a05f875bd724e1"},"favicon":"https://mintcdn.com/chroma-8943dec5/zDKM3GBjHr8r61ad/images/favicon.svg?fit=max\u0026auto=format\u0026n=zDKM3GBjHr8r61ad\u0026q=85\u0026s=490f4b16d291523f62110db3bdff5500","api":{"examples":{"languages":["curl","terminal","python","typescript","rust"]}},"appearance":{"default":"system"},"navbar":{"links":[{"icon":"github","href":"https://github.com/chroma-core/chroma","label":"27k"},{"icon":"discord","href":"https://discord.gg/dSHcBEMSk7","label":"11k"},{"icon":"x-twitter","href":"https://x.com/trychroma","label":"29k"}],"primary":{"type":"button","label":"Dashboard","href":"https://trychroma.com/login"}},"footer":{"socials":{"github":"https://github.com/chroma-core/chroma","x":"https://x.com/trychroma","discord":"https://discord.gg/MMeYNTmh3x","youtube":"https://youtube.com/@trychroma"},"links":[{"items":[{"label":"Enterprise","href":"https://trychroma.com/enterprise"},{"label":"Pricing","href":"https://trychroma.com/pricing"},{"label":"Changelog","href":"https://trychroma.com/changelog"}]}]},"fonts":{"family":"Inter"},"integrations":{"gtm":{"tagId":"GTM-T8MGS4GJ"},"posthog":{"apiKey":"phc_M1NrBVW8hgvKCGYxVtYusnbBvpVq9sKpE7FJMew9suK","sessionRecording":false}},"contextual":{"options":["copy","view","grok","chatgpt","claude","mcp","cursor","vscode"],"display":"header"},"thumbnails":{"background":"https://mintcdn.com/chroma-8943dec5/4JUAmIxOVRcPzFno/images/og-bg.png?fit=max\u0026auto=format\u0026n=4JUAmIxOVRcPzFno\u0026q=85\u0026s=1bad42a6df47084c8ff628738967bc4b"},"styling":{"latex":true},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"chroma-8943dec5","hasAudioNarration":false,"actualSubdomain":"chroma-8943dec5","customDomains":["docs.trychroma.com"],"gitSource":{"type":"github","owner":"chroma-core","repo":"chroma","deployBranch":"main","contentDirectory":"docs/mintlify","isPrivate":false,"mountPath":"","label":""},"feedback":{"edits":true,"issues":false,"thumbs":true},"entitlements":{"AI_CHAT":{"status":"ENABLED"},"REMOVE_BRANDING":{"status":"ENABLED"},"CONTEXTUAL_FEEDBACK":{"status":"ENABLED"},"CODE_SNIPPET_FEEDBACK":{"status":"ENABLED"},"WEB_MCP":{"status":"ENABLED"},"NARRATION":{"status":"ENABLED"}},"buildId":"6aeeae7a7e16d2194a71edc7","clientVersion":"0.0.4143","searchFilterCounts":[{"language":"default","tag":"Reference","count":65},{"language":"default","tag":"APIs","count":44},{"language":"default","tag":"Integrations","count":39},{"language":"default","tag":"Docs","count":29},{"language":"default","tag":"Chroma Core API","count":27},{"language":"default","tag":"Chroma Cloud","count":25},{"language":"default","tag":"Dense Embedding Models","count":21},{"language":"default","tag":"Guides","count":16},{"language":"default","tag":"Frameworks","count":13},{"language":"default","tag":"SDKs","count":13}]},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":false,"enableAskAiSearchBar":true,"deflection":{"enabled":true,"email":"support@trychroma.com","showHelpButton":true}},"basePath":"","hasChatPermissions":true,"hasWebMcpPermissions":true,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-rbac-roles","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-bash","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-metadata","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"sso-setup-deadline-banner","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"live-agents","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":false},"customCss":[{"filePath":"style.css","content":"[data-component-part=\"step-number\"]>div{border-radius:0;border:1px solid #000000;background-color:#ffffff;font-family:ui-monospace, monospace;font-weight:400;box-shadow:2px 2px 0 0 #000000}.dark [data-component-part=\"step-number\"]>div{border-color:#c4c5c8;background-color:#111827;box-shadow:2px 2px 0 0 #babbbf}[data-component-part=\"step-line\"]{background-color:#000000;background-image:none!important}.dark [data-component-part=\"step-line\"]{background-color:#c4c5c8}[data-testid=\"tab-TypeScript\"] .tab-icon{display:none}[data-testid=\"tab-TypeScript\"]::before{content:\"\";display:inline-block;width:1rem;height:1rem;background-color:currentColor;-webkit-mask-image:url(\"/images/typescript.svg\");mask-image:url(\"/images/typescript.svg\");-webkit-mask-size:contain;mask-size:contain;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat}a[href*=\"mintlify.com?utm_campaign=poweredBy\"] span{display:none}a[href*=\"mintlify.com?utm_campaign=poweredBy\"]::after{content:\"is powered by Chroma\"}a[href=\"/reference/typescript\"] [data-component-part=\"card-icon\"] svg{-webkit-mask-image:url(\"/images/typescript.svg\")!important;mask-image:url(\"/images/typescript.svg\")!important;-webkit-mask-size:contain;mask-size:contain;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat}.dark #topbar-cta-button{opacity:0.85}"}],"page":{"pagePath":"reference/typescript/client","slug":"/reference/typescript/client","pageMetadata":{"title":"Client","description":null,"href":"/reference/typescript/client"},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={hr:`hr`,p:`p`,strong:`strong`,..._provideComponents(),...props.components},{Heading,ParamField}=_components;if(!Heading)_missingMdxReference(`Heading`,true);if(!ParamField)_missingMdxReference(`ParamField`,true);return _jsxs(_Fragment,{children:[_jsx(Heading,{level:`2`,id:`clients`,children:`Clients`}),`\n`,_jsx(Heading,{level:`3`,id:`chromaclient`,children:`ChromaClient`}),`\n`,_jsx(_components.p,{children:`Main client class for interacting with ChromaDB.\nProvides methods for managing collections and performing operations on them.`}),`\n`,_jsx(ParamField,{path:`host`,type:`string | undefined`,id:`param-host`,children:_jsx(_components.p,{children:`The host address of the Chroma server. Defaults to ‘localhost’`})}),`\n`,_jsx(ParamField,{path:`port`,type:`number | undefined`,id:`param-port`,children:_jsx(_components.p,{children:`The port number of the Chroma server. Defaults to 8000`})}),`\n`,_jsx(ParamField,{path:`ssl`,type:`boolean | undefined`,id:`param-ssl`,children:_jsx(_components.p,{children:`Whether to use SSL/HTTPS for connections. Defaults to false`})}),`\n`,_jsx(ParamField,{path:`tenant`,type:`string | undefined`,id:`param-tenant`,children:_jsx(_components.p,{children:`The tenant name in the Chroma server to connect to`})}),`\n`,_jsx(ParamField,{path:`database`,type:`string | undefined`,id:`param-database`,children:_jsx(_components.p,{children:`The database name to connect to`})}),`\n`,_jsx(ParamField,{path:`headers`,type:`Record\u003cstring, string> | undefined`,id:`param-headers`,children:_jsx(_components.p,{children:`Additional HTTP headers to send with requests`})}),`\n`,_jsx(ParamField,{path:`fetchOptions`,type:`RequestInit | undefined`,id:`param-fetch-options`,children:_jsx(_components.p,{children:`Additional fetch options for HTTP requests`})}),`\n`,_jsx(ParamField,{path:`path`,type:`string | undefined`,id:`param-path`}),`\n`,_jsx(ParamField,{path:`auth`,type:`Record\u003cstring, string> | undefined`,id:`param-auth`}),`\n`,_jsx(Heading,{level:`3`,id:`cloudclient`,children:`CloudClient`}),`\n`,_jsx(_components.p,{children:`ChromaDB cloud client for connecting to hosted Chroma instances.\nExtends ChromaClient with cloud-specific authentication and configuration.`}),`\n`,_jsx(ParamField,{path:`apiKey`,type:`string`,id:`param-api-key`}),`\n`,_jsx(ParamField,{path:`host`,type:`string`,id:`param-host-1`}),`\n`,_jsx(ParamField,{path:`port`,type:`number`,id:`param-port-1`}),`\n`,_jsx(ParamField,{path:`tenant`,type:`string`,id:`param-tenant-1`}),`\n`,_jsx(ParamField,{path:`database`,type:`string`,id:`param-database-1`}),`\n`,_jsx(ParamField,{path:`fetchOptions`,type:`RequestInit`,id:`param-fetch-options-1`}),`\n`,_jsx(Heading,{level:`3`,id:`adminclient`,children:`AdminClient`}),`\n`,_jsx(_components.p,{children:`Administrative client for managing ChromaDB tenants and databases.\nProvides methods for creating, deleting, and listing tenants and databases.`}),`\n`,_jsx(ParamField,{path:`host`,type:`string`,required:true,id:`param-host-2`,children:_jsx(_components.p,{children:`The host address of the Chroma server`})}),`\n`,_jsx(ParamField,{path:`port`,type:`number`,required:true,id:`param-port-2`,children:_jsx(_components.p,{children:`The port number of the Chroma server`})}),`\n`,_jsx(ParamField,{path:`ssl`,type:`boolean`,required:true,id:`param-ssl-1`,children:_jsx(_components.p,{children:`Whether to use SSL/HTTPS for connections`})}),`\n`,_jsx(ParamField,{path:`headers`,type:`Record\u003cstring, string> | undefined`,id:`param-headers-1`,children:_jsx(_components.p,{children:`Additional HTTP headers to send with requests`})}),`\n`,_jsx(ParamField,{path:`fetchOptions`,type:`RequestInit | undefined`,id:`param-fetch-options-2`,children:_jsx(_components.p,{children:`Additional fetch options for HTTP requests`})}),`\n`,_jsx(_components.hr,{}),`\n`,_jsx(Heading,{level:`2`,id:`client-methods`,children:`Client Methods`}),`\n`,_jsx(Heading,{level:`3`,id:`heartbeat`,children:`heartbeat`}),`\n`,_jsx(_components.p,{children:`Sends a heartbeat request to check server connectivity.`}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Returns:`}),` Promise resolving to the server’s nanosecond heartbeat timestamp`]}),`\n`,_jsx(Heading,{level:`3`,id:`listcollections`,children:`listCollections`}),`\n`,_jsx(_components.p,{children:`Lists all collections in the current database.`}),`\n`,_jsx(ParamField,{path:`limit`,type:`number`,required:true,id:`param-limit`}),`\n`,_jsx(ParamField,{path:`offset`,type:`number`,required:true,id:`param-offset`}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Returns:`}),` Promise resolving to an array of Collection instances`]}),`\n`,_jsx(Heading,{level:`3`,id:`countcollections`,children:`countCollections`}),`\n`,_jsx(_components.p,{children:`Gets the total number of collections in the current database.`}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Returns:`}),` Promise resolving to the collection count`]}),`\n`,_jsx(Heading,{level:`3`,id:`createcollection`,children:`createCollection`}),`\n`,_jsx(_components.p,{children:`Creates a new collection with the specified configuration.`}),`\n`,_jsx(ParamField,{path:`name`,type:`string`,required:true,id:`param-name`}),`\n`,_jsx(ParamField,{path:`configuration`,type:`CreateCollectionConfiguration`,id:`param-configuration`}),`\n`,_jsx(ParamField,{path:`metadata`,type:`CollectionMetadata`,id:`param-metadata`}),`\n`,_jsx(ParamField,{path:`embeddingFunction`,type:`EmbeddingFunction | null`,id:`param-embedding-function`}),`\n`,_jsx(ParamField,{path:`schema`,type:`Schema`,id:`param-schema`}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Returns:`}),` Promise resolving to the created Collection instance`]}),`\n`,_jsx(Heading,{level:`3`,id:`getcollection`,children:`getCollection`}),`\n`,_jsx(_components.p,{children:`Retrieves an existing collection by name.`}),`\n`,_jsx(ParamField,{path:`name`,type:`string`,required:true,id:`param-name-1`}),`\n`,_jsx(ParamField,{path:`embeddingFunction`,type:`EmbeddingFunction`,id:`param-embedding-function-1`}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Returns:`}),` Promise resolving to the Collection instance`]}),`\n`,_jsx(Heading,{level:`3`,id:`getorcreatecollection`,children:`getOrCreateCollection`}),`\n`,_jsx(_components.p,{children:`Gets an existing collection or creates it if it doesn’t exist.`}),`\n`,_jsx(ParamField,{path:`name`,type:`string`,required:true,id:`param-name-2`}),`\n`,_jsx(ParamField,{path:`configuration`,type:`CreateCollectionConfiguration`,id:`param-configuration-1`}),`\n`,_jsx(ParamField,{path:`metadata`,type:`CollectionMetadata`,id:`param-metadata-1`}),`\n`,_jsx(ParamField,{path:`embeddingFunction`,type:`EmbeddingFunction | null`,id:`param-embedding-function-2`}),`\n`,_jsx(ParamField,{path:`schema`,type:`Schema`,id:`param-schema-1`}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Returns:`}),` Promise resolving to the Collection instance`]}),`\n`,_jsx(Heading,{level:`3`,id:`deletecollection`,children:`deleteCollection`}),`\n`,_jsx(_components.p,{children:`Deletes a collection and all its data.`}),`\n`,_jsx(ParamField,{path:`name`,type:`string`,required:true,id:`param-name-3`}),`\n`,_jsx(Heading,{level:`3`,id:`reset`,children:`reset`}),`\n`,_jsx(_components.p,{children:`Resets the entire database, deleting all collections and data.`}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Returns:`}),` Promise that resolves when the reset is complete`]}),`\n`,_jsx(Heading,{level:`3`,id:`version`,children:`version`}),`\n`,_jsx(_components.p,{children:`Gets the version of the Chroma server.`}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Returns:`}),` Promise resolving to the server version string`]}),`\n`,_jsx(_components.hr,{}),`\n`,_jsx(Heading,{level:`2`,id:`admin-client-methods`,children:`Admin Client Methods`}),`\n`,_jsx(Heading,{level:`3`,id:`createtenant`,children:`createTenant`}),`\n`,_jsx(_components.p,{children:`Creates a new tenant.`}),`\n`,_jsx(ParamField,{path:`name`,type:`string`,required:true,id:`param-name-4`}),`\n`,_jsx(Heading,{level:`3`,id:`gettenant`,children:`getTenant`}),`\n`,_jsx(_components.p,{children:`Retrieves information about a specific tenant.`}),`\n`,_jsx(ParamField,{path:`name`,type:`string`,required:true,id:`param-name-5`}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Returns:`}),` Promise resolving to the tenant name`]}),`\n`,_jsx(Heading,{level:`3`,id:`createdatabase`,children:`createDatabase`}),`\n`,_jsx(_components.p,{children:`Creates a new database within a tenant.`}),`\n`,_jsx(ParamField,{path:`name`,type:`string`,required:true,id:`param-name-6`}),`\n`,_jsx(ParamField,{path:`tenant`,type:`string`,required:true,id:`param-tenant-2`}),`\n`,_jsx(Heading,{level:`3`,id:`getdatabase`,children:`getDatabase`}),`\n`,_jsx(_components.p,{children:`Retrieves information about a specific database.`}),`\n`,_jsx(ParamField,{path:`name`,type:`string`,required:true,id:`param-name-7`}),`\n`,_jsx(ParamField,{path:`tenant`,type:`string`,required:true,id:`param-tenant-3`}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Returns:`}),` Promise resolving to database information`]}),`\n`,_jsx(Heading,{level:`3`,id:`deletedatabase`,children:`deleteDatabase`}),`\n`,_jsx(_components.p,{children:`Deletes a database and all its data.`}),`\n`,_jsx(ParamField,{path:`name`,type:`string`,required:true,id:`param-name-8`}),`\n`,_jsx(ParamField,{path:`tenant`,type:`string`,required:true,id:`param-tenant-4`}),`\n`,_jsx(Heading,{level:`3`,id:`listdatabases`,children:`listDatabases`}),`\n`,_jsx(_components.p,{children:`Lists all databases within a tenant.`}),`\n`,_jsx(ParamField,{path:`args`,type:`ListDatabasesArgs`,required:true,id:`param-args`,children:_jsx(_components.p,{children:`Listing parameters including tenant and pagination`})}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Returns:`}),` Promise resolving to an array of database information`]})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Client","description":null,"href":"/reference/typescript/client"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Clients","slug":"clients","depth":2,"children":[{"title":"ChromaClient","slug":"chromaclient","depth":3,"children":[]},{"title":"CloudClient","slug":"cloudclient","depth":3,"children":[]},{"title":"AdminClient","slug":"adminclient","depth":3,"children":[]}]},{"title":"Client Methods","slug":"client-methods","depth":2,"children":[{"title":"heartbeat","slug":"heartbeat","depth":3,"children":[]},{"title":"listCollections","slug":"listcollections","depth":3,"children":[]},{"title":"countCollections","slug":"countcollections","depth":3,"children":[]},{"title":"createCollection","slug":"createcollection","depth":3,"children":[]},{"title":"getCollection","slug":"getcollection","depth":3,"children":[]},{"title":"getOrCreateCollection","slug":"getorcreatecollection","depth":3,"children":[]},{"title":"deleteCollection","slug":"deletecollection","depth":3,"children":[]},{"title":"reset","slug":"reset","depth":3,"children":[]},{"title":"version","slug":"version","depth":3,"children":[]}]},{"title":"Admin Client Methods","slug":"admin-client-methods","depth":2,"children":[{"title":"createTenant","slug":"createtenant","depth":3,"children":[]},{"title":"getTenant","slug":"gettenant","depth":3,"children":[]},{"title":"createDatabase","slug":"createdatabase","depth":3,"children":[]},{"title":"getDatabase","slug":"getdatabase","depth":3,"children":[]},{"title":"deleteDatabase","slug":"deletedatabase","depth":3,"children":[]},{"title":"listDatabases","slug":"listdatabases","depth":3,"children":[]}]}],"codeExamples":{}},"jsLinks":[],"subdomain":"chroma-8943dec5","siteName":"Chroma Docs","title":"Client - Chroma Docs","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-10-09T18:51:33.906Z","originalFileLocation":"reference/typescript/client.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"application-name\" content=\"Chroma Docs\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/chroma-8943dec5/DnUzSTuBJGyCs29f/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/chroma-8943dec5/DnUzSTuBJGyCs29f/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/chroma-8943dec5/DnUzSTuBJGyCs29f/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/chroma-8943dec5/DnUzSTuBJGyCs29f/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/chroma-8943dec5/DnUzSTuBJGyCs29f/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/chroma-8943dec5/DnUzSTuBJGyCs29f/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/chroma-8943dec5/DnUzSTuBJGyCs29f/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/chroma-8943dec5/DnUzSTuBJGyCs29f/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/chroma-8943dec5/DnUzSTuBJGyCs29f/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Client - Chroma Docs\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Chroma Docs\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.trychroma.com/reference/typescript/client\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://chroma-8943dec5.mintlify.site/_mintlify/api/og/v2?division=TypeScript\u0026amp;title=Client\u0026amp;theme=d07ad52d696ec9dcc96b1828\u0026amp;signature=ff250365cfa875f6384876a75c7098fa0e5e6e17ef26a2741ab848ee82cb57ba\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Client - Chroma Docs\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://chroma-8943dec5.mintlify.site/_mintlify/api/og/v2?division=TypeScript\u0026amp;title=Client\u0026amp;theme=d07ad52d696ec9dcc96b1828\u0026amp;signature=ff250365cfa875f6384876a75c7098fa0e5e6e17ef26a2741ab848ee82cb57ba\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/chroma-8943dec5/DnUzSTuBJGyCs29f/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Chroma Docs\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#ff6446\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.trychroma.com/reference/typescript/client\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/reference/typescript/client.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.trychroma.com/#organization\",\"name\":\"Chroma Docs\",\"url\":\"https://docs.trychroma.com\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/chroma-8943dec5/zDKM3GBjHr8r61ad/images/light-logo.svg?fit=max\u0026auto=format\u0026n=zDKM3GBjHr8r61ad\u0026q=85\u0026s=d487d229a3d00bed252f4728417390fe\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.trychroma.com#website\",\"name\":\"Chroma Docs\",\"url\":\"https://docs.trychroma.com\",\"publisher\":{\"@id\":\"https://docs.trychroma.com/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.trychroma.com/reference/typescript/client#webpage\",\"url\":\"https://docs.trychroma.com/reference/typescript/client\",\"name\":\"Client\",\"dateModified\":\"2026-10-09T18:51:33.906Z\",\"isPartOf\":{\"@id\":\"https://docs.trychroma.com#website\"},\"breadcrumb\":{\"@id\":\"https://docs.trychroma.com/reference/typescript/client#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.trychroma.com/reference/typescript/client#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"SDKs\",\"item\":\"https://docs.trychroma.com/reference/python/client\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Client\",\"item\":\"https://docs.trychroma.com/reference/typescript/client\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://docs.trychroma.com/reference/typescript/client#article\",\"headline\":\"Client\",\"name\":\"Client\",\"url\":\"https://docs.trychroma.com/reference/typescript/client\",\"mainEntityOfPage\":{\"@id\":\"https://docs.trychroma.com/reference/typescript/client#webpage\"},\"dateModified\":\"2026-10-09T18:51:33.906Z\",\"publisher\":{\"@id\":\"https://docs.trychroma.com/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.trychroma.com#website\"}}]}\u003c/script>","agentPointerHref":"/reference/typescript/client.md","siteName":"Chroma Docs","nav":{"global":null,"tabs":[{"tab":"Docs","icon":"book","pages":[{"title":"Docs","href":"/docs/overview/introduction"}]},{"tab":"Chroma Cloud","icon":"cloud","pages":[{"title":"Chroma Cloud","href":"/cloud/getting-started"}]},{"tab":"Guides","icon":"map","pages":[{"title":"Guides","href":"/guides/build/building-with-ai"}]},{"tab":"Integrations","icon":"code-merge","pages":[{"title":"Integrations","href":"/integrations/chroma-integrations"}]},{"tab":"Reference","icon":"code","pages":[{"title":"Overview","href":"/reference/overview"},{"group":"Self-Hosted Chroma","pages":[{"title":"Chroma Configuration","href":"/reference/server-env-vars"}]},{"group":"SDKs","pages":[{"group":"Python","pages":[{"title":"Client","href":"/reference/python/client"},{"title":"Collection","href":"/reference/python/collection"},{"title":"Embedding Functions","href":"/reference/python/embedding-functions"},{"title":"Search","href":"/reference/python/search"},{"title":"Schema","href":"/reference/python/schema"},{"title":"Where Filters","description":"Reference for the Python DSL used to build where filters.","href":"/reference/python/where-filter"}]},{"group":"TypeScript","pages":[{"title":"Client","href":"/reference/typescript/client"},{"title":"Collection","description":null,"href":"/reference/typescript/collection"},{"title":"Embedding Functions","href":"/reference/typescript/embedding-functions"},{"title":"Search","href":"/reference/typescript/search"},{"title":"Schema","href":"/reference/typescript/schema"},{"title":"Where Filters","href":"/reference/typescript/where-filter"}]},{"title":"Rust","url":"https://docs.rs/chroma/latest/chroma/","href":"/reference/rust"}]},{"group":"Beta SDKs","pages":[{"title":"Kotlin","url":"https://github.com/chroma-core/chroma-android","href":"/reference/kotlin"},{"title":"Swift","url":"https://github.com/chroma-core/chroma-swift","href":"/reference/swift"}]},{"group":"APIs","pages":[{"group":"Chroma Core API","pages":[{"group":"Tenant","pages":[{"title":"Create tenant","deprecated":null,"version":null,"openapi":"https://api.trychroma.com/openapi.json post /api/v2/tenants","href":"/reference/chroma-api/tenant/create-tenant"},{"title":"Get tenant","deprecated":null,"version":null,"openapi":"https://api.trychroma.com/openapi.json get /api/v2/tenants/{tenant_name}","href":"/reference/chroma-api/tenant/get-tenant"},{"title":"Update tenant","deprecated":null,"version":null,"openapi":"https://api.trychroma.com/openapi.json patch /api/v2/tenants/{tenant_name}","href":"/reference/chroma-api/tenant/update-tenant"}]},{"group":"Database","pages":[{"title":"List databases","deprecated":null,"version":null,"openapi":"https://api.trychroma.com/openapi.json get /api/v2/tenants/{tenant}/databases","href":"/reference/chroma-api/database/list-databases"},{"title":"Create database","deprecated":null,"version":null,"openapi":"https://api.trychroma.com/openapi.json post /api/v2/tenants/{tenant}/databases","href":"/reference/chroma-api/database/create-database"},{"title":"Get database","deprecated":null,"version":null,"openapi":"https://api.trychroma.com/openapi.json get /api/v2/tenants/{tenant}/databases/{database}","href":"/reference/chroma-api/database/get-database"},{"title":"Delete database","deprecated":null,"version":null,"openapi":"https://api.trychroma.com/openapi.json delete /api/v2/tenants/{tenant}/databases/{database}","href":"/reference/chroma-api/database/delete-database"}]},{"group":"Collection","pages":[{"title":"List collections","deprecated":null,"version":null,"openapi":"https://api.trychroma.com/openapi.json get /api/v2/tenants/{tenant}/databases/{database}/collections","href":"/reference/chroma-api/collection/list-collections"},{"title":"Get number of collections","deprecated":null,"version":null,"openapi":"https://api.trychroma.com/openapi.json get /api/v2/tenants/{tenant}/databases/{database}/collections_count","href":"/reference/chroma-api/collection/get-number-of-collections"},{"title":"Create collection","deprecated":null,"version":null,"openapi":"https://api.trychroma.com/openapi.json post /api/v2/tenants/{tenant}/databases/{database}/collections","href":"/reference/chroma-api/collection/create-collection"},{"title":"Get collection","deprecated":null,"version":null,"openapi":"https://api.trychroma.com/openapi.json get /api/v2/tenants/{tenant}/databases/{database}/collections/{collection_id}","href":"/reference/chroma-api/collection/get-collection"},{"title":"Update collection","deprecated":null,"version":null,"openapi":"https://api.trychroma.com/openapi.json put /api/v2/tenants/{tenant}/databases/{database}/collections/{collection_id}","href":"/reference/chroma-api/collection/update-collection"},{"title":"Delete collection","deprecated":null,"version":null,"openapi":"https://api.trychroma.com/openapi.json delete /api/v2/tenants/{tenant}/databases/{database}/collections/{collection_id}","href":"/reference/chroma-api/collection/delete-collection"}]},{"group":"Record","pages":[{"title":"Add records","deprecated":null,"version":null,"openapi":"https://api.trychroma.com/openapi.json post /api/v2/tenants/{tenant}/databases/{database}/collections/{collection_id}/add","href":"/reference/chroma-api/record/add-records"},{"title":"Get number of records","deprecated":null,"version":null,"openapi":"https://api.trychroma.com/openapi.json get /api/v2/tenants/{tenant}/databases/{database}/collections/{collection_id}/count","href":"/reference/chroma-api/record/get-number-of-records"},{"title":"Delete records","deprecated":null,"version":null,"openapi":"https://api.trychroma.com/openapi.json post /api/v2/tenants/{tenant}/databases/{database}/collections/{collection_id}/delete","href":"/reference/chroma-api/record/delete-records"},{"title":"Get indexing status","deprecated":null,"version":null,"openapi":"https://api.trychroma.com/openapi.json get /api/v2/tenants/{tenant}/databases/{database}/collections/{collection_id}/indexing_status","href":"/reference/chroma-api/record/get-indexing-status"},{"title":"Get records","deprecated":null,"version":null,"openapi":"https://api.trychroma.com/openapi.json post /api/v2/tenants/{tenant}/databases/{database}/collections/{collection_id}/get","href":"/reference/chroma-api/record/get-records"},{"title":"Query collection","deprecated":null,"version":null,"openapi":"https://api.trychroma.com/openapi.json post /api/v2/tenants/{tenant}/databases/{database}/collections/{collection_id}/query","href":"/reference/chroma-api/record/query-collection"},{"title":"Search records","deprecated":null,"version":null,"openapi":"https://api.trychroma.com/openapi.json post /api/v2/tenants/{tenant}/databases/{database}/collections/{collection_id}/search","href":"/reference/chroma-api/record/search-records"},{"title":"Update records","deprecated":null,"version":null,"openapi":"https://api.trychroma.com/openapi.json post /api/v2/tenants/{tenant}/databases/{database}/collections/{collection_id}/update","href":"/reference/chroma-api/record/update-records"},{"title":"Upsert records","deprecated":null,"version":null,"openapi":"https://api.trychroma.com/openapi.json post /api/v2/tenants/{tenant}/databases/{database}/collections/{collection_id}/upsert","href":"/reference/chroma-api/record/upsert-records"}]},{"group":"System","pages":[{"title":"Healthcheck","deprecated":null,"version":null,"openapi":"https://api.trychroma.com/openapi.json get /api/v2/healthcheck","href":"/reference/chroma-api/system/healthcheck"},{"title":"Heartbeat","deprecated":null,"version":null,"openapi":"https://api.trychroma.com/openapi.json get /api/v2/heartbeat","href":"/reference/chroma-api/system/heartbeat"},{"title":"Pre-flight checks","deprecated":null,"version":null,"openapi":"https://api.trychroma.com/openapi.json get /api/v2/pre-flight-checks","href":"/reference/chroma-api/system/pre-flight-checks"},{"title":"Get version","deprecated":null,"version":null,"openapi":"https://api.trychroma.com/openapi.json get /api/v2/version","href":"/reference/chroma-api/system/get-version"}]},{"group":"Authentication","pages":[{"title":"Get user identity","deprecated":null,"version":null,"openapi":"https://api.trychroma.com/openapi.json get /api/v2/auth/identity","href":"/reference/chroma-api/authentication/get-user-identity"}]}]},{"group":"Chroma Cloud API","pages":[{"group":"Collection","pages":[{"title":"Fork collection","deprecated":null,"version":null,"openapi":"https://api.trychroma.com/openapi.json post /api/v2/tenants/{tenant}/databases/{database}/collections/{collection_id}/fork","href":"/api-reference/collection/fork-collection"}]},{"group":"Function","pages":[{"title":"Attach function","deprecated":null,"version":null,"openapi":"https://api.trychroma.com/openapi.json post /api/v2/tenants/{tenant}/databases/{database}/collections/{collection_id}/functions/attach","href":"/api-reference/function/attach-function"},{"title":"Get attached function","deprecated":null,"version":null,"openapi":"https://api.trychroma.com/openapi.json get /api/v2/tenants/{tenant}/databases/{database}/collections/{collection_id}/functions/{function_name}","href":"/api-reference/function/get-attached-function"},{"title":"Detach function","deprecated":null,"version":null,"openapi":"https://api.trychroma.com/openapi.json post /api/v2/tenants/{tenant}/databases/{database}/collections/{collection_id}/attached_functions/{name}/detach","href":"/api-reference/function/detach-function"}]}]},{"group":"Chroma Sync API","pages":[{"group":"Invocation","pages":[{"title":"List invocations","deprecated":null,"version":null,"openapi":"/sync.openapi.json get /api/v1/invocations","href":"/reference/sync-api/invocation/list-invocations"},{"title":"Get invocation","deprecated":null,"version":null,"openapi":"/sync.openapi.json get /api/v1/invocations/{invocation_id}","href":"/reference/sync-api/invocation/get-invocation"},{"title":"Cancel invocation","deprecated":null,"version":null,"openapi":"/sync.openapi.json put /api/v1/invocations/{invocation_id}","href":"/reference/sync-api/invocation/cancel-invocation"},{"title":"Create invocation","deprecated":null,"version":null,"openapi":"/sync.openapi.json post /api/v1/sources/{source_id}/invocations","href":"/reference/sync-api/invocation/create-invocation"},{"title":"Get latest invocations by keys","deprecated":null,"version":null,"openapi":"/sync.openapi.json post /api/v1/sources/{source_id}/invocations/latest-by-keys","href":"/reference/sync-api/invocation/get-latest-invocations-by-keys"}]},{"group":"Source","pages":[{"title":"List sources","deprecated":null,"version":null,"openapi":"/sync.openapi.json get /api/v1/sources","href":"/reference/sync-api/source/list-sources"},{"title":"Create source","deprecated":null,"version":null,"openapi":"/sync.openapi.json post /api/v1/sources","href":"/reference/sync-api/source/create-source"},{"title":"Get source","deprecated":null,"version":null,"openapi":"/sync.openapi.json get /api/v1/sources/{source_id}","href":"/reference/sync-api/source/get-source"},{"title":"Delete source","deprecated":null,"version":null,"openapi":"/sync.openapi.json delete /api/v1/sources/{source_id}","href":"/reference/sync-api/source/delete-source"}]},{"group":"System","pages":[{"title":"Get service health status","deprecated":null,"version":null,"openapi":"/sync.openapi.json get /health","href":"/reference/sync-api/system/get-service-health-status"}]},{"group":"File Upload","pages":[{"title":"Upload and index a file","deprecated":null,"version":null,"openapi":"/sync.openapi.json post /api/v1/add-file","href":"/reference/sync-api/file-upload/upload-and-index-a-file"}]}]},{"group":"Chroma Cloud Embeddings API","pages":[{"title":"Generate dense embeddings","deprecated":null,"version":null,"openapi":"https://embed.trychroma.com/openapi.json post /embed","href":"/reference/embeddings-api/generate-dense-embeddings"},{"title":"Generate sparse embeddings","deprecated":null,"version":null,"openapi":"https://embed.trychroma.com/openapi.json post /embed_sparse","href":"/reference/embeddings-api/generate-sparse-embeddings"}]}]},{"group":"Dictionary Syntax","pages":[{"title":"Search","href":"/reference/search"},{"title":"Where Filters","href":"/reference/where-filter"}]},{"group":"Architecture","pages":[{"title":"Architecture Overview","href":"/reference/architecture/overview"},{"title":"Distributed Architecture","href":"/reference/architecture/distributed"}]}]}]},"basePath":"","title":"Client - Chroma Docs","buildId":"dpl_Fyv1NbzwP68g2bEH2Roy98uY1zmE","deploymentId":"dpl_Fyv1NbzwP68g2bEH2Roy98uY1zmE","dynamics":[],"chunks":[]}