The library can hold an unlimited number of files, but a maximum of 1GB of files.
Files support the following metadata:
Show properties
uuid
The unique identifier of the file, generated by AI21.
string
The name of the file specified by you.
string
An arbitrary file-path-like string you can assign to indicate the content of a file.
string
The type of the file.
int
The size of the file in bytes.
string[]
The labels associated with the file. You can apply arbitrary string labels to your files and limit queries to files with one or more labels. Similar to paths, but labels do not prefix match. Labels are case-sensitive.
string
The public URL of the file, specified by you. This URL is not validated by AI21 or used in any way. It is strictly a piece of metadata that you can optionally attach to a file.
uuid
The identifier of the user who uploaded the file.
date
The date when the file was uploaded.
date
The last update date of the file in the library.
string
Where was the file uploaded from.
string
The status of the file in the library.
Show supported values
Value
Description
DB_RECORD_CREATED
The file record has been created in the database.
UPLOADED
The file has been uploaded and is being processed.
UPLOAD_FAILED
The file upload has failed.
PROCESSING
The file is currently being processed.
PROCESSED
The file has been processed and is ready for use.
FILE_DOWNLOAD_FAILED
The file download has failed.
PARSING_FAILED
Parsing the file has failed.
SEGMENTATION_FAILED
File segmentation has failed.
EMBEDDING_FAILED
Embedding the file segments has failed.
VECTORS_DB_UPSERT_FAILED
Updating the vector database has failed.
VECTOR_DATA_UPLOAD_TO_STORAGE_FAILED
Uploading the file’s embedding vectors to the storage has failed.
SEGMENTS_UPLOAD_TO_DB_FAILED
Uploading the file’s segments to the database has failed.
PROCESSING_FAILED
The processing of the file has failed.
DELETION_FAILED
The deletion of the file has failed.
RE_PROCESS_CANDIDATE
The file is a candidate for re-processing.
RE_PROCESSING
The file is currently being re-processed.
DELETING
The file is in the process of being deleted.
DELETED_FROM_VECTOR_DB
The file has been deleted from the vector database.
DELETE_REQUEST_DURING_PROCESSING
A delete request was received during processing.
MAX_RETRIES_REACHED
The maximum number of retries has been reached, the operation has failed.
Filtering file results
When you create or update a file, you can optionally apply path and/or label values to a file. You can later search, query, or list files based on matching paths or labels. This can be useful to query subsets of documents.For example, you can assign a path of either /financial/USA or /financial/UK to certain documents and later query only US financial documents, only UK financial documents, or query all financial documents by specifying /financial/ as the path.
Was this page helpful?
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"AI21 Labs","colors":{"primary":"#F098B5","light":"#EE87A7","dark":"#F098B5"},"logo":{"light":"https://mintcdn.com/ai21-demo/ae4eOvPS_ZOlDCYT/images/AI21_Logo_black.png?fit=max\u0026auto=format\u0026n=ae4eOvPS_ZOlDCYT\u0026q=85\u0026s=ff9840432b0d2e9ebcbadc46ee2b5b8f","dark":"https://mintcdn.com/ai21-demo/ae4eOvPS_ZOlDCYT/images/AI21_Logo_white.png?fit=max\u0026auto=format\u0026n=ae4eOvPS_ZOlDCYT\u0026q=85\u0026s=8a9b3dd3ba0831a3431f51d792cef4c3","href":"https://www.ai21.com/"},"favicon":"https://mintcdn.com/ai21-demo/oHuzynnpYbW6Dt6q/favicon.png?fit=max\u0026auto=format\u0026n=oHuzynnpYbW6Dt6q\u0026q=85\u0026s=2b79127bf528ced3b4c82a2245c3977b","appearance":{"default":"light"},"background":{"decoration":"gradient","color":{"dark":"#212121"}},"navbar":{"links":[{"href":"https://studio.ai21.com/v2/workspaces/81189ce4-f4d4-433e-954d-ff17cd040a2a/maestro","label":"Playground"},{"href":"https://studio.ai21.com/v2/account/api-key?source=docs\u0026_gl=1*u1mkxz*_gcl_au*OTIzMDQ5NzU0LjE3NDkyOTE4NjA.","label":"API Key"}],"primary":{"type":"button","label":"Get a Demo","href":"https://www.ai21.com/talk-to-us/"}},"footer":{"socials":{"linkedin":"https://www.linkedin.com/company/ai21","x":"https://twitter.com/AI21Labs","discord":"https://discord.com/invite/cKzg6GEAyB"}},"seo":{"metatags":{"title":"AI21 Labs Documentation","description":"Access full API references, guides, and model capabilities. Learn how to work with AI21's foundation models."}},"fonts":{"heading":{"family":"Polysans","source":"https://www.ai21.com/wp-content/themes/ai21/assets/fonts/polysans/polysans-500.woff2","format":"woff2"},"body":{"family":"Inter"}},"styling":{"codeblocks":"system","latex":false},"integrations":{"amplitude":{"apiKey":"be0223327acdb089744156d19857f1ac"},"intercom":{"appId":"mj4rlz0i"}},"contextual":{"options":["copy","view"],"display":"header"},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"ai21-demo","hasAudioNarration":false,"actualSubdomain":"ai21-demo","customDomains":["docs.ai21.com"],"gitSource":{"type":"github","owner":"ai21labs","repo":"ai21-documentation","deployBranch":"mintlify-migration","contentDirectory":"","isPrivate":true,"mountPath":"","label":""},"feedback":{"thumbs":true},"entitlements":{"AI_CHAT":{"status":"ENABLED"},"REMOVE_BRANDING":{"status":"ENABLED"},"WEB_MCP":{"status":"ENABLED"},"NARRATION":{"status":"ENABLED"}},"buildId":"6ae927afce2e4391f29e39da:success","clientVersion":"0.0.4131","searchFilterCounts":[{"language":"default","tag":"Guides","count":39},{"language":"default","tag":"API Reference","count":15},{"language":"default","tag":"AI21 Maestro","count":14},{"language":"default","tag":"Tools","count":11},{"language":"default","tag":"Foundation Models","count":7},{"language":"default","tag":"File Library Management","count":7},{"language":"default","tag":"AI21 Studio","count":6},{"language":"default","tag":"Private AI","count":4},{"language":"default","tag":"User Provided Tools","count":4},{"language":"default","tag":"Getting Started","count":3}]},"assistantConfig":{},"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":"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":"styles/custom.css","content":".tryit-button{display:none!important}button[aria-label=\"Try it\"]{display:none!important}.centered-table{text-align:center}.centered-table table{margin:0 auto!important;display:table!important}div.centered-table>table{margin-left:auto!important;margin-right:auto!important}.dark .hero{color:#ffffff!important}.dark .hero h1{font-weight:500!important}h1{font-weight:500!important}h2{font-weight:400!important;font-size:1.4rem!important;line-height:1.4!important;letter-spacing:-0.01em!important;margin-bottom:0.6em!important}.category-title{font-size:1.75rem!important;font-weight:500!important;line-height:1.3!important;margin-top:2rem!important;margin-bottom:1rem!important;letter-spacing:normal!important}.home-page a.box h2,.home-page .box h2{font-size:1rem!important;font-weight:400!important;line-height:1.2!important;margin-bottom:0.4em!important;letter-spacing:-0.01em!important}.sidebar a,.sidebar .category,.sidebar .group-title{font-weight:400!important}.sidebar .title{font-weight:300!important}.card h2{font-size:1.125rem!important;font-weight:500!important;line-height:1.5!important;margin-bottom:0.4em!important;letter-spacing:-0.01em!important}.bg-lightmode{background-image:url('https://mintlify-assets.b-cdn.net/ai21-background.svg')}.bg-darkmode{background-image:url('https://mintlify-assets.b-cdn.net/dark-ai21-background2.svg')}"}],"page":{"pagePath":"reference/manage-library-ref","slug":"/reference/manage-library-ref","pageMetadata":{"title":"File Library","sidebarTitle":"Overview","description":null,"href":"/reference/manage-library-ref","hidden":false},"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={code:`code`,p:`p`,tbody:`tbody`,td:`td`,th:`th`,thead:`thead`,tr:`tr`,..._provideComponents(),...props.components},{Expandable,Heading,ResponseField,Table}=_components;if(!Expandable)_missingMdxReference(`Expandable`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!ResponseField)_missingMdxReference(`ResponseField`,true);if(!Table)_missingMdxReference(`Table`,true);return _jsxs(_Fragment,{children:[_jsx(Heading,{level:`2`,id:`overview`,children:`Overview`}),`\n`,_jsx(_components.p,{children:`The library can hold an unlimited number of files, but a maximum of 1GB of files.`}),`\n`,_jsxs(ResponseField,{name:`File metadata`,id:`param-file-metadata`,children:[_jsx(_components.p,{children:`Files support the following metadata:`}),_jsxs(Expandable,{title:`properties`,children:[_jsx(ResponseField,{name:`fileId`,type:`uuid`,id:`param-file-id`,children:_jsx(_components.p,{children:`The unique identifier of the file, generated by AI21.`})}),_jsx(ResponseField,{name:`name`,type:`string`,id:`param-name`,children:_jsx(_components.p,{children:`The name of the file specified by you.`})}),_jsx(ResponseField,{name:`path`,type:`string`,id:`param-path`,children:_jsx(_components.p,{children:`An arbitrary file-path-like string you can assign to indicate the content of a file.`})}),_jsx(ResponseField,{name:`fileType`,type:`string`,id:`param-file-type`,children:_jsx(_components.p,{children:`The type of the file.`})}),_jsx(ResponseField,{name:`sizeBytes`,type:`int`,id:`param-size-bytes`,children:_jsx(_components.p,{children:`The size of the file in bytes.`})}),_jsx(ResponseField,{name:`labels`,type:`string[]`,id:`param-labels`,children:_jsx(_components.p,{children:`The labels associated with the file. You can apply arbitrary string labels to your files and limit queries to files with one or more labels. Similar to paths, but labels do not prefix match. Labels are case-sensitive.`})}),_jsx(ResponseField,{name:`publicUrl`,type:`string`,id:`param-public-url`,children:_jsx(_components.p,{children:`The public URL of the file, specified by you. This URL is not validated by AI21 or used in any way. It is strictly a piece of metadata that you can optionally attach to a file.`})}),_jsx(ResponseField,{name:`createdBy`,type:`uuid`,id:`param-created-by`,children:_jsx(_components.p,{children:`The identifier of the user who uploaded the file.`})}),_jsx(ResponseField,{name:`creationDate`,type:`date`,id:`param-creation-date`,children:_jsx(_components.p,{children:`The date when the file was uploaded.`})}),_jsx(ResponseField,{name:`lastUpdated`,type:`date`,id:`param-last-updated`,children:_jsx(_components.p,{children:`The last update date of the file in the library.`})}),_jsx(ResponseField,{name:`dataSource`,type:`string`,id:`param-data-source`,children:_jsx(_components.p,{children:`Where was the file uploaded from.`})}),_jsx(ResponseField,{name:`status`,type:`string`,id:`param-status`,children:_jsx(_components.p,{children:`The status of the file in the library.`})}),_jsx(Expandable,{title:`supported values`,children:_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Value`}),_jsx(_components.th,{children:`Description`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`DB_RECORD_CREATED`})}),_jsx(_components.td,{children:`The file record has been created in the database.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`UPLOADED`})}),_jsx(_components.td,{children:`The file has been uploaded and is being processed.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`UPLOAD_FAILED`})}),_jsx(_components.td,{children:`The file upload has failed.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`PROCESSING`})}),_jsx(_components.td,{children:`The file is currently being processed.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`PROCESSED`})}),_jsx(_components.td,{children:`The file has been processed and is ready for use.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`FILE_DOWNLOAD_FAILED`})}),_jsx(_components.td,{children:`The file download has failed.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`PARSING_FAILED`})}),_jsx(_components.td,{children:`Parsing the file has failed.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`SEGMENTATION_FAILED`})}),_jsx(_components.td,{children:`File segmentation has failed.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`EMBEDDING_FAILED`})}),_jsx(_components.td,{children:`Embedding the file segments has failed.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`VECTORS_DB_UPSERT_FAILED`})}),_jsx(_components.td,{children:`Updating the vector database has failed.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`VECTOR_DATA_UPLOAD_TO_STORAGE_FAILED`})}),_jsx(_components.td,{children:`Uploading the file’s embedding vectors to the storage has failed.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`SEGMENTS_UPLOAD_TO_DB_FAILED`})}),_jsx(_components.td,{children:`Uploading the file’s segments to the database has failed.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`PROCESSING_FAILED`})}),_jsx(_components.td,{children:`The processing of the file has failed.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`DELETION_FAILED`})}),_jsx(_components.td,{children:`The deletion of the file has failed.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`RE_PROCESS_CANDIDATE`})}),_jsx(_components.td,{children:`The file is a candidate for re-processing.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`RE_PROCESSING`})}),_jsx(_components.td,{children:`The file is currently being re-processed.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`DELETING`})}),_jsx(_components.td,{children:`The file is in the process of being deleted.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`DELETED_FROM_VECTOR_DB`})}),_jsx(_components.td,{children:`The file has been deleted from the vector database.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`DELETE_REQUEST_DURING_PROCESSING`})}),_jsx(_components.td,{children:`A delete request was received during processing.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`MAX_RETRIES_REACHED`})}),_jsx(_components.td,{children:`The maximum number of retries has been reached, the operation has failed.`})]})]})]})})]})]}),`\n`,_jsx(Heading,{level:`4`,id:`filtering-file-results`,children:`Filtering file results`}),`\n`,_jsxs(_components.p,{children:[`When you create or update a file, you can optionally apply `,_jsx(_components.code,{children:`path`}),` and/or `,_jsx(_components.code,{children:`label`}),` values to a file. You can later search, query, or list files based on matching paths or labels. This can be useful to query subsets of documents.`]}),`\n`,_jsxs(_components.p,{children:[`For example, you can assign a path of either `,_jsx(_components.code,{children:`/financial/USA`}),` or `,_jsx(_components.code,{children:`/financial/UK`}),` to certain documents and later query only US financial documents, only UK financial documents, or query all financial documents by specifying `,_jsx(_components.code,{children:`/financial/`}),` as the path.`]})]})}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":{"codeStyling":"system","config":{},"pageMetadata":{"title":"File Library","sidebarTitle":"Overview","description":null,"href":"/reference/manage-library-ref","hidden":false}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Overview","slug":"overview","depth":2,"children":[{"title":"Filtering file results","slug":"filtering-file-results","depth":4,"children":[]}]}],"codeExamples":{}},"jsLinks":[],"subdomain":"ai21-demo","siteName":"AI21 Labs","title":"File Library - AI21 Labs","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-02-19T12:51:32.980Z","originalFileLocation":"reference/manage-library-ref.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=\"light\"}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=\"description\" content=\"Access full API references, guides, and model capabilities. Learn how to work with AI21\u0026#x27;s foundation models.\">\u003cmeta data-mint-head name=\"application-name\" content=\"AI21 Labs\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/ai21-demo/zc4uXZjknsciGHPW/_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/ai21-demo/zc4uXZjknsciGHPW/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/ai21-demo/zc4uXZjknsciGHPW/_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/ai21-demo/zc4uXZjknsciGHPW/_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/ai21-demo/zc4uXZjknsciGHPW/_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/ai21-demo/zc4uXZjknsciGHPW/_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/ai21-demo/zc4uXZjknsciGHPW/_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/ai21-demo/zc4uXZjknsciGHPW/_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/ai21-demo/zc4uXZjknsciGHPW/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"File Library - AI21 Labs\">\u003cmeta data-mint-head property=\"og:description\" content=\"Access full API references, guides, and model capabilities. Learn how to work with AI21\u0026#x27;s foundation models.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"AI21 Labs\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.ai21.com/reference/manage-library-ref\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://ai21-demo.mintlify.site/_mintlify/api/og/v2?division=File+Library+Management\u0026amp;title=File+Library\u0026amp;theme=db641889c50a4115ea9b934e\u0026amp;signature=1054f1667fa4ba1abf4174efcf7b8dac1a6ca249eba5bca7191c3c5b0b6c2428\">\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=\"File Library - AI21 Labs\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Access full API references, guides, and model capabilities. Learn how to work with AI21\u0026#x27;s foundation models.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://ai21-demo.mintlify.site/_mintlify/api/og/v2?division=File+Library+Management\u0026amp;title=File+Library\u0026amp;theme=db641889c50a4115ea9b934e\u0026amp;signature=1054f1667fa4ba1abf4174efcf7b8dac1a6ca249eba5bca7191c3c5b0b6c2428\">\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/ai21-demo/zc4uXZjknsciGHPW/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"AI21 Labs\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#F098B5\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.ai21.com/reference/manage-library-ref\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/reference/manage-library-ref.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.ai21.com/#organization\",\"name\":\"AI21 Labs\",\"url\":\"https://docs.ai21.com\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/ai21-demo/ae4eOvPS_ZOlDCYT/images/AI21_Logo_black.png?fit=max\u0026auto=format\u0026n=ae4eOvPS_ZOlDCYT\u0026q=85\u0026s=ff9840432b0d2e9ebcbadc46ee2b5b8f\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.ai21.com#website\",\"name\":\"AI21 Labs\",\"url\":\"https://docs.ai21.com\",\"publisher\":{\"@id\":\"https://docs.ai21.com/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.ai21.com/reference/manage-library-ref#webpage\",\"url\":\"https://docs.ai21.com/reference/manage-library-ref\",\"name\":\"File Library\",\"dateModified\":\"2026-02-19T12:51:32.980Z\",\"isPartOf\":{\"@id\":\"https://docs.ai21.com#website\"},\"breadcrumb\":{\"@id\":\"https://docs.ai21.com/reference/manage-library-ref#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.ai21.com/reference/manage-library-ref#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"AI21 Labs\",\"item\":\"https://docs.ai21.com\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"File Library\",\"item\":\"https://docs.ai21.com/reference/manage-library-ref\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://docs.ai21.com/reference/manage-library-ref#article\",\"headline\":\"File Library\",\"name\":\"File Library\",\"url\":\"https://docs.ai21.com/reference/manage-library-ref\",\"mainEntityOfPage\":{\"@id\":\"https://docs.ai21.com/reference/manage-library-ref#webpage\"},\"dateModified\":\"2026-02-19T12:51:32.980Z\",\"publisher\":{\"@id\":\"https://docs.ai21.com/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.ai21.com#website\"}}]}\u003c/script>","agentPointerHref":"/reference/manage-library-ref.md","siteName":"AI21 Labs","nav":{"global":null,"tabs":[{"tab":"Home","pages":[{"title":"Home","href":"/home"}]},{"tab":"Guides","pages":[{"title":"Guides","href":"/docs/overview"}]},{"tab":"API Reference","groups":[{"group":"Using the APIs","pages":[{"title":"Introduction","href":"/reference/introduction"},{"title":"Authentication","href":"/reference/authentication"},{"title":"Rate Limits","href":"/reference/api-rate-limits"}]},{"group":"AI21 Maestro","pages":[{"title":"Create run","api":"POST https://api.ai21.com/studio/v1/maestro/runs","href":"/reference/maestro-create-run"},{"title":"Retrieve run status","api":"GET https://api.ai21.com/studio/v1/maestro/runs/{run_id}","href":"/reference/retrieve-run"},{"title":"Run object","mode":"wide","href":"/reference/run-object"}]},{"group":"Foundation Models","pages":[{"title":" Chat request","sidebarTitle":"Chat request","api":"POST https://api.ai21.com/studio/v1/chat/completions","href":"/reference/jamba-1-6-api-ref"},{"title":"Chat response","description":null,"href":"/reference/jamba-api-response"}]},{"group":"File Library Management","pages":[{"title":"File Library","sidebarTitle":"Overview","href":"/reference/manage-library-ref"},{"title":"Upload workspace files","description":"Upload files to use. ","api":"POST https://api.ai21.com/studio/v1/library/files","href":"/reference/manage-library-ref/upload-workspace-files"},{"title":"List library files","api":"GET https://api.ai21.com/studio/v1/library/files","href":"/reference/manage-library-ref/list-library-files"},{"title":"Get workspace file","api":"GET https://api.ai21.com/studio/v1/library/files/{file_id}","href":"/reference/manage-library-ref/get-workspace-files"},{"title":"Get file download link","api":"GET https://api.ai21.com/studio/v1/library/files/{file_id}/download","href":"/reference/manage-library-ref/get-file-download-link"},{"title":"Update file","api":"PUT https://api.ai21.com/studio/v1/library/files/{file_id}","href":"/reference/manage-library-ref/update-file"},{"title":"Delete file","api":"DELETE https://api.ai21.com/studio/v1/library/files/{file_id}","href":"/reference/manage-library-ref/delete-file"}]}]},{"tab":"Updates","pages":[{"title":"Updates","href":"/changelog"}]}]},"basePath":"","title":"File Library - AI21 Labs","buildId":"dpl_5joLUXmnJgwqjrHAS4dxZrQTdxgh","deploymentId":"dpl_5joLUXmnJgwqjrHAS4dxZrQTdxgh","dynamics":[],"chunks":[]}