For more information on billing units and pricing, check our pricing page.Current
Current version
File uploads accept documents as multipart form data and return per-file results. Use them when you want Pangram to extract text from files and create dashboard-backed AI detection results.
POST /
Upload one or more files for AI detection.
POST https://file-external.api.pangram.com
This endpoint must receive multipart/form-data with a form field named files. Requests without that field return 422 Unprocessable Entity with Field required for body.files.
File prediction currently uses Pangram’s default model. This endpoint does not accept a model field.
Request
Send the request as multipart/form-data.When using cURL, do not set the Content-Type header yourself. The -F flags add the multipart boundary automatically.
Field
Type
Required
Description
files
file[]
Yes
Files to analyze. Include the files form field once per uploaded file.
public_dashboard_link
boolean
No
Whether to create and return a public dashboard link for each uploaded file. Defaults to false.
Response
Returns a JSON array with one result object per uploaded file.
Field
Type
Description
public_dashboard_link
string
Public dashboard URL for the uploaded file. Present when public_dashboard_link is true.
The multipart request is missing a file or includes invalid form data.
401 Unauthorized
The x-api-key is missing or invalid.
402 Payment Required
The account has insufficient credits.
413 Payload Too Large
The upload exceeds the maximum supported file size.
415 Unsupported Media Type
The uploaded file type is not supported.
422 Unprocessable Entity
The files field is missing, the form data is invalid, or Pangram could not extract valid text from the uploaded file.
500 Internal Server Error
There was an error processing the upload.
Authorizations
x-api-key
string
header
required
Body
multipart/form-data
files
file[]
required
Files to analyze. Send this form field once per uploaded file.
public_dashboard_link
boolean
default:false
Whether to create and return a public dashboard link for each uploaded file.
Response
Per-file upload results.
public_dashboard_link
string<uri>
Public dashboard URL for the uploaded file.
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"Pangram Labs","colors":{"primary":"#FF6106","light":"#FF6106","dark":"#FECAB9"},"logo":{"light":"https://mintcdn.com/pangram/jG4ouS_l0em4HkHV/logo/light.svg?fit=max\u0026auto=format\u0026n=jG4ouS_l0em4HkHV\u0026q=85\u0026s=8b5e8d04b0d2aeb0cb557c7688a29f65","dark":"https://mintcdn.com/pangram/jG4ouS_l0em4HkHV/logo/dark.svg?fit=max\u0026auto=format\u0026n=jG4ouS_l0em4HkHV\u0026q=85\u0026s=a489902ce76f8470eae174894764d62f"},"favicon":"https://mintcdn.com/pangram/jG4ouS_l0em4HkHV/favicon.svg?fit=max\u0026auto=format\u0026n=jG4ouS_l0em4HkHV\u0026q=85\u0026s=e0b196e83db26d8d2b13d6812d3acfab","api":{"playground":{"display":"interactive"},"examples":{"defaults":"required","languages":["curl","python"]},"mdx":{"auth":{"method":"key","name":"x-api-key"}}},"navbar":{"links":[{"href":"mailto:support@pangram.com","label":"Support"}]},"footer":{"socials":{}},"styling":{"latex":false},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"pangram","hasAudioNarration":false,"actualSubdomain":"pangram","customDomains":["docs.pangram.com"],"gitSource":{"type":"github","owner":"pangramlabs","repo":"docs","deployBranch":"main","contentDirectory":"","isPrivate":false,"mountPath":"","label":""},"entitlements":{},"buildId":"6af39f6c7f249fb75360a1d1","clientVersion":"0.0.4177","searchFilterCounts":[{"language":"default","tag":"REST API","count":20},{"language":"default","tag":"Account APIs","count":3},{"language":"default","tag":"Guides","count":3},{"language":"default","tag":"Getting Started","count":3},{"language":"default","tag":"Deprecated","count":1},{"language":"default","tag":"Python SDK","count":1},{"language":"default","tag":"Reference","count":1}]},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":false,"enableAskAiSearchBar":true},"basePath":"","hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[],"googleFontsInlined":false},"customCss":[{"filePath":"style.css","content":"[data-testid=\"copy-code-button\"] svg{color:#4b5563}[data-testid=\"copy-code-button\"]:hover svg{color:#1f2937}.dark [data-testid=\"copy-code-button\"] svg{color:rgb(255 255 255 / 0.7)}.dark [data-testid=\"copy-code-button\"]:hover svg{color:#ffffff}"}],"page":{"pagePath":"api-reference/file-external","slug":"/api-reference/file-external","pageMetadata":{"title":"File Upload","description":"Upload files for AI detection and receive dashboard links","openapi":"openapi/file-upload.json POST /","href":"/api-reference/file-external"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"Upload files for AI detection and receive dashboard links\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"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={a:`a`,code:`code`,p:`p`,pre:`pre`,span:`span`,strong:`strong`,tbody:`tbody`,td:`td`,th:`th`,thead:`thead`,tr:`tr`,..._provideComponents(),...props.components},{Badge,CodeBlock,Heading,Note,Table,Update}=_components;if(!Badge)_missingMdxReference(`Badge`,true);if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Note)_missingMdxReference(`Note`,true);if(!Table)_missingMdxReference(`Table`,true);if(!Update)_missingMdxReference(`Update`,true);return _jsxs(_Fragment,{children:[_jsxs(_components.p,{children:[`For more information on billing units and pricing, check our `,_jsx(_components.a,{href:`https://www.pangram.com/pricing`,children:`pricing page`}),`.`]}),`\n`,_jsx(Badge,{color:`green`,children:`Current`}),`\n`,_jsx(Update,{label:`File Upload`,description:`Current version`,id:`file-upload`,children:_jsx(_components.p,{children:`File uploads accept documents as multipart form data and return per-file results. Use them when you want Pangram to extract text from files and create dashboard-backed AI detection results.`})}),`\n`,_jsx(Heading,{level:`2`,id:`post-/`,children:`POST /`}),`\n`,_jsx(_components.p,{children:`Upload one or more files for AI detection.`}),`\n`,_jsx(CodeBlock,{numberOfLines:`2`,language:`text`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`text`,children:_jsxs(_components.code,{language:`text`,numberOfLines:`2`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`POST https://file-external.api.pangram.com`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})})]})})}),`\n`,_jsxs(_components.p,{children:[`This endpoint must receive `,_jsx(_components.code,{children:`multipart/form-data`}),` with a form field named `,_jsx(_components.code,{children:`files`}),`. Requests without that field return `,_jsx(_components.code,{children:`422 Unprocessable Entity`}),` with `,_jsx(_components.code,{children:`Field required`}),` for `,_jsx(_components.code,{children:`body.files`}),`.`]}),`\n`,_jsx(Note,{children:_jsxs(_components.p,{children:[`File prediction currently uses Pangram’s default model. This endpoint does not accept a `,_jsx(_components.code,{children:`model`}),` field.`]})}),`\n`,_jsx(Heading,{level:`3`,id:`request`,children:`Request`}),`\n`,_jsxs(_components.p,{children:[`Send the request as `,_jsx(_components.code,{children:`multipart/form-data`}),`.`]}),`\n`,_jsxs(_components.p,{children:[`When using cURL, do not set the `,_jsx(_components.code,{children:`Content-Type`}),` header yourself. The `,_jsx(_components.code,{children:`-F`}),` flags add the multipart boundary automatically.`]}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Field`}),_jsx(_components.th,{children:`Type`}),_jsx(_components.th,{children:`Required`}),_jsx(_components.th,{children:`Description`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`files`})}),_jsx(_components.td,{children:`file[]`}),_jsx(_components.td,{children:`Yes`}),_jsxs(_components.td,{children:[`Files to analyze. Include the `,_jsx(_components.code,{children:`files`}),` form field once per uploaded file.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`public_dashboard_link`})}),_jsx(_components.td,{children:`boolean`}),_jsx(_components.td,{children:`No`}),_jsxs(_components.td,{children:[`Whether to create and return a public dashboard link for each uploaded file. Defaults to `,_jsx(_components.code,{children:`false`}),`.`]})]})]})]}),`\n`,_jsx(Heading,{level:`3`,id:`response`,children:`Response`}),`\n`,_jsx(_components.p,{children:`Returns a JSON array with one result object per uploaded file.`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Field`}),_jsx(_components.th,{children:`Type`}),_jsx(_components.th,{children:`Description`})]})}),_jsx(_components.tbody,{children:_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`public_dashboard_link`})}),_jsx(_components.td,{children:`string`}),_jsxs(_components.td,{children:[`Public dashboard URL for the uploaded file. Present when `,_jsx(_components.code,{children:`public_dashboard_link`}),` is `,_jsx(_components.code,{children:`true`}),`.`]})]})})]}),`\n`,_jsx(Heading,{level:`3`,id:`example`,children:`Example`}),`\n`,_jsx(CodeBlock,{filename:`cURL`,numberOfLines:`4`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`4`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`curl`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` -s -X POST https://file-external.api.pangram.com \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` -H `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"x-api-key: $PANGRAM_API_KEY\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` -F `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"files=@modeling/deployments/test/test_document.docx\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` -F `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"public_dashboard_link=true\"`})]}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`To upload multiple files, repeat the `,_jsx(_components.code,{children:`files`}),` form field:`]}),`\n`,_jsx(CodeBlock,{filename:`cURL`,numberOfLines:`5`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`5`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`curl`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` -s -X POST https://file-external.api.pangram.com \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` -H `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"x-api-key: $PANGRAM_API_KEY\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` -F `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"files=@path/to/first.docx\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` -F `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"files=@path/to/second.pdf\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` -F `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"public_dashboard_link=true\"`})]}),`\n`]})})}),`\n`,_jsx(_components.p,{children:_jsx(_components.strong,{children:`Example Response`})}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`5`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`5`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`[`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"public_dashboard_link\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"https://www.pangram.com/history/123e4567-e89b-12d3-a456-426614174000\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`]`})}),`\n`]})})}),`\n`,_jsx(_components.p,{children:`To print only the dashboard link:`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`5`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`5`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`curl`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` -s -X POST https://file-external.api.pangram.com \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` -H `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"x-api-key: $PANGRAM_API_KEY\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` -F `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"files=@modeling/deployments/test/test_document.docx\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` -F `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"public_dashboard_link=true\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` | `}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`jq`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` -r `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'.[0].public_dashboard_link'`})]}),`\n`]})})}),`\n`,_jsx(Heading,{level:`2`,id:`errors`,children:`Errors`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Status Code`}),_jsx(_components.th,{children:`Description`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`400 Bad Request`})}),_jsx(_components.td,{children:`The multipart request is missing a file or includes invalid form data.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`401 Unauthorized`})}),_jsxs(_components.td,{children:[`The `,_jsx(_components.code,{children:`x-api-key`}),` is missing or invalid.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`402 Payment Required`})}),_jsx(_components.td,{children:`The account has insufficient credits.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`413 Payload Too Large`})}),_jsx(_components.td,{children:`The upload exceeds the maximum supported file size.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`415 Unsupported Media Type`})}),_jsx(_components.td,{children:`The uploaded file type is not supported.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`422 Unprocessable Entity`})}),_jsxs(_components.td,{children:[`The `,_jsx(_components.code,{children:`files`}),` field is missing, the form data is invalid, or Pangram could not extract valid text from the uploaded file.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`500 Internal Server Error`})}),_jsx(_components.td,{children:`There was an error processing the upload.`})]})]})]})]})}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":"File Upload","description":"Upload files for AI detection and receive dashboard links","openapi":"openapi/file-upload.json POST /","href":"/api-reference/file-external"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"File Upload","slug":"file-upload","depth":1,"children":[]},{"title":"POST /","slug":"post-/","depth":2,"children":[{"title":"Request","slug":"request","depth":3,"children":[]},{"title":"Response","slug":"response","depth":3,"children":[]},{"title":"Example","slug":"example","depth":3,"children":[]}]},{"title":"Errors","slug":"errors","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":[],"openApiReferenceData":{"operation":{"summary":"Upload files","description":"Upload files for AI detection and receive dashboard links","operationId":"uploadFiles","x-codeSamples":[{"lang":"bash","label":"cURL","source":"curl -s -X POST https://file-external.api.pangram.com \\\n -H \"x-api-key: $PANGRAM_API_KEY\" \\\n -F \"files=@modeling/deployments/test/test_document.docx\" \\\n -F \"public_dashboard_link=true\""}],"security":["5d89ea14-988c-4b15-90c9-19b342cb15a6"],"requestBody":"b4a6ed68-6aa8-4a3e-8172-6be69af23c89","responses":{"200":"d64a493b-fe59-4b55-b135-0ed14be4d891","400":"73eecf05-b5aa-4418-be4f-95bc42830c2a","401":"1039ba4d-346a-4a82-8f5c-a83232183eeb","402":"3d21517d-0a0a-4510-95e2-71dec3e5e1fd","413":"4d0e1cb4-70db-4041-845b-44107b5f368f","415":"a6f70c44-0abd-4f5e-887f-65872d04fa2a","422":"d9754b15-ed11-4552-959a-cae650dc5e67","500":"fd057714-7312-4d9d-83e1-fbfb2ef2e89f"},"method":"post","type":"path","servers":["8ff7b7fc-a689-46e3-b30a-05431e2bc1e8"],"path":"/","baseUrlOptions":["https://file-external.api.pangram.com"],"title":"Upload files","codeSamples":[{"label":"cURL","lang":"bash","source":"curl -s -X POST https://file-external.api.pangram.com \\\n -H \"x-api-key: $PANGRAM_API_KEY\" \\\n -F \"files=@modeling/deployments/test/test_document.docx\" \\\n -F \"public_dashboard_link=true\""}],"requestExampleLanguages":["bash","python"],"requiredOnlyExamples":true,"requestExampleType":"codeSamples","responseExampleType":"generated"},"dependencies":{"parameters":{},"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","required":["files"],"properties":{"files":{"type":"array","description":"Files to analyze. Send this form field once per uploaded file.","items":{"type":"string","format":"binary","uniqueKey":"files.items.[INDEX]","typeLabel":"file"},"isRequired":true,"uniqueKey":"files","typeLabel":"file[]"},"public_dashboard_link":{"type":"boolean","description":"Whether to create and return a public dashboard link for each uploaded file.","default":false,"uniqueKey":"public_dashboard_link","typeLabel":"boolean"}},"uniqueKey":"","typeLabel":"object"},"encoding":{"files":{"style":"form","explode":true,"contentType":"application/octet-stream"}},"examples":{"Example":{"title":"Example","value":{"files":["\u003cstring>"],"public_dashboard_link":false}}},"exampleType":"generated"}},"exampleType":"generated"},"responses":{"d64a493b-fe59-4b55-b135-0ed14be4d891":{"description":"Per-file upload results.","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"public_dashboard_link":{"type":"string","format":"uri","description":"Public dashboard URL for the uploaded file.","uniqueKey":"items.[INDEX].public_dashboard_link","typeLabel":"string\u003curi>"}},"uniqueKey":"items.[INDEX]","typeLabel":"object"},"uniqueKey":"","typeLabel":"object[]"},"example":[{"public_dashboard_link":"https://www.pangram.com/history/123e4567-e89b-12d3-a456-426614174000"}],"examples":{"Example":{"title":"Example","value":[{"public_dashboard_link":"https://www.pangram.com/history/123e4567-e89b-12d3-a456-426614174000"}]}},"exampleType":"examples"}},"exampleType":"examples"},"73eecf05-b5aa-4418-be4f-95bc42830c2a":{"description":"The multipart request is missing a file or includes invalid form data.","content":{"_mintlify/placeholder":{"schema":{"type":"object","description":""}}}},"1039ba4d-346a-4a82-8f5c-a83232183eeb":{"description":"The x-api-key is missing or invalid.","content":{"_mintlify/placeholder":{"schema":{"type":"object","description":""}}}},"3d21517d-0a0a-4510-95e2-71dec3e5e1fd":{"description":"The account has insufficient credits.","content":{"_mintlify/placeholder":{"schema":{"type":"object","description":""}}}},"4d0e1cb4-70db-4041-845b-44107b5f368f":{"description":"The upload exceeds the maximum supported file size.","content":{"_mintlify/placeholder":{"schema":{"type":"object","description":""}}}},"a6f70c44-0abd-4f5e-887f-65872d04fa2a":{"description":"The uploaded file type is not supported.","content":{"_mintlify/placeholder":{"schema":{"type":"object","description":""}}}},"d9754b15-ed11-4552-959a-cae650dc5e67":{"description":"The files field is missing, the form data is invalid, or Pangram could not extract valid text from the uploaded file.","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","uniqueKey":"detail.items.[INDEX].type","typeLabel":"string"},"loc":{"type":"array","items":{"type":"string","uniqueKey":"detail.items.[INDEX].loc.items.[INDEX]","typeLabel":"string"},"uniqueKey":"detail.items.[INDEX].loc","typeLabel":"string[]"},"msg":{"type":"string","uniqueKey":"detail.items.[INDEX].msg","typeLabel":"string"},"input":{"oneOf":[{}],"uniqueKey":"detail.items.[INDEX].input","typeLabel":"any"}},"uniqueKey":"detail.items.[INDEX]","typeLabel":"object"},"uniqueKey":"detail","typeLabel":"object[]"}},"uniqueKey":"","typeLabel":"object"},"example":{"detail":[{"type":"missing","loc":["body","files"],"msg":"Field required","input":null}]},"examples":{"Example":{"title":"Example","value":{"detail":[{"type":"missing","loc":["body","files"],"msg":"Field required","input":null}]}}},"exampleType":"examples"}},"exampleType":"examples"},"fd057714-7312-4d9d-83e1-fbfb2ef2e89f":{"description":"There was an error processing the upload.","content":{"_mintlify/placeholder":{"schema":{"type":"object","description":""}}}}},"security":{"5d89ea14-988c-4b15-90c9-19b342cb15a6":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"x-api-key","scopes":[],"schemeName":"ApiKeyAuth"}}},"servers":{"8ff7b7fc-a689-46e3-b30a-05431e2bc1e8":{"url":"https://file-external.api.pangram.com"}},"processedSecurityOptions":[{"schemes":[{"scheme":{"type":"apiKey","in":"header","name":"x-api-key","scopes":[],"schemeName":"ApiKeyAuth"},"schema":{"title":"x-api-key","type":"string","isRequired":true,"typeLabel":"string","deprecated":false},"schemeName":"ApiKeyAuth","name":"x-api-key"}],"title":"ApiKeyAuth"}]},"originalFileLocation":"openapi/file-upload.json"},"subdomain":"pangram","siteName":"Pangram Labs","title":"File Upload - Pangram Labs","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-11-03T17:50:54.120Z","originalFileLocation":"api-reference/file-external.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=\"description\" content=\"Upload files for AI detection and receive dashboard links\">\u003cmeta data-mint-head name=\"application-name\" content=\"Pangram 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/pangram/fGA1EnuUts9ZN6hv/_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/pangram/fGA1EnuUts9ZN6hv/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/pangram/fGA1EnuUts9ZN6hv/_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/pangram/fGA1EnuUts9ZN6hv/_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/pangram/fGA1EnuUts9ZN6hv/_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/pangram/fGA1EnuUts9ZN6hv/_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/pangram/fGA1EnuUts9ZN6hv/_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/pangram/fGA1EnuUts9ZN6hv/_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/pangram/fGA1EnuUts9ZN6hv/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"File Upload - Pangram Labs\">\u003cmeta data-mint-head property=\"og:description\" content=\"Upload files for AI detection and receive dashboard links\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Pangram Labs\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.pangram.com/api-reference/file-external\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://pangram.mintlify.site/_mintlify/api/og/v2?division=REST+API\u0026amp;title=File+Upload\u0026amp;description=Upload+files+for+AI+detection+and+receive+dashboard+links\u0026amp;theme=6c15920bfbe7ed52098d48fe\u0026amp;signature=8fcac4dbda8d57ef915f90cccd3d71f5fcd583a4cdc98a7b473e0f23bb7e8347\">\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 Upload - Pangram Labs\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Upload files for AI detection and receive dashboard links\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://pangram.mintlify.site/_mintlify/api/og/v2?division=REST+API\u0026amp;title=File+Upload\u0026amp;description=Upload+files+for+AI+detection+and+receive+dashboard+links\u0026amp;theme=6c15920bfbe7ed52098d48fe\u0026amp;signature=8fcac4dbda8d57ef915f90cccd3d71f5fcd583a4cdc98a7b473e0f23bb7e8347\">\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/pangram/fGA1EnuUts9ZN6hv/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Pangram Labs\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#FF6106\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.pangram.com/api-reference/file-external\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/api-reference/file-external.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.pangram.com/#organization\",\"name\":\"Pangram Labs\",\"url\":\"https://docs.pangram.com\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/pangram/jG4ouS_l0em4HkHV/logo/light.svg?fit=max\u0026auto=format\u0026n=jG4ouS_l0em4HkHV\u0026q=85\u0026s=8b5e8d04b0d2aeb0cb557c7688a29f65\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.pangram.com#website\",\"name\":\"Pangram Labs\",\"url\":\"https://docs.pangram.com\",\"publisher\":{\"@id\":\"https://docs.pangram.com/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.pangram.com/api-reference/file-external#webpage\",\"url\":\"https://docs.pangram.com/api-reference/file-external\",\"name\":\"File Upload\",\"description\":\"Upload files for AI detection and receive dashboard links\",\"dateModified\":\"2026-11-03T17:50:54.120Z\",\"isPartOf\":{\"@id\":\"https://docs.pangram.com#website\"},\"breadcrumb\":{\"@id\":\"https://docs.pangram.com/api-reference/file-external#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.pangram.com/api-reference/file-external#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"REST API\",\"item\":\"https://docs.pangram.com/api-reference/introduction\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"File Upload\",\"item\":\"https://docs.pangram.com/api-reference/file-external\"}]},{\"@type\":[\"TechArticle\",\"APIReference\"],\"@id\":\"https://docs.pangram.com/api-reference/file-external#apireference\",\"headline\":\"File Upload\",\"name\":\"File Upload\",\"description\":\"Upload files for AI detection and receive dashboard links\",\"url\":\"https://docs.pangram.com/api-reference/file-external\",\"mainEntityOfPage\":{\"@id\":\"https://docs.pangram.com/api-reference/file-external#webpage\"},\"dateModified\":\"2026-11-03T17:50:54.120Z\",\"publisher\":{\"@id\":\"https://docs.pangram.com/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.pangram.com#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Pangram Labs\",\"publisher\":{\"@type\":\"Organization\",\"name\":\"Pangram Labs\"},\"provider\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","agentPointerHref":"/api-reference/file-external.md","siteName":"Pangram Labs","nav":{"global":null,"tabs":[{"tab":"Guides","pages":[{"title":"Guides","href":""}]},{"tab":"Python SDK","pages":[{"title":"Python SDK","href":"/sdk/python"}]},{"tab":"REST API","groups":[{"group":"REST API","pages":[{"title":"API Overview","href":"/api-reference/introduction"},{"title":"Models","api":"GET https://text.external-api.pangram.com/models","href":"/api-reference/models"},{"title":"AI Detection","api":"POST https://text.external-api.pangram.com/task","href":"/api-reference/ai-detection"},{"title":"Image Detection","api":"POST https://image.external-api.pangram.com/v1/tasks","href":"/api-reference/image-detection"},{"title":"Video Detection","openapi":"openapi/video.json POST /v1/video/tasks","href":"/api-reference/video-detection"},{"title":"Bulk API","description":"Submit asynchronous AI detection jobs for many texts","api":"POST https://text.external-api.pangram.com/bulk","href":"/api-reference/bulk-api"},{"title":"File Upload","openapi":"openapi/file-upload.json POST /","href":"/api-reference/file-external"},{"title":"Plagiarism Detection","description":"Check text for potential plagiarism against online content","api":"POST https://plagiarism.api.pangram.com","href":"/api-reference/plagiarism-detection"}]},{"group":"Account APIs","pages":[{"title":"Credit Balance","api":"GET https://text.external-api.pangram.com/balance","href":"/api-reference/balance"},{"title":"Monthly Usage","api":"GET https://text.external-api.pangram.com/usage","href":"/api-reference/usage"},{"title":"QPS Limit","api":"GET https://text.external-api.pangram.com/limits","href":"/api-reference/limits"}]},{"group":"Deprecated","pages":[{"title":"Deprecated Endpoints","href":"/api-reference/deprecated-endpoints"}]}]}]},"basePath":"","title":"File Upload - Pangram Labs","deploymentId":"dpl_HhUetB7eHHDAmK9T1Teip38TgFx9","buildId":"dpl_HhUetB7eHHDAmK9T1Teip38TgFx9","dynamics":["c2aa737661","2b790eda92","b0f84f53ff","a9bb46feb3"],"chunks":["OpenApiReferenceProvider-jJHA3WSo.js","utils-DbZn3Mjn.js","cloneDeep-CnBnaSyy.js","_Uint8Array-CMQtTgBR.js","isObject-FP1Yky1u.js","utils-Bl2DvzOJ.js","addUniqueKeysToSchema-BwOLo9p1.js","snippetPresets-BBiPpKa-.js","style-to-object-BY3JEAdk.js","v4-DIgz8zy6.js","conditional-requirements-CFM0id0Q.js","ApiExamples-C0px4Tml.js","isEqual-zAyttAAO.js","usePlaygroundInputsStore-Dell6dGw.js","shallow-0VKqkSqN.js","getApiPlaygroundDisplay-CP_ctPEB.js","CodeSnippet-5L35ic0s.js","CodeSnippets-DOXbNhJw.js","Page-DRLI_2Ue.js","getPastedJson-VhzT9m2P.js","icon-CD8_AtCO.js","MethodPill-DGgOMftG.js","DuplicateIcon-DZ6A_EtN.js","createIcon-DUl4oM5f.js","DynamicMarkdown-BGHukeRM.js","SectionHeading-ChrEUs8u.js","axios-vUo_bRtp.js","Markdown-Dj-na-_-.js","dist-C5gjFYHe.js","lib-DuNMoZ05.js","lib-B8HbPgcC.js","katex-YMM-FMeD.js","html-void-elements-mCSPHezU.js","marked.esm-CZWythHk.js","AssistantPageLink-DEBW87tT.js"]}