{"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.4271","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":"site-roles","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":"starter-pricing","enabled":true,"variant":{"name":"control","enabled":true,"payload":{"type":"string","value":"control"},"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"wildcard-email-auth","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/collection","slug":"/reference/typescript/collection","pageMetadata":{"title":"Collection","description":null,"href":"/reference/typescript/collection"},"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:`collection-methods`,children:`Collection Methods`}),`\n`,_jsx(Heading,{level:`3`,id:`count`,children:`count`}),`\n`,_jsx(_components.p,{children:`Gets the total number of records in the collection`}),`\n`,_jsx(Heading,{level:`3`,id:`add`,children:`add`}),`\n`,_jsx(_components.p,{children:`Adds new records to the collection.`}),`\n`,_jsx(ParamField,{path:`ids`,type:`string[]`,required:true,id:`param-ids`}),`\n`,_jsx(ParamField,{path:`embeddings`,type:`Embeddings`,id:`param-embeddings`}),`\n`,_jsx(ParamField,{path:`metadatas`,type:`Metadata[]`,id:`param-metadatas`}),`\n`,_jsx(ParamField,{path:`documents`,type:`string[]`,id:`param-documents`}),`\n`,_jsx(ParamField,{path:`uris`,type:`string[]`,id:`param-uris`}),`\n`,_jsx(Heading,{level:`3`,id:`get`,children:`get`}),`\n`,_jsx(_components.p,{children:`Retrieves records from the collection based on filters.`}),`\n`,_jsx(ParamField,{path:`ids`,type:`string[]`,id:`param-ids-1`}),`\n`,_jsx(ParamField,{path:`where`,type:`Where`,id:`param-where`}),`\n`,_jsx(ParamField,{path:`limit`,type:`number`,id:`param-limit`}),`\n`,_jsx(ParamField,{path:`offset`,type:`number`,id:`param-offset`}),`\n`,_jsx(ParamField,{path:`whereDocument`,type:`WhereDocument`,id:`param-where-document`}),`\n`,_jsx(ParamField,{path:`include`,type:`Include[]`,id:`param-include`}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Returns:`}),` Promise resolving to matching records`]}),`\n`,_jsx(Heading,{level:`3`,id:`peek`,children:`peek`}),`\n`,_jsx(_components.p,{children:`Retrieves a preview of records from the collection.`}),`\n`,_jsx(ParamField,{path:`limit`,type:`number`,id:`param-limit-1`}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Returns:`}),` Promise resolving to a sample of records`]}),`\n`,_jsx(Heading,{level:`3`,id:`query`,children:`query`}),`\n`,_jsx(_components.p,{children:`Performs similarity search on the collection.`}),`\n`,_jsx(ParamField,{path:`queryEmbeddings`,type:`Embeddings`,id:`param-query-embeddings`}),`\n`,_jsx(ParamField,{path:`queryTexts`,type:`string[]`,id:`param-query-texts`}),`\n`,_jsx(ParamField,{path:`queryURIs`,type:`string[]`,id:`param-query-uris`}),`\n`,_jsx(ParamField,{path:`ids`,type:`string[]`,id:`param-ids-2`}),`\n`,_jsx(ParamField,{path:`nResults`,type:`number`,id:`param-n-results`}),`\n`,_jsx(ParamField,{path:`where`,type:`Where`,id:`param-where-1`}),`\n`,_jsx(ParamField,{path:`whereDocument`,type:`WhereDocument`,id:`param-where-document-1`}),`\n`,_jsx(ParamField,{path:`include`,type:`Include[]`,id:`param-include-1`}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Returns:`}),` Promise resolving to similar records ranked by distance`]}),`\n`,_jsx(Heading,{level:`3`,id:`modify`,children:`modify`}),`\n`,_jsx(_components.p,{children:`Modifies collection properties like name, metadata, or configuration.`}),`\n`,_jsx(ParamField,{path:`name`,type:`string`,id:`param-name`}),`\n`,_jsx(ParamField,{path:`metadata`,type:`CollectionMetadata`,id:`param-metadata`}),`\n`,_jsx(ParamField,{path:`configuration`,type:`UpdateCollectionConfiguration`,id:`param-configuration`}),`\n`,_jsx(Heading,{level:`3`,id:`update`,children:`update`}),`\n`,_jsx(_components.p,{children:`Updates existing records in the collection.`}),`\n`,_jsx(ParamField,{path:`ids`,type:`string[]`,required:true,id:`param-ids-3`}),`\n`,_jsx(ParamField,{path:`embeddings`,type:`Embeddings`,id:`param-embeddings-1`}),`\n`,_jsx(ParamField,{path:`metadatas`,type:`Metadata[]`,id:`param-metadatas-1`}),`\n`,_jsx(ParamField,{path:`documents`,type:`string[]`,id:`param-documents-1`}),`\n`,_jsx(ParamField,{path:`uris`,type:`string[]`,id:`param-uris-1`}),`\n`,_jsx(Heading,{level:`3`,id:`upsert`,children:`upsert`}),`\n`,_jsx(_components.p,{children:`Inserts new records or updates existing ones (upsert operation).`}),`\n`,_jsx(ParamField,{path:`ids`,type:`string[]`,required:true,id:`param-ids-4`}),`\n`,_jsx(ParamField,{path:`embeddings`,type:`Embeddings`,id:`param-embeddings-2`}),`\n`,_jsx(ParamField,{path:`metadatas`,type:`Metadata[]`,id:`param-metadatas-2`}),`\n`,_jsx(ParamField,{path:`documents`,type:`string[]`,id:`param-documents-2`}),`\n`,_jsx(ParamField,{path:`uris`,type:`string[]`,id:`param-uris-2`}),`\n`,_jsx(Heading,{level:`3`,id:`delete`,children:`delete`}),`\n`,_jsx(_components.p,{children:`Deletes records from the collection based on filters.`}),`\n`,_jsx(ParamField,{path:`ids`,type:`string[]`,id:`param-ids-5`}),`\n`,_jsx(ParamField,{path:`where`,type:`Where`,id:`param-where-2`}),`\n`,_jsx(ParamField,{path:`whereDocument`,type:`WhereDocument`,id:`param-where-document-2`}),`\n`,_jsx(Heading,{level:`3`,id:`search`,children:`search`}),`\n`,_jsx(_components.p,{children:`Performs hybrid search on the collection using expression builders.`}),`\n`,_jsx(ParamField,{path:`searches`,type:`SearchLike | SearchLike[]`,required:true,id:`param-searches`,children:_jsx(_components.p,{children:`Single search payload or array of payloads`})}),`\n`,_jsx(ParamField,{path:`readLevel`,type:`ReadLevel`,id:`param-read-level`}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Returns:`}),` Promise resolving to column-major search results`]}),`\n`,_jsx(_components.hr,{}),`\n`,_jsx(Heading,{level:`2`,id:`types`,children:`Types`}),`\n`,_jsx(Heading,{level:`3`,id:`getresult`,children:`GetResult`}),`\n`,_jsx(_components.p,{children:`Result class for get operations, containing retrieved records.`}),`\n`,_jsx(`span`,{class:`mint-text-sm`,children:`Properties`}),`\n`,_jsx(ParamField,{path:`documents`,type:`(string | null)[]`,id:`param-documents-3`}),`\n`,_jsx(ParamField,{path:`embeddings`,type:`Embeddings`,id:`param-embeddings-3`}),`\n`,_jsx(ParamField,{path:`ids`,type:`string[]`,id:`param-ids-6`}),`\n`,_jsx(ParamField,{path:`include`,type:`Include[]`,id:`param-include-2`}),`\n`,_jsx(ParamField,{path:`metadatas`,type:`(TMeta | null)[]`,id:`param-metadatas-3`}),`\n`,_jsx(ParamField,{path:`uris`,type:`(string | null)[]`,id:`param-uris-3`}),`\n`,_jsx(Heading,{level:`3`,id:`queryresult`,children:`QueryResult`}),`\n`,_jsx(_components.p,{children:`Result class for query operations, containing search results.`}),`\n`,_jsx(`span`,{class:`mint-text-sm`,children:`Properties`}),`\n`,_jsx(ParamField,{path:`distances`,type:`(number | null)[][]`,id:`param-distances`}),`\n`,_jsx(ParamField,{path:`documents`,type:`(string | null)[][]`,id:`param-documents-4`}),`\n`,_jsx(ParamField,{path:`embeddings`,type:`(Embedding | null)[][]`,id:`param-embeddings-4`}),`\n`,_jsx(ParamField,{path:`ids`,type:`string[][]`,id:`param-ids-7`}),`\n`,_jsx(ParamField,{path:`include`,type:`Include[]`,id:`param-include-3`}),`\n`,_jsx(ParamField,{path:`metadatas`,type:`(TMeta | null)[][]`,id:`param-metadatas-4`}),`\n`,_jsx(ParamField,{path:`uris`,type:`(string | null)[][]`,id:`param-uris-4`})]})}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":"Collection","description":null,"href":"/reference/typescript/collection"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Collection Methods","slug":"collection-methods","depth":2,"children":[{"title":"count","slug":"count","depth":3,"children":[]},{"title":"add","slug":"add","depth":3,"children":[]},{"title":"get","slug":"get","depth":3,"children":[]},{"title":"peek","slug":"peek","depth":3,"children":[]},{"title":"query","slug":"query","depth":3,"children":[]},{"title":"modify","slug":"modify","depth":3,"children":[]},{"title":"update","slug":"update","depth":3,"children":[]},{"title":"upsert","slug":"upsert","depth":3,"children":[]},{"title":"delete","slug":"delete","depth":3,"children":[]},{"title":"search","slug":"search","depth":3,"children":[]}]},{"title":"Types","slug":"types","depth":2,"children":[{"title":"GetResult","slug":"getresult","depth":3,"children":[]},{"title":"QueryResult","slug":"queryresult","depth":3,"children":[]}]}],"codeExamples":{}},"jsLinks":[],"dynamicCss":".mint-text-sm {\n font-size: 0.875rem;\n line-height: 1.25rem\n}","subdomain":"chroma-8943dec5","siteName":"Chroma Docs","title":"Collection - Chroma Docs","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-10-09T18:51:33.907Z","originalFileLocation":"reference/typescript/collection.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=\"Collection - 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/collection\">\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=Collection\u0026amp;theme=d07ad52d696ec9dcc96b1828\u0026amp;signature=fb2718b65772938e6b03f81ddb5291d193e68890fd095ada619902c5a15c0f6c\">\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=\"Collection - Chroma Docs\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://chroma-8943dec5.mintlify.site/_mintlify/api/og/v2?division=TypeScript\u0026amp;title=Collection\u0026amp;theme=d07ad52d696ec9dcc96b1828\u0026amp;signature=fb2718b65772938e6b03f81ddb5291d193e68890fd095ada619902c5a15c0f6c\">\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/collection\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/reference/typescript/collection.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/collection#webpage\",\"url\":\"https://docs.trychroma.com/reference/typescript/collection\",\"name\":\"Collection\",\"dateModified\":\"2026-10-09T18:51:33.907Z\",\"isPartOf\":{\"@id\":\"https://docs.trychroma.com#website\"},\"breadcrumb\":{\"@id\":\"https://docs.trychroma.com/reference/typescript/collection#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.trychroma.com/reference/typescript/collection#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"SDKs\",\"item\":\"https://docs.trychroma.com/reference/python/client\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"TypeScript\",\"item\":\"https://docs.trychroma.com/reference/typescript/client\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Collection\",\"item\":\"https://docs.trychroma.com/reference/typescript/collection\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://docs.trychroma.com/reference/typescript/collection#article\",\"headline\":\"Collection\",\"name\":\"Collection\",\"url\":\"https://docs.trychroma.com/reference/typescript/collection\",\"mainEntityOfPage\":{\"@id\":\"https://docs.trychroma.com/reference/typescript/collection#webpage\"},\"dateModified\":\"2026-10-09T18:51:33.907Z\",\"publisher\":{\"@id\":\"https://docs.trychroma.com/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.trychroma.com#website\"}}]}\u003c/script>","agentPointerHref":"/reference/typescript/collection.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","href":"/reference/python/where-filter"}]},{"group":"TypeScript","pages":[{"title":"Client","description":null,"href":"/reference/typescript/client"},{"title":"Collection","href":"/reference/typescript/collection"},{"title":"Embedding Functions","description":null,"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":"Collection - Chroma Docs","deploymentId":"dpl_Em2U4NQQ2N2DE3HPbPUJVZLnAtvc","buildId":"dpl_Em2U4NQQ2N2DE3HPbPUJVZLnAtvc","dynamics":[],"chunks":[]}