{ "errors": [ { "code": "invalid_request", "message": "num_bytes must be greater than zero.", "suggestion": "Specify the total file size in bytes and retry.", "error_uid": "err-xxxxxxxx" } ]}
{ "errors": [ { "code": "unauthorized_request", "message": "Unauthorized or invalid access.", "suggestion": "Provide valid authentication credentials and ensure they have the required permissions.", "error_uid": "err-xxxxxxxx" } ]}
{ "errors": [ { "code": "resume_mismatch", "message": "An in-progress upload exists for this filename but file_type or num_bytes do not match.", "suggestion": "Abort the existing upload or retry with the original file_type and num_bytes.", "error_uid": "err-xxxxxxxx" } ]}
Files API
Initiate Upload
Begin a direct-to-cloud upload and receive presigned URLs for the file parts
{ "errors": [ { "code": "invalid_request", "message": "num_bytes must be greater than zero.", "suggestion": "Specify the total file size in bytes and retry.", "error_uid": "err-xxxxxxxx" } ]}
{ "errors": [ { "code": "unauthorized_request", "message": "Unauthorized or invalid access.", "suggestion": "Provide valid authentication credentials and ensure they have the required permissions.", "error_uid": "err-xxxxxxxx" } ]}
{ "errors": [ { "code": "resume_mismatch", "message": "An in-progress upload exists for this filename but file_type or num_bytes do not match.", "suggestion": "Abort the existing upload or retry with the original file_type and num_bytes.", "error_uid": "err-xxxxxxxx" } ]}
Requires version 1.1.5 or later of the Archetype platform.
Begin a direct-to-cloud upload of a file. The server records the file metadata, splits the upload into parts, and returns presigned URLs that the client uploads each part to.
Direct-to-cloud file uploads support files up to 250 GB. However, Lenses and the Lens API do not support files larger than 512 MB.
The full direct-to-cloud upload flow is:
Initiate the upload (this endpoint) — receive upload_id and presigned parts.
PUT each part’s bytes directly to its presigned url. Capture the ETag response header from each PUT — that is the part’s part_token.
Optionally, checkpoint completed parts so they can be skipped on resume.
Optionally, generate fresh URLs for parts whose presigned URLs are about to expire.
Complete the upload, supplying a part_token for each non-checkpointed part.
If something goes wrong, abort the upload to release server-side resources.
Part numbers are 1-based. The first part returned by this endpoint has part_number: 1, not 0. Using part_number: 0 in any subsequent call (/parts/urls, /parts/checkpoint, /complete) is rejected with 400 invalid_upload_parts.
Name of the file being uploaded. Must be 1 to 512 characters; an empty or longer filename
returns an HTTP 400 error with the code invalid_filename.
Starting in version 2.0.0 of the Archetype platform, the filename must be no more than 512
characters long. Filenames longer than 512 characters and empty filenames return a 400
HTTP error with the code invalid_filename
When true, if a matching in-progress upload for this filename already exists for the organization, the server reuses it and returns only the parts that have not been checkpointed.“Matching” requires the existing record’s file_type and num_bytes to equal the request’s; a mismatch fails with 409. If no in-progress upload exists, behavior is identical to resume_if_started=false.
Whole-file checksum algorithm supported by the storage backend. One of crc32c or none. If crc32c, the client may compute a CRC32C over the full file and pass it as integrity_checksum on Complete Upload for server-side verification. If none, the backend does not support checksum verification — clients should not send one.
true when the response reuses an existing in-progress upload (because the request specified resume_if_started=true and a matching record was found). false for a freshly created upload. When true, parts contains only the not-yet-checkpointed subset.
{ "errors": [ { "code": "invalid_request", "message": "num_bytes must be greater than zero.", "suggestion": "Specify the total file size in bytes and retry.", "error_uid": "err-xxxxxxxx" } ]}
{ "errors": [ { "code": "unauthorized_request", "message": "Unauthorized or invalid access.", "suggestion": "Provide valid authentication credentials and ensure they have the required permissions.", "error_uid": "err-xxxxxxxx" } ]}
{ "errors": [ { "code": "resume_mismatch", "message": "An in-progress upload exists for this filename but file_type or num_bytes do not match.", "suggestion": "Abort the existing upload or retry with the original file_type and num_bytes.", "error_uid": "err-xxxxxxxx" } ]}
Was this page helpful?
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"Archetype AI Documentation","colors":{"primary":"#0047FF","light":"#9EBBFF","dark":"#0047FF"},"logo":{"light":"https://mintcdn.com/archetypeai-bd6fb3cf/Fml2i7FmPyxjLCP7/logo/light.svg?fit=max\u0026auto=format\u0026n=Fml2i7FmPyxjLCP7\u0026q=85\u0026s=4b1f94a0bc6c65c3905d1a55d725b05f","dark":"https://mintcdn.com/archetypeai-bd6fb3cf/Fml2i7FmPyxjLCP7/logo/dark.svg?fit=max\u0026auto=format\u0026n=Fml2i7FmPyxjLCP7\u0026q=85\u0026s=b652785f67f97925eb5177264ffc9e50"},"favicon":"https://mintcdn.com/archetypeai-bd6fb3cf/PEoHdVWOSWJmHgSg/favicon.svg?fit=max\u0026auto=format\u0026n=PEoHdVWOSWJmHgSg\u0026q=85\u0026s=4ea6587ffdd8e925003e9e12319702aa","api":{"mdx":{"auth":{"method":"bearer"},"server":"https://platform.u1.archetypeai.app"}},"appearance":{"default":"system"},"navbar":{"links":[{"href":"https://platform.u1.archetypeai.app/","label":"Console"}]},"footer":{"socials":{"twitter":"https://x.com/physicalai","github":"https://github.com/archetypeai","linkedin":"https://www.linkedin.com/company/archetype-ai"}},"search":{"prompt":"Search Archetype Platform docs..."},"seo":{"indexing":"navigable"},"styling":{"codeblocks":"system","latex":false},"integrations":{"amplitude":{"apiKey":"84e8a1610cf8b3c7d8a49d945917606d"}},"markdown":{"instructions":"Start with /introduction/getting-started. Use the Direct Query API (POST /api/lens/query) with the Newton Fusion model (text, image, and video reasoning) or the Newton Omega encoder (time-series embeddings). ATAI_API_ENDPOINT is the base URL https://platform.u1.archetypeai.app with no version path; every endpoint path begins with /api. Pages whose descriptions are marked (Archived) document the legacy Lens runtime — do not use them for new projects."},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"archetypeai-bd6fb3cf","hasAudioNarration":false,"actualSubdomain":"archetypeai-bd6fb3cf","customDomains":["docs.archetypeai.app"],"gitSource":{"type":"github","owner":"archetypeai","repo":"mintlify-docs","deployBranch":"main","contentDirectory":"","isPrivate":true,"mountPath":"","label":"","_id":"6ae399f43888be9481e90634"},"chroma":{"liveDeploymentHistoryId":"6ae8d8b056dd8408ce6a364e","collectionId":"98567f57-9141-41de-9c7b-99cfeeee05e3","schemaVersion":"v3","latestBuiltDeploymentHistoryId":"6ae8d8b056dd8408ce6a364e"},"feedback":{"thumbs":true},"entitlements":{"AI_CHAT":{"status":"ENABLED"},"CONTEXTUAL_FEEDBACK":{"status":"ENABLED"},"CODE_SNIPPET_FEEDBACK":{"status":"ENABLED"},"WEB_MCP":{"status":"ENABLED"},"NARRATION":{"status":"ENABLED"}},"buildId":"6ae8d8b056dd8408ce6a364e","clientVersion":"0.0.4067","searchFilterCounts":[{"language":"default","tag":"API Reference","count":222},{"language":"default","tag":"Documentation","count":69},{"language":"default","tag":"Agents API","count":41},{"language":"default","tag":"Archive","count":28},{"language":"default","tag":"Batch Processing API","count":20},{"language":"default","tag":"Core Concepts","count":17},{"language":"default","tag":"Files API","count":16},{"language":"default","tag":"Lens API","count":14},{"language":"default","tag":"Developer Console","count":14},{"language":"default","tag":"Agents","count":13}]},"assistantConfig":{"deflection":{"enabled":true,"email":"[email protected]"}},"basePath":"","hasChatPermissions":true,"hasWebMcpPermissions":true,"toggles":[{"name":"kill-isr","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":"llms-txt-v2","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":"vite-origin","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":"sso-setup-deadline-banner","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":false},"customCss":[{"filePath":"style.css","content":"*{border-radius:0px!important}[data-theme=\"light\"] pre,[data-theme=\"light\"] pre code{background-color:#f6f8fa!important;color:#24292e!important}[data-theme=\"dark\"] pre,[data-theme=\"dark\"] pre code{background-color:#161b22!important;color:#e1e4e8!important}[data-theme=\"light\"] code:not(pre code){color:#0969da!important;background-color:#f6f8fa!important;padding:2px 4px;border-radius:3px}[data-theme=\"dark\"] code:not(pre code){color:#79c0ff!important;background-color:#161b22!important;padding:2px 4px;border-radius:3px}"}],"page":{"pagePath":"api-reference/files/initiate-upload","slug":"/api-reference/files/initiate-upload","pageMetadata":{"title":"Initiate Upload","api":"POST /api/files/uploads/initiate","description":"Begin a direct-to-cloud upload and receive presigned URLs for the file parts","tag":"v1.1.5+","href":"/api-reference/files/initiate-upload"},"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: \"Begin a direct-to-cloud upload and receive presigned URLs for the file parts\"\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`,li:`li`,ol:`ol`,p:`p`,strong:`strong`,..._provideComponents(),...props.components},{Callout,Expandable,Heading,Note,ParamField,ResponseField,Warning}=_components;if(!Callout)_missingMdxReference(`Callout`,true);if(!Expandable)_missingMdxReference(`Expandable`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Note)_missingMdxReference(`Note`,true);if(!ParamField)_missingMdxReference(`ParamField`,true);if(!ResponseField)_missingMdxReference(`ResponseField`,true);if(!Warning)_missingMdxReference(`Warning`,true);return _jsxs(_Fragment,{children:[_jsx(Callout,{icon:`clock`,color:`#3064E3`,iconType:`solid`,children:_jsxs(_components.p,{children:[`Requires `,_jsx(_components.a,{href:`/release-notes/1.1.x#v1-1-5`,children:`version 1.1.5`}),` or later of the Archetype platform.`]})}),`\n`,_jsx(Heading,{level:`2`,id:`overview`,children:`Overview`}),`\n`,_jsx(_components.p,{children:`Begin a direct-to-cloud upload of a file. The server records the file metadata, splits the upload into parts, and returns presigned URLs that the client uploads each part to.`}),`\n`,_jsx(Note,{children:_jsxs(_components.p,{children:[`Direct-to-cloud file uploads support files up to `,_jsx(_components.strong,{children:`250 GB`}),`. However, `,_jsx(_components.a,{href:`/core-concepts/lenses/overview`,children:`Lenses`}),` and the Lens API do not support files larger than 512 MB.`]})}),`\n`,_jsx(_components.p,{children:`The full direct-to-cloud upload flow is:`}),`\n`,_jsxs(_components.ol,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Initiate`}),` the upload (this endpoint) — receive `,_jsx(_components.code,{children:`upload_id`}),` and presigned `,_jsx(_components.code,{children:`parts`}),`.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`PUT`}),` each part’s bytes directly to its presigned `,_jsx(_components.code,{children:`url`}),`. Capture the `,_jsx(_components.code,{children:`ETag`}),` response header from each PUT — that is the part’s `,_jsx(_components.code,{children:`part_token`}),`.`]}),`\n`,_jsxs(_components.li,{children:[`Optionally, `,_jsx(_components.strong,{children:_jsx(_components.a,{href:`/api-reference/files/checkpoint-parts`,children:`checkpoint`})}),` completed parts so they can be skipped on resume.`]}),`\n`,_jsxs(_components.li,{children:[`Optionally, `,_jsx(_components.strong,{children:_jsx(_components.a,{href:`/api-reference/files/generate-part-urls`,children:`generate fresh URLs`})}),` for parts whose presigned URLs are about to expire.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:_jsx(_components.a,{href:`/api-reference/files/complete-upload`,children:`Complete`})}),` the upload, supplying a `,_jsx(_components.code,{children:`part_token`}),` for each non-checkpointed part.`]}),`\n`]}),`\n`,_jsxs(_components.p,{children:[`If something goes wrong, `,_jsx(_components.strong,{children:_jsx(_components.a,{href:`/api-reference/files/abort-upload`,children:`abort`})}),` the upload to release server-side resources.`]}),`\n`,_jsx(Warning,{children:_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Part numbers are 1-based.`}),` The first part returned by this endpoint has `,_jsx(_components.code,{children:`part_number: 1`}),`, not `,_jsx(_components.code,{children:`0`}),`. Using `,_jsx(_components.code,{children:`part_number: 0`}),` in any subsequent call (`,_jsx(_components.code,{children:`/parts/urls`}),`, `,_jsx(_components.code,{children:`/parts/checkpoint`}),`, `,_jsx(_components.code,{children:`/complete`}),`) is rejected with `,_jsx(_components.code,{children:`400 invalid_upload_parts`}),`.`]})}),`\n`,_jsx(Heading,{level:`2`,id:`request-body`,children:`Request Body`}),`\n`,_jsxs(ParamField,{body:`filename`,type:`string`,required:true,id:`param-filename`,children:[_jsxs(_components.p,{children:[`Name of the file being uploaded. Must be 1 to 512 characters; an empty or longer filename\nreturns an HTTP `,_jsx(_components.code,{children:`400`}),` error with the code `,_jsx(_components.code,{children:`invalid_filename`}),`.`]}),_jsx(Note,{children:_jsxs(_components.p,{children:[`Starting in `,_jsx(_components.a,{href:`/release-notes/2.0.x#v2-0-0`,children:`version 2.0.0`}),` of the Archetype platform, the filename must be no more than 512\ncharacters long. Filenames longer than 512 characters and empty filenames return a `,_jsx(_components.code,{children:`400`}),`\nHTTP error with the code `,_jsx(_components.code,{children:`invalid_filename`})]})})]}),`\n`,_jsx(ParamField,{body:`file_type`,type:`string`,required:true,id:`param-file-type`,children:_jsxs(_components.p,{children:[`MIME type of the file (e.g. `,_jsx(_components.code,{children:`image/png`}),`, `,_jsx(_components.code,{children:`text/csv`}),`)`]})}),`\n`,_jsx(ParamField,{body:`num_bytes`,type:`integer`,required:true,id:`param-num-bytes`,children:_jsx(_components.p,{children:`Total size of the file in bytes`})}),`\n`,_jsxs(ParamField,{body:`resume_if_started`,type:`boolean`,id:`param-resume-if-started`,children:[_jsxs(_components.p,{children:[`When `,_jsx(_components.code,{children:`true`}),`, if a matching in-progress upload for this filename already exists for the organization, the server reuses it and returns only the parts that have not been checkpointed.`]}),_jsxs(_components.p,{children:[`“Matching” requires the existing record’s `,_jsx(_components.code,{children:`file_type`}),` and `,_jsx(_components.code,{children:`num_bytes`}),` to equal the request’s; a mismatch fails with `,_jsx(_components.code,{children:`409`}),`. If no in-progress upload exists, behavior is identical to `,_jsx(_components.code,{children:`resume_if_started=false`}),`.`]})]}),`\n`,_jsx(Heading,{level:`2`,id:`response`,children:`Response`}),`\n`,_jsx(ResponseField,{name:`upload_id`,type:`string`,id:`param-upload-id`,children:_jsx(_components.p,{children:`Server-generated identifier for the upload. Use it in subsequent calls to checkpoint, generate URLs, complete, or abort.`})}),`\n`,_jsx(ResponseField,{name:`file_uid`,type:`string`,id:`param-file-uid`,children:_jsx(_components.p,{children:`Internal unique identifier that will be assigned to the completed file`})}),`\n`,_jsx(ResponseField,{name:`file_name`,type:`string`,id:`param-file-name`,children:_jsx(_components.p,{children:`Name of the file being uploaded`})}),`\n`,_jsx(ResponseField,{name:`total_bytes`,type:`integer`,id:`param-total-bytes`,children:_jsx(_components.p,{children:`Total size of the file in bytes`})}),`\n`,_jsx(ResponseField,{name:`num_parts`,type:`integer`,id:`param-num-parts`,children:_jsx(_components.p,{children:`Number of parts the file has been split into`})}),`\n`,_jsx(ResponseField,{name:`part_size`,type:`integer`,id:`param-part-size`,children:_jsx(_components.p,{children:`Size in bytes used to split the file into parts. May be omitted for some upload backends.`})}),`\n`,_jsx(ResponseField,{name:`integrity_algorithm`,type:`string`,id:`param-integrity-algorithm`,children:_jsxs(_components.p,{children:[`Whole-file checksum algorithm supported by the storage backend. One of `,_jsx(_components.code,{children:`crc32c`}),` or `,_jsx(_components.code,{children:`none`}),`. If `,_jsx(_components.code,{children:`crc32c`}),`, the client may compute a CRC32C over the full file and pass it as `,_jsx(_components.code,{children:`integrity_checksum`}),` on `,_jsx(_components.a,{href:`/api-reference/files/complete-upload`,children:`Complete Upload`}),` for server-side verification. If `,_jsx(_components.code,{children:`none`}),`, the backend does not support checksum verification — clients should not send one.`]})}),`\n`,_jsx(ResponseField,{name:`is_resume`,type:`boolean`,id:`param-is-resume`,children:_jsxs(_components.p,{children:[_jsx(_components.code,{children:`true`}),` when the response reuses an existing in-progress upload (because the request specified `,_jsx(_components.code,{children:`resume_if_started=true`}),` and a matching record was found). `,_jsx(_components.code,{children:`false`}),` for a freshly created upload. When `,_jsx(_components.code,{children:`true`}),`, `,_jsx(_components.code,{children:`parts`}),` contains only the not-yet-checkpointed subset.`]})}),`\n`,_jsxs(ResponseField,{name:`parts`,type:`array`,id:`param-parts`,children:[_jsx(_components.p,{children:`Presigned descriptors for each part of the upload`}),_jsxs(Expandable,{title:`part properties`,children:[_jsx(ResponseField,{name:`part_number`,type:`integer`,id:`param-part-number`,children:_jsxs(_components.p,{children:[`1-based part index. The first part is `,_jsx(_components.code,{children:`1`}),`.`]})}),_jsx(ResponseField,{name:`url`,type:`string`,id:`param-url`,children:_jsxs(_components.p,{children:[`Presigned URL the client should `,_jsx(_components.code,{children:`PUT`}),` the part bytes to`]})}),_jsx(ResponseField,{name:`offset`,type:`integer`,id:`param-offset`,children:_jsx(_components.p,{children:`Byte offset into the file where this part begins`})}),_jsx(ResponseField,{name:`length`,type:`integer`,id:`param-length`,children:_jsx(_components.p,{children:`Length of the part in bytes`})}),_jsx(ResponseField,{name:`expires_at`,type:`string`,id:`param-expires-at`,children:_jsx(_components.p,{children:`ISO 8601 timestamp at which the presigned URL expires`})})]})]})]})}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":"Initiate Upload","api":"POST /api/files/uploads/initiate","description":"Begin a direct-to-cloud upload and receive presigned URLs for the file parts","tag":"v1.1.5+","href":"/api-reference/files/initiate-upload"}}},"mdxSourceWithNoJs":{"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`,li:`li`,ol:`ol`,p:`p`,pre:`pre`,span:`span`,strong:`strong`,..._provideComponents(),...props.components},{Callout,CodeBlock,Expandable,Heading,Note,ParamField,RequestExample,ResponseExample,ResponseField,Warning}=_components;if(!Callout)_missingMdxReference(`Callout`,true);if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Expandable)_missingMdxReference(`Expandable`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Note)_missingMdxReference(`Note`,true);if(!ParamField)_missingMdxReference(`ParamField`,true);if(!RequestExample)_missingMdxReference(`RequestExample`,true);if(!ResponseExample)_missingMdxReference(`ResponseExample`,true);if(!ResponseField)_missingMdxReference(`ResponseField`,true);if(!Warning)_missingMdxReference(`Warning`,true);return _jsxs(_Fragment,{children:[_jsx(Callout,{icon:`clock`,color:`#3064E3`,iconType:`solid`,children:_jsxs(_components.p,{children:[`Requires `,_jsx(_components.a,{href:`/release-notes/1.1.x#v1-1-5`,children:`version 1.1.5`}),` or later of the Archetype platform.`]})}),`\n`,_jsx(Heading,{level:`2`,id:`overview`,children:`Overview`}),`\n`,_jsx(_components.p,{children:`Begin a direct-to-cloud upload of a file. The server records the file metadata, splits the upload into parts, and returns presigned URLs that the client uploads each part to.`}),`\n`,_jsx(Note,{children:_jsxs(_components.p,{children:[`Direct-to-cloud file uploads support files up to `,_jsx(_components.strong,{children:`250 GB`}),`. However, `,_jsx(_components.a,{href:`/core-concepts/lenses/overview`,children:`Lenses`}),` and the Lens API do not support files larger than 512 MB.`]})}),`\n`,_jsx(_components.p,{children:`The full direct-to-cloud upload flow is:`}),`\n`,_jsxs(_components.ol,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Initiate`}),` the upload (this endpoint) — receive `,_jsx(_components.code,{children:`upload_id`}),` and presigned `,_jsx(_components.code,{children:`parts`}),`.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`PUT`}),` each part’s bytes directly to its presigned `,_jsx(_components.code,{children:`url`}),`. Capture the `,_jsx(_components.code,{children:`ETag`}),` response header from each PUT — that is the part’s `,_jsx(_components.code,{children:`part_token`}),`.`]}),`\n`,_jsxs(_components.li,{children:[`Optionally, `,_jsx(_components.strong,{children:_jsx(_components.a,{href:`/api-reference/files/checkpoint-parts`,children:`checkpoint`})}),` completed parts so they can be skipped on resume.`]}),`\n`,_jsxs(_components.li,{children:[`Optionally, `,_jsx(_components.strong,{children:_jsx(_components.a,{href:`/api-reference/files/generate-part-urls`,children:`generate fresh URLs`})}),` for parts whose presigned URLs are about to expire.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:_jsx(_components.a,{href:`/api-reference/files/complete-upload`,children:`Complete`})}),` the upload, supplying a `,_jsx(_components.code,{children:`part_token`}),` for each non-checkpointed part.`]}),`\n`]}),`\n`,_jsxs(_components.p,{children:[`If something goes wrong, `,_jsx(_components.strong,{children:_jsx(_components.a,{href:`/api-reference/files/abort-upload`,children:`abort`})}),` the upload to release server-side resources.`]}),`\n`,_jsx(Warning,{children:_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Part numbers are 1-based.`}),` The first part returned by this endpoint has `,_jsx(_components.code,{children:`part_number: 1`}),`, not `,_jsx(_components.code,{children:`0`}),`. Using `,_jsx(_components.code,{children:`part_number: 0`}),` in any subsequent call (`,_jsx(_components.code,{children:`/parts/urls`}),`, `,_jsx(_components.code,{children:`/parts/checkpoint`}),`, `,_jsx(_components.code,{children:`/complete`}),`) is rejected with `,_jsx(_components.code,{children:`400 invalid_upload_parts`}),`.`]})}),`\n`,_jsx(Heading,{level:`2`,id:`request-body`,children:`Request Body`}),`\n`,_jsxs(ParamField,{body:`filename`,type:`string`,required:true,id:`param-filename`,children:[_jsxs(_components.p,{children:[`Name of the file being uploaded. Must be 1 to 512 characters; an empty or longer filename\nreturns an HTTP `,_jsx(_components.code,{children:`400`}),` error with the code `,_jsx(_components.code,{children:`invalid_filename`}),`.`]}),_jsx(Note,{children:_jsxs(_components.p,{children:[`Starting in `,_jsx(_components.a,{href:`/release-notes/2.0.x#v2-0-0`,children:`version 2.0.0`}),` of the Archetype platform, the filename must be no more than 512\ncharacters long. Filenames longer than 512 characters and empty filenames return a `,_jsx(_components.code,{children:`400`}),`\nHTTP error with the code `,_jsx(_components.code,{children:`invalid_filename`})]})})]}),`\n`,_jsx(ParamField,{body:`file_type`,type:`string`,required:true,id:`param-file-type`,children:_jsxs(_components.p,{children:[`MIME type of the file (e.g. `,_jsx(_components.code,{children:`image/png`}),`, `,_jsx(_components.code,{children:`text/csv`}),`)`]})}),`\n`,_jsx(ParamField,{body:`num_bytes`,type:`integer`,required:true,id:`param-num-bytes`,children:_jsx(_components.p,{children:`Total size of the file in bytes`})}),`\n`,_jsxs(ParamField,{body:`resume_if_started`,type:`boolean`,id:`param-resume-if-started`,children:[_jsxs(_components.p,{children:[`When `,_jsx(_components.code,{children:`true`}),`, if a matching in-progress upload for this filename already exists for the organization, the server reuses it and returns only the parts that have not been checkpointed.`]}),_jsxs(_components.p,{children:[`“Matching” requires the existing record’s `,_jsx(_components.code,{children:`file_type`}),` and `,_jsx(_components.code,{children:`num_bytes`}),` to equal the request’s; a mismatch fails with `,_jsx(_components.code,{children:`409`}),`. If no in-progress upload exists, behavior is identical to `,_jsx(_components.code,{children:`resume_if_started=false`}),`.`]})]}),`\n`,_jsx(Heading,{level:`2`,id:`response`,children:`Response`}),`\n`,_jsx(ResponseField,{name:`upload_id`,type:`string`,id:`param-upload-id`,children:_jsx(_components.p,{children:`Server-generated identifier for the upload. Use it in subsequent calls to checkpoint, generate URLs, complete, or abort.`})}),`\n`,_jsx(ResponseField,{name:`file_uid`,type:`string`,id:`param-file-uid`,children:_jsx(_components.p,{children:`Internal unique identifier that will be assigned to the completed file`})}),`\n`,_jsx(ResponseField,{name:`file_name`,type:`string`,id:`param-file-name`,children:_jsx(_components.p,{children:`Name of the file being uploaded`})}),`\n`,_jsx(ResponseField,{name:`total_bytes`,type:`integer`,id:`param-total-bytes`,children:_jsx(_components.p,{children:`Total size of the file in bytes`})}),`\n`,_jsx(ResponseField,{name:`num_parts`,type:`integer`,id:`param-num-parts`,children:_jsx(_components.p,{children:`Number of parts the file has been split into`})}),`\n`,_jsx(ResponseField,{name:`part_size`,type:`integer`,id:`param-part-size`,children:_jsx(_components.p,{children:`Size in bytes used to split the file into parts. May be omitted for some upload backends.`})}),`\n`,_jsx(ResponseField,{name:`integrity_algorithm`,type:`string`,id:`param-integrity-algorithm`,children:_jsxs(_components.p,{children:[`Whole-file checksum algorithm supported by the storage backend. One of `,_jsx(_components.code,{children:`crc32c`}),` or `,_jsx(_components.code,{children:`none`}),`. If `,_jsx(_components.code,{children:`crc32c`}),`, the client may compute a CRC32C over the full file and pass it as `,_jsx(_components.code,{children:`integrity_checksum`}),` on `,_jsx(_components.a,{href:`/api-reference/files/complete-upload`,children:`Complete Upload`}),` for server-side verification. If `,_jsx(_components.code,{children:`none`}),`, the backend does not support checksum verification — clients should not send one.`]})}),`\n`,_jsx(ResponseField,{name:`is_resume`,type:`boolean`,id:`param-is-resume`,children:_jsxs(_components.p,{children:[_jsx(_components.code,{children:`true`}),` when the response reuses an existing in-progress upload (because the request specified `,_jsx(_components.code,{children:`resume_if_started=true`}),` and a matching record was found). `,_jsx(_components.code,{children:`false`}),` for a freshly created upload. When `,_jsx(_components.code,{children:`true`}),`, `,_jsx(_components.code,{children:`parts`}),` contains only the not-yet-checkpointed subset.`]})}),`\n`,_jsxs(ResponseField,{name:`parts`,type:`array`,id:`param-parts`,children:[_jsx(_components.p,{children:`Presigned descriptors for each part of the upload`}),_jsxs(Expandable,{title:`part properties`,children:[_jsx(ResponseField,{name:`part_number`,type:`integer`,id:`param-part-number`,children:_jsxs(_components.p,{children:[`1-based part index. The first part is `,_jsx(_components.code,{children:`1`}),`.`]})}),_jsx(ResponseField,{name:`url`,type:`string`,id:`param-url`,children:_jsxs(_components.p,{children:[`Presigned URL the client should `,_jsx(_components.code,{children:`PUT`}),` the part bytes to`]})}),_jsx(ResponseField,{name:`offset`,type:`integer`,id:`param-offset`,children:_jsx(_components.p,{children:`Byte offset into the file where this part begins`})}),_jsx(ResponseField,{name:`length`,type:`integer`,id:`param-length`,children:_jsx(_components.p,{children:`Length of the part in bytes`})}),_jsx(ResponseField,{name:`expires_at`,type:`string`,id:`param-expires-at`,children:_jsx(_components.p,{children:`ISO 8601 timestamp at which the presigned URL expires`})})]})]}),`\n`,_jsxs(RequestExample,{children:[_jsx(CodeBlock,{filename:`cURL`,numberOfLines:`9`,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:`9`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`curl`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -X`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` POST`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` https://platform.u1.archetypeai.app/api/files/uploads/initiate`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Authorization: Bearer `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`$ATAI_API_KEY`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Content-Type: application/json\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -d`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` '{`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"filename\": \"training-data.parquet\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"file_type\": \"application/x-parquet\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"num_bytes\": 1073741824,`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"resume_if_started\": false`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` }'`})}),`\n`]})})}),_jsx(CodeBlock,{filename:`Python`,numberOfLines:`22`,language:`python`,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:`python`,children:_jsxs(_components.code,{language:`python`,numberOfLines:`22`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` requests`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` os`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`api_key `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` os.environ.get(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"ATAI_API_KEY\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`response `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` requests.post(`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"https://platform.u1.archetypeai.app/api/files/uploads/initiate\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` headers`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Authorization\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`f`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Bearer `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`{`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`api_key`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`}`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Content-Type\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"application/json\"`}),_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:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` json`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"filename\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"training-data.parquet\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"file_type\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"application/x-parquet\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"num_bytes\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`1_073_741_824`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"resume_if_started\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`False`}),_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`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`result `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` response.json()`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:`print`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`f`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"upload_id: `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`{`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`result[`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'upload_id'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`]`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`}`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:`print`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`f`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"num_parts: `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`{`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`result[`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'num_parts'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`]`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`}`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`]})})}),_jsx(CodeBlock,{filename:`JavaScript`,numberOfLines:`20`,language:`javascript`,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:`javascript`,children:_jsxs(_components.code,{language:`javascript`,numberOfLines:`20`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` response`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` await`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` fetch`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"https://platform.u1.archetypeai.app/api/files/uploads/initiate\"`}),_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:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` method:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"POST\"`}),_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\":`#9CDCFE`},children:` headers:`}),_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\":`#9CDCFE`},children:` Authorization:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:\" `Bearer \"}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#569CD6`},children:\"${\"}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`process`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`env`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:`ATAI_API_KEY`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#569CD6`},children:`}`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:\"`\"}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Content-Type\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"application/json\"`}),_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:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` body:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` JSON`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`stringify`}),_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\":`#9CDCFE`},children:` filename:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"training-data.parquet\"`}),_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\":`#9CDCFE`},children:` file_type:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"application/x-parquet\"`}),_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\":`#9CDCFE`},children:` num_bytes:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:` 1_073_741_824`}),_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\":`#9CDCFE`},children:` resume_if_started:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` false`}),_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`,_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`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` result`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` await`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` response`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`json`}),_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\":`#9CDCFE`},children:`console`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`log`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:\"`upload_id: \"}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#569CD6`},children:\"${\"}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`result`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`upload_id`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#569CD6`},children:`}`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:\"`\"}),_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\":`#9CDCFE`},children:`console`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`log`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:\"`num_parts: \"}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#569CD6`},children:\"${\"}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`result`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`num_parts`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#569CD6`},children:`}`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:\"`\"}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`]})})})]}),`\n`,_jsxs(ResponseExample,{children:[_jsx(CodeBlock,{filename:`200 - Success`,numberOfLines:`26`,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:`26`,children:[_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:` \"upload_id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"upl_1mehceg8cn80qsekh46143whrx\"`}),_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:` \"file_uid\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"fil_5hx819ysp38n2rt1f5fv0wsxgh\"`}),_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:` \"file_name\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"training-data.parquet\"`}),_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:` \"total_bytes\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`1073741824`}),_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:` \"num_parts\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`128`}),_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:` \"part_size\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`8388608`}),_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:` \"integrity_algorithm\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"crc32c\"`}),_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:` \"is_resume\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`false`}),_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:` \"parts\"`}),_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:` \"part_number\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`1`}),_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:` \"url\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"https://storage.example.com/upload/upl_1mehceg8cn80qsekh46143whrx/1?X-Amz-Signature=...\"`}),_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:` \"offset\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`0`}),_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:` \"length\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`8388608`}),_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:` \"expires_at\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"2026-04-28T15:32:18Z\"`})]}),`\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`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"part_number\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`2`}),_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:` \"url\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"https://storage.example.com/upload/upl_1mehceg8cn80qsekh46143whrx/2?X-Amz-Signature=...\"`}),_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:` \"offset\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`8388608`}),_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:` \"length\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`8388608`}),_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:` \"expires_at\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"2026-04-28T15:32:18Z\"`})]}),`\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`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),_jsx(CodeBlock,{filename:`400 - Invalid request`,numberOfLines:`10`,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:`10`,children:[_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:` \"errors\"`}),_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:` \"code\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"invalid_request\"`}),_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:` \"message\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"num_bytes must be greater than zero.\"`}),_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:` \"suggestion\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Specify the total file size in bytes and retry.\"`}),_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:` \"error_uid\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"err-xxxxxxxx\"`})]}),`\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`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),_jsx(CodeBlock,{filename:`401 - Unauthorized`,numberOfLines:`10`,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:`10`,children:[_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:` \"errors\"`}),_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:` \"code\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"unauthorized_request\"`}),_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:` \"message\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Unauthorized or invalid access.\"`}),_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:` \"suggestion\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Provide valid authentication credentials and ensure they have the required permissions.\"`}),_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:` \"error_uid\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"err-xxxxxxxx\"`})]}),`\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`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),_jsx(CodeBlock,{filename:`409 - Resume mismatch`,numberOfLines:`10`,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:`10`,children:[_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:` \"errors\"`}),_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:` \"code\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"resume_mismatch\"`}),_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:` \"message\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"An in-progress upload exists for this filename but file_type or num_bytes do not match.\"`}),_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:` \"suggestion\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Abort the existing upload or retry with the original file_type and num_bytes.\"`}),_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:` \"error_uid\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"err-xxxxxxxx\"`})]}),`\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`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})})]})]})}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":"Initiate Upload","api":"POST /api/files/uploads/initiate","description":"Begin a direct-to-cloud upload and receive presigned URLs for the file parts","tag":"v1.1.5+","href":"/api-reference/files/initiate-upload"}}}},"mdxExtracts":{"tableOfContents":[{"title":"Overview","slug":"overview","depth":2,"children":[]},{"title":"Request Body","slug":"request-body","depth":2,"children":[]},{"title":"Response","slug":"response","depth":2,"children":[]}],"codeExamples":{"request":{"type":"RequestExample","children":[{"filename":"cURL","html":"\u003cpre class=\"shiki shiki-themes github-light-default dark-plus\" style=\"background-color:#ffffff;--shiki-dark-bg:#0B0C0E;color:#1f2328;--shiki-dark:#D4D4D4\" language=\"shellscript\">\u003ccode language=\"shellscript\" numberOfLines=\"9\">\u003cspan class=\"line\">\u003cspan style=\"color:#953800;--shiki-dark:#DCDCAA\">curl\u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\"> -X\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> POST\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> https://platform.u1.archetypeai.app/api/files/uploads/initiate\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D7BA7D\"> \\\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\"> -H\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"Authorization: Bearer \u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\">$ATAI_API_KEY\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D7BA7D\"> \\\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\"> -H\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"Content-Type: application/json\"\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D7BA7D\"> \\\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\"> -d\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> '{\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"filename\": \"training-data.parquet\",\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"file_type\": \"application/x-parquet\",\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"num_bytes\": 1073741824,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"resume_if_started\": false\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> }'\u003c/span>\u003c/span>\n\u003c/code>\u003c/pre>"},{"filename":"Python","html":"\u003cpre class=\"shiki shiki-themes github-light-default dark-plus\" style=\"background-color:#ffffff;--shiki-dark-bg:#0B0C0E;color:#1f2328;--shiki-dark:#D4D4D4\" language=\"python\">\u003ccode language=\"python\" numberOfLines=\"22\">\u003cspan class=\"line\">\u003cspan style=\"color:#CF222E;--shiki-dark:#C586C0\">import\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> requests\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#CF222E;--shiki-dark:#C586C0\">import\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> os\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">api_key \u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D4D4D4\">=\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> os.environ.get(\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"ATAI_API_KEY\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">)\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">response \u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D4D4D4\">=\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> requests.post(\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"https://platform.u1.archetypeai.app/api/files/uploads/initiate\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#953800;--shiki-dark:#9CDCFE\"> headers\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D4D4D4\">=\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">{\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"Authorization\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#569CD6\">f\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"Bearer \u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#569CD6\">{\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">api_key\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#569CD6\">}\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"Content-Type\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"application/json\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> },\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#953800;--shiki-dark:#9CDCFE\"> json\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D4D4D4\">=\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">{\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"filename\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"training-data.parquet\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"file_type\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"application/x-parquet\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"num_bytes\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#B5CEA8\">1_073_741_824\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"resume_if_started\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\">False\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> },\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">)\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">result \u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D4D4D4\">=\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> response.json()\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0550AE;--shiki-dark:#DCDCAA\">print\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">(\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#569CD6\">f\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"upload_id: \u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#569CD6\">{\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">result[\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">'upload_id'\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">]\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#569CD6\">}\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">)\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0550AE;--shiki-dark:#DCDCAA\">print\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">(\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#569CD6\">f\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"num_parts: \u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#569CD6\">{\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">result[\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">'num_parts'\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">]\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#569CD6\">}\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">)\u003c/span>\u003c/span>\n\u003c/code>\u003c/pre>"},{"filename":"JavaScript","html":"\u003cpre class=\"shiki shiki-themes github-light-default dark-plus\" style=\"background-color:#ffffff;--shiki-dark-bg:#0B0C0E;color:#1f2328;--shiki-dark:#D4D4D4\" language=\"javascript\">\u003ccode language=\"javascript\" numberOfLines=\"20\">\u003cspan class=\"line\">\u003cspan style=\"color:#CF222E;--shiki-dark:#569CD6\">const\u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#4FC1FF\"> response\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D4D4D4\"> =\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#C586C0\"> await\u003c/span>\u003cspan style=\"color:#8250DF;--shiki-dark:#DCDCAA\"> fetch\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">(\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"https://platform.u1.archetypeai.app/api/files/uploads/initiate\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> {\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\"> method:\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"POST\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\"> headers:\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> {\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\"> Authorization:\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> `Bearer \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#569CD6\">${\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\">process\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#D4D4D4\">.\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\">env\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#D4D4D4\">.\u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#4FC1FF\">ATAI_API_KEY\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#569CD6\">}\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">`\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"Content-Type\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\">:\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"application/json\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> },\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\"> body:\u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#4FC1FF\"> JSON\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">.\u003c/span>\u003cspan style=\"color:#8250DF;--shiki-dark:#DCDCAA\">stringify\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">({\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\"> filename:\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"training-data.parquet\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\"> file_type:\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"application/x-parquet\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\"> num_bytes:\u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#B5CEA8\"> 1_073_741_824\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\"> resume_if_started:\u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\"> false\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> }),\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> }\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">);\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#CF222E;--shiki-dark:#569CD6\">const\u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#4FC1FF\"> result\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D4D4D4\"> =\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#C586C0\"> await\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\"> response\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">.\u003c/span>\u003cspan style=\"color:#8250DF;--shiki-dark:#DCDCAA\">json\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">();\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\">console\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">.\u003c/span>\u003cspan style=\"color:#8250DF;--shiki-dark:#DCDCAA\">log\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">(\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">`upload_id: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#569CD6\">${\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\">result\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#D4D4D4\">.\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\">upload_id\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#569CD6\">}\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">`\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">);\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\">console\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">.\u003c/span>\u003cspan style=\"color:#8250DF;--shiki-dark:#DCDCAA\">log\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">(\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">`num_parts: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#569CD6\">${\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\">result\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#D4D4D4\">.\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\">num_parts\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#569CD6\">}\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">`\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">);\u003c/span>\u003c/span>\n\u003c/code>\u003c/pre>"}],"attributes":[]},"response":{"type":"ResponseExample","children":[{"filename":"200 - Success","html":"\u003cpre class=\"shiki shiki-themes github-light-default dark-plus\" style=\"background-color:#ffffff;--shiki-dark-bg:#0B0C0E;color:#1f2328;--shiki-dark:#D4D4D4\" language=\"json\">\u003ccode language=\"json\" numberOfLines=\"26\">\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">{\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"upload_id\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"upl_1mehceg8cn80qsekh46143whrx\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"file_uid\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"fil_5hx819ysp38n2rt1f5fv0wsxgh\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"file_name\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"training-data.parquet\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"total_bytes\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#B5CEA8\">1073741824\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"num_parts\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#B5CEA8\">128\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"part_size\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#B5CEA8\">8388608\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"integrity_algorithm\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"crc32c\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"is_resume\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\">false\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"parts\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: [\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> {\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"part_number\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#B5CEA8\">1\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"url\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"https://storage.example.com/upload/upl_1mehceg8cn80qsekh46143whrx/1?X-Amz-Signature=...\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"offset\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#B5CEA8\">0\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"length\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#B5CEA8\">8388608\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"expires_at\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"2026-04-28T15:32:18Z\"\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> },\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> {\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"part_number\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#B5CEA8\">2\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"url\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"https://storage.example.com/upload/upl_1mehceg8cn80qsekh46143whrx/2?X-Amz-Signature=...\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"offset\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#B5CEA8\">8388608\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"length\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#B5CEA8\">8388608\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"expires_at\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"2026-04-28T15:32:18Z\"\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> }\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> ]\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">}\u003c/span>\u003c/span>\n\u003c/code>\u003c/pre>"},{"filename":"400 - Invalid request","html":"\u003cpre class=\"shiki shiki-themes github-light-default dark-plus\" style=\"background-color:#ffffff;--shiki-dark-bg:#0B0C0E;color:#1f2328;--shiki-dark:#D4D4D4\" language=\"json\">\u003ccode language=\"json\" numberOfLines=\"10\">\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">{\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"errors\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: [\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> {\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"code\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"invalid_request\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"message\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"num_bytes must be greater than zero.\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"suggestion\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"Specify the total file size in bytes and retry.\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"error_uid\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"err-xxxxxxxx\"\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> }\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> ]\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">}\u003c/span>\u003c/span>\n\u003c/code>\u003c/pre>"},{"filename":"401 - Unauthorized","html":"\u003cpre class=\"shiki shiki-themes github-light-default dark-plus\" style=\"background-color:#ffffff;--shiki-dark-bg:#0B0C0E;color:#1f2328;--shiki-dark:#D4D4D4\" language=\"json\">\u003ccode language=\"json\" numberOfLines=\"10\">\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">{\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"errors\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: [\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> {\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"code\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"unauthorized_request\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"message\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"Unauthorized or invalid access.\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"suggestion\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"Provide valid authentication credentials and ensure they have the required permissions.\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"error_uid\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"err-xxxxxxxx\"\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> }\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> ]\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">}\u003c/span>\u003c/span>\n\u003c/code>\u003c/pre>"},{"filename":"409 - Resume mismatch","html":"\u003cpre class=\"shiki shiki-themes github-light-default dark-plus\" style=\"background-color:#ffffff;--shiki-dark-bg:#0B0C0E;color:#1f2328;--shiki-dark:#D4D4D4\" language=\"json\">\u003ccode language=\"json\" numberOfLines=\"10\">\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">{\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"errors\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: [\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> {\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"code\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"resume_mismatch\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"message\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"An in-progress upload exists for this filename but file_type or num_bytes do not match.\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"suggestion\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"Abort the existing upload or retry with the original file_type and num_bytes.\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"error_uid\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"err-xxxxxxxx\"\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> }\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> ]\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">}\u003c/span>\u003c/span>\n\u003c/code>\u003c/pre>"}],"attributes":[]}},"endpoint":{"title":"Initiate Upload","path":"/api/files/uploads/initiate","servers":[{"url":"https://platform.u1.archetypeai.app"}],"method":"post","request":{"security":[{"title":"Bearer Auth","parameters":{"header":{"Authorization":{"type":"http","scheme":"bearer","description":"Bearer authentication header of the form `Bearer \u003ctoken>`, where `\u003ctoken>` is your auth token."}},"query":{},"cookie":{}}}],"parameters":{"query":{},"header":{},"cookie":{},"path":{}},"body":{"application/json":{"schemaArray":[{"type":"object","properties":{"filename":[{"type":"string","description":"Name of the file being uploaded. Must be 1 to 512 characters; an empty or longer filename returns an HTTP `400` error with the code `invalid_filename` .","required":true}],"file_type":[{"type":"string","description":"MIME type of the file (e.g. `image/png` , `text/csv` )","required":true}],"num_bytes":[{"type":"integer","description":"Total size of the file in bytes","required":true}],"resume_if_started":[{"type":"boolean","description":"When `true` , if a matching in-progress upload for this filename already exists for the organization, the server reuses it and returns only the parts that have not been checkpointed. “Matching” requires the existing record’s `file_type` and `num_bytes` to equal the request’s; a mismatch fails with `409` . If no in-progress upload exists, behavior is identical to `resume_if_started=false` ."}]}}],"examples":{"example":{"value":{"filename":"\u003cstring>","file_type":"\u003cstring>","num_bytes":123,"resume_if_started":true}}}}}},"response":{"200":{"application/json":{"schemaArray":[{"type":"object","properties":{"upload_id":[{"type":"string","description":"Server-generated identifier for the upload. Use it in subsequent calls to checkpoint, generate URLs, complete, or abort."}],"file_uid":[{"type":"string","description":"Internal unique identifier that will be assigned to the completed file"}],"file_name":[{"type":"string","description":"Name of the file being uploaded"}],"total_bytes":[{"type":"integer","description":"Total size of the file in bytes"}],"num_parts":[{"type":"integer","description":"Number of parts the file has been split into"}],"part_size":[{"type":"integer","description":"Size in bytes used to split the file into parts. May be omitted for some upload backends."}],"integrity_algorithm":[{"type":"string","description":"Whole-file checksum algorithm supported by the storage backend. One of `crc32c` or `none` . If `crc32c` , the client may compute a CRC32C over the full file and pass it as `integrity_checksum` on Complete Upload for server-side verification. If `none` , the backend does not support checksum verification — clients should not send one."}],"is_resume":[{"type":"boolean","description":"`true` when the response reuses an existing in-progress upload (because the request specified `resume_if_started=true` and a matching record was found). `false` for a freshly created upload. When `true` , `parts` contains only the not-yet-checkpointed subset."}],"parts":[{"type":"array","items":[{"type":"object","properties":{"part_number":[{"type":"integer","description":"1-based part index. The first part is `1` ."}],"url":[{"type":"string","description":"Presigned URL the client should `PUT` the part bytes to"}],"offset":[{"type":"integer","description":"Byte offset into the file where this part begins"}],"length":[{"type":"integer","description":"Length of the part in bytes"}],"expires_at":[{"type":"string","description":"ISO 8601 timestamp at which the presigned URL expires"}]}}],"description":"Presigned descriptors for each part of the upload"}]}}],"examples":{"example":{"value":{"upload_id":"\u003cstring>","file_uid":"\u003cstring>","file_name":"\u003cstring>","total_bytes":123,"num_parts":123,"part_size":123,"integrity_algorithm":"\u003cstring>","is_resume":true,"parts":[{"part_number":123,"url":"\u003cstring>","offset":123,"length":123,"expires_at":"\u003cstring>"}]}}}}}},"deprecated":false}},"jsLinks":[],"subdomain":"archetypeai-bd6fb3cf","siteName":"Archetype AI Documentation","title":"Initiate Upload - Archetype AI Documentation","relatedPagesConfig":{"enabled":true,"limit":5,"mode":"manual"},"navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-11-02T18:39:43.031Z","originalFileLocation":"api-reference/files/initiate-upload.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=\"Begin a direct-to-cloud upload and receive presigned URLs for the file parts\">\u003cmeta data-mint-head name=\"application-name\" content=\"Archetype AI Documentation\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/archetypeai-bd6fb3cf/k6xQEXnXaSGa-p6g/_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/archetypeai-bd6fb3cf/k6xQEXnXaSGa-p6g/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/archetypeai-bd6fb3cf/k6xQEXnXaSGa-p6g/_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/archetypeai-bd6fb3cf/k6xQEXnXaSGa-p6g/_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/archetypeai-bd6fb3cf/k6xQEXnXaSGa-p6g/_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/archetypeai-bd6fb3cf/k6xQEXnXaSGa-p6g/_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/archetypeai-bd6fb3cf/k6xQEXnXaSGa-p6g/_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/archetypeai-bd6fb3cf/k6xQEXnXaSGa-p6g/_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/archetypeai-bd6fb3cf/k6xQEXnXaSGa-p6g/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Initiate Upload - Archetype AI Documentation\">\u003cmeta data-mint-head property=\"og:description\" content=\"Begin a direct-to-cloud upload and receive presigned URLs for the file parts\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Archetype AI Documentation\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.archetypeai.app/api-reference/files/initiate-upload\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://archetypeai-bd6fb3cf.mintlify.app/_mintlify/api/og/v2?division=Files+API\u0026amp;title=Initiate+Upload\u0026amp;description=Begin+a+direct-to-cloud+upload+and+receive+presigned+URLs+for+the+file+parts\u0026amp;theme=899a1b6f9029858bd500052a\u0026amp;signature=86665a486c16e201e1280c24a99c85e36a5a04e32e1235a0d10842090bc24a77\">\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=\"Initiate Upload - Archetype AI Documentation\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Begin a direct-to-cloud upload and receive presigned URLs for the file parts\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://archetypeai-bd6fb3cf.mintlify.app/_mintlify/api/og/v2?division=Files+API\u0026amp;title=Initiate+Upload\u0026amp;description=Begin+a+direct-to-cloud+upload+and+receive+presigned+URLs+for+the+file+parts\u0026amp;theme=899a1b6f9029858bd500052a\u0026amp;signature=86665a486c16e201e1280c24a99c85e36a5a04e32e1235a0d10842090bc24a77\">\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/archetypeai-bd6fb3cf/k6xQEXnXaSGa-p6g/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Archetype AI Documentation\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#0047FF\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.archetypeai.app/api-reference/files/initiate-upload\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/api-reference/files/initiate-upload.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.archetypeai.app/#organization\",\"name\":\"Archetype AI Documentation\",\"url\":\"https://docs.archetypeai.app\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/archetypeai-bd6fb3cf/Fml2i7FmPyxjLCP7/logo/light.svg?fit=max\u0026auto=format\u0026n=Fml2i7FmPyxjLCP7\u0026q=85\u0026s=4b1f94a0bc6c65c3905d1a55d725b05f\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.archetypeai.app#website\",\"name\":\"Archetype AI Documentation\",\"url\":\"https://docs.archetypeai.app\",\"publisher\":{\"@id\":\"https://docs.archetypeai.app/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.archetypeai.app/api-reference/files/initiate-upload#webpage\",\"url\":\"https://docs.archetypeai.app/api-reference/files/initiate-upload\",\"name\":\"Initiate Upload\",\"description\":\"Begin a direct-to-cloud upload and receive presigned URLs for the file parts\",\"dateModified\":\"2026-11-02T18:39:43.031Z\",\"isPartOf\":{\"@id\":\"https://docs.archetypeai.app#website\"},\"breadcrumb\":{\"@id\":\"https://docs.archetypeai.app/api-reference/files/initiate-upload#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.archetypeai.app/api-reference/files/initiate-upload#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"API Reference\",\"item\":\"https://docs.archetypeai.app/api-reference/introduction\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Files API\",\"item\":\"https://docs.archetypeai.app/api-reference/files/about\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Initiate Upload\",\"item\":\"https://docs.archetypeai.app/api-reference/files/initiate-upload\"}]},{\"@type\":[\"TechArticle\",\"APIReference\"],\"@id\":\"https://docs.archetypeai.app/api-reference/files/initiate-upload#apireference\",\"headline\":\"Initiate Upload\",\"name\":\"Initiate Upload\",\"description\":\"Begin a direct-to-cloud upload and receive presigned URLs for the file parts\",\"url\":\"https://docs.archetypeai.app/api-reference/files/initiate-upload\",\"mainEntityOfPage\":{\"@id\":\"https://docs.archetypeai.app/api-reference/files/initiate-upload#webpage\"},\"dateModified\":\"2026-11-02T18:39:43.031Z\",\"publisher\":{\"@id\":\"https://docs.archetypeai.app/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.archetypeai.app#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Archetype AI Documentation\",\"creator\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","siteName":"Archetype AI Documentation","nav":{"global":null,"tabs":[{"tab":"Documentation","pages":[{"title":"Documentation","href":"/introduction/overview"}]},{"tab":"API Reference","directory":"accordion","groups":[{"group":"API Reference","public":true,"pages":[{"title":"Overview","href":"/api-reference/introduction"},{"title":"Quick Reference","href":"/api-reference/quick-reference"},{"title":"Error Handling","href":"/api-reference/errors"},{"title":"Direct Query","api":"POST /api/lens/query","tag":"PREVIEW","href":"/api-reference/query"},{"group":"Agents API","root":{"title":"About the Agents API","sidebarTitle":"About","href":"/api-reference/agents/about"},"pages":[{"group":"Blueprints","pages":[{"title":"Copy Blueprint","api":"POST /api/agents/blueprints/{reference}/copy","tag":"v2.0.0+","href":"/api-reference/agents/blueprints/copy-blueprint"},{"title":"Create Blueprint","api":"POST /api/agents/blueprints","tag":"v1.1.9+","href":"/api-reference/agents/blueprints/create-blueprint"},{"title":"Delete Blueprint","api":"DELETE /api/agents/blueprints/{reference}","tag":"v1.1.9+","href":"/api-reference/agents/blueprints/delete-blueprint"},{"title":"Get Blueprint","api":"GET /api/agents/blueprints/{reference}","tag":"v1.1.9+","href":"/api-reference/agents/blueprints/get-blueprint"},{"title":"List Blueprint Versions","api":"GET /api/agents/blueprints/{reference}/versions","tag":"v1.1.12+","href":"/api-reference/agents/blueprints/list-blueprint-versions"},{"title":"List Blueprints","api":"GET /api/agents/blueprints","tag":"v1.1.9+","href":"/api-reference/agents/blueprints/list-blueprints"}]},{"group":"Bundles","pages":[{"title":"Create Bundle","api":"POST /api/agents/bundles","tag":"v1.1.9+","deprecated":true,"href":"/api-reference/agents/bundles/create-bundle"},{"title":"Delete Bundle","api":"DELETE /api/agents/bundles/{bundle_id}","tag":"v1.1.9+","deprecated":true,"href":"/api-reference/agents/bundles/delete-bundle"},{"title":"Get Bundle","api":"GET /api/agents/bundles/{bundle_id}","tag":"v1.1.9+","deprecated":true,"href":"/api-reference/agents/bundles/get-bundle"},{"title":"List Bundles","api":"GET /api/agents/bundles","tag":"v1.1.9+","deprecated":true,"href":"/api-reference/agents/bundles/list-bundles"},{"title":"Run Bundle","api":"POST /api/agents/bundles/{bundle_id}/run","tag":"v1.1.9+","deprecated":true,"href":"/api-reference/agents/bundles/run-bundle"}]},{"group":"Evals","pages":[{"title":"Cancel Eval","api":"POST /api/agents/evals/{eval_id}/cancel","tag":"v1.1.12+","href":"/api-reference/agents/evals/cancel-eval"},{"title":"Create Eval","api":"POST /api/agents/evals","tag":"v1.1.12+","href":"/api-reference/agents/evals/create-eval"},{"title":"Delete Eval","api":"DELETE /api/agents/evals/{eval_id}","tag":"v1.1.12+","href":"/api-reference/agents/evals/delete-eval"},{"title":"Get Eval","api":"GET /api/agents/evals/{eval_id}","tag":"v1.1.12+","href":"/api-reference/agents/evals/get-eval"},{"title":"List Eval Examples","api":"GET /api/agents/evals/{eval_id}/examples","tag":"v1.1.12+","href":"/api-reference/agents/evals/list-eval-examples"},{"title":"List Evals","api":"GET /api/agents/evals","tag":"v1.1.12+","href":"/api-reference/agents/evals/list-evals"}]},{"group":"Instances","pages":[{"title":"Cancel Agent","api":"POST /api/agents/instances/{agent_id}/cancel","tag":"v1.1.9+","href":"/api-reference/agents/instances/cancel-agent"},{"title":"Create Agent","api":"POST /api/agents/instances","tag":"v2.0.0+","href":"/api-reference/agents/instances/create-agent"},{"title":"Delete Agent","api":"DELETE /api/agents/instances/{agent_id}","tag":"v1.1.9+","href":"/api-reference/agents/instances/delete-agent"},{"title":"Get Agent Logs","api":"GET /api/agents/instances/{agent_id}/logs","tag":"v1.1.9+","href":"/api-reference/agents/instances/get-agent-logs"},{"title":"Get Agent Results","api":"GET /api/agents/instances/{agent_id}/results","tag":"v1.1.9+","href":"/api-reference/agents/instances/get-agent-results"},{"title":"Get Agent","api":"GET /api/agents/instances/{agent_id}","tag":"v1.1.9+","href":"/api-reference/agents/instances/get-agent"},{"title":"List Agent Events","api":"GET /api/agents/instances/{agent_id}/events","tag":"v1.1.9+","href":"/api-reference/agents/instances/list-agent-events"},{"title":"List Agents","api":"GET /api/agents/instances","tag":"v1.1.9+","href":"/api-reference/agents/instances/list-agents"},{"title":"Pause Agent","api":"POST /api/agents/instances/{agent_id}/pause","tag":"v1.1.9+","href":"/api-reference/agents/instances/pause-agent"},{"title":"Connect to Agent","api":"GET /api/agents/instances/{agent_id}/connect","tag":"v1.1.13+","href":"/api-reference/agents/instances/connect-agent"},{"title":"Query Agent","api":"POST /api/agents/instances/{agent_id}/query","tag":"v1.1.12+","href":"/api-reference/agents/instances/query-agent"},{"title":"Resume Agent","api":"POST /api/agents/instances/{agent_id}/resume","tag":"v1.1.9+","href":"/api-reference/agents/instances/resume-agent"}]},{"group":"Nodes","pages":[{"title":"List Node Registry","api":"GET /api/agents/nodes/registry","tag":"v1.1.9+","href":"/api-reference/agents/nodes/list-node-registry"}]},{"group":"Optimizations","pages":[{"title":"Cancel Optimization","api":"POST /api/agents/optimizations/{optimization_id}/cancel","tag":"v1.1.12+","href":"/api-reference/agents/optimizations/cancel-optimization"},{"title":"Create Optimization","api":"POST /api/agents/optimizations","tag":"v1.1.12+","href":"/api-reference/agents/optimizations/create-optimization"},{"title":"Delete Optimization","api":"DELETE /api/agents/optimizations/{optimization_id}","tag":"v1.1.12+","href":"/api-reference/agents/optimizations/delete-optimization"},{"title":"Get Optimization","api":"GET /api/agents/optimizations/{optimization_id}","tag":"v1.1.12+","href":"/api-reference/agents/optimizations/get-optimization"},{"title":"List Optimization Trials","api":"GET /api/agents/optimizations/{optimization_id}/trials","tag":"v1.1.12+","href":"/api-reference/agents/optimizations/list-optimization-trials"},{"title":"List Optimizations","api":"GET /api/agents/optimizations","tag":"v1.1.12+","href":"/api-reference/agents/optimizations/list-optimizations"},{"title":"Promote Trial","api":"POST /api/agents/optimizations/{optimization_id}/trials/{trial_id}/promote","tag":"v1.1.12+","href":"/api-reference/agents/optimizations/promote-trial"}]},{"group":"Packages","pages":[{"title":"Create Package","api":"POST /api/agents/packages","tag":"v2.0.0+","href":"/api-reference/agents/packages/create-package"},{"title":"Delete Package","api":"DELETE /api/agents/packages/{package_id}","tag":"v2.0.0+","href":"/api-reference/agents/packages/delete-package"},{"title":"Get Package","api":"GET /api/agents/packages/{package_id}","tag":"v2.0.0+","href":"/api-reference/agents/packages/get-package"},{"title":"List Packages","api":"GET /api/agents/packages","tag":"v2.0.0+","href":"/api-reference/agents/packages/list-packages"}]}]},{"group":"Projects API","root":{"title":"About the Projects API","sidebarTitle":"About","tag":"v2.0.0+","href":"/api-reference/projects/about"},"pages":[{"title":"Create Project","api":"POST /api/projects","tag":"v2.0.0+","href":"/api-reference/projects/create-project"},{"title":"Delete Project","api":"DELETE /api/projects/{project_id}","tag":"v2.0.0+","href":"/api-reference/projects/delete-project"},{"title":"Get Project","api":"GET /api/projects/{project_id}","tag":"v2.0.0+","href":"/api-reference/projects/get-project"},{"title":"List Projects","api":"GET /api/projects","tag":"v2.0.0+","href":"/api-reference/projects/list-projects"},{"title":"Update Project","api":"PATCH /api/projects/{project_id}","tag":"v2.0.0+","href":"/api-reference/projects/update-project"}]},{"group":"Lens API","root":{"title":"About the Lens API","sidebarTitle":"About","href":"/api-reference/lens/about"},"pages":[{"title":"Register Lens","api":"POST /api/lens/register","tag":"v1.1.5+","href":"/api-reference/lens/lens-register"},{"title":"Clone Lens","api":"POST /api/lens/clone","tag":"v1.1.5+","href":"/api-reference/lens/lens-clone"},{"title":"Modify Lens","api":"POST /api/lens/modify","tag":"v1.1.5+","href":"/api-reference/lens/lens-modify"},{"title":"Delete Lens","api":"POST /api/lens/delete","tag":"v1.1.5+","href":"/api-reference/lens/lens-delete"},{"title":"Get Lens Info","api":"GET /api/lens/info","tag":"v1.1.5+","href":"/api-reference/lens/get-info"},{"title":"Get Lens Metadata","api":"GET /api/lens/metadata","tag":"v1.1.5+","href":"/api-reference/lens/get-metadata"},{"title":"Create Lens Session","api":"POST /api/lens/sessions/create","tag":"v1.1.5+","href":"/api-reference/lens/create-session"},{"title":"Destroy Lens Session","api":"POST /api/lens/sessions/destroy","tag":"v1.1.5+","href":"/api-reference/lens/destroy-session"},{"title":"Get Sessions Info","api":"GET /api/lens/sessions/info","tag":"v1.1.5+","href":"/api-reference/lens/get-sessions-info"},{"title":"Get Sessions Metadata","api":"GET /api/lens/sessions/metadata","tag":"v1.1.5+","href":"/api-reference/lens/get-sessions-metadata"},{"title":"Session Events Process","api":"POST /api/lens/sessions/events/process","tag":"v1.1.5+","href":"/api-reference/lens/sessions-events-process"},{"title":"Lens Events API (WebSocket)","href":"/api-reference/lens/websocket-events"},{"title":"Consume Session Events (SSE)","api":"GET /api/lens/sessions/consumer/{session_id}","tag":"v1.1.5+","href":"/api-reference/lens/consumer"},{"title":"Lens API Examples","href":"/api-reference/lens/examples"}]},{"group":"Files API","root":{"title":"About the Files API","sidebarTitle":"About","href":"/api-reference/files/about"},"pages":[{"title":"Upload File","api":"POST /api/files","tag":"v1.1.5+","href":"/api-reference/files/upload"},{"title":"Upload Base64 File","api":"POST /api/files/base64","tag":"v1.1.5+","href":"/api-reference/files/upload-base64"},{"title":"Delete File by ID","api":"DELETE /api/files/{file_id}","tag":"v2.0.0+","href":"/api-reference/files/delete-file-by-id"},{"title":"Delete File","api":"DELETE /api/files/delete/{file_id}","tag":"v1.1.5+","href":"/api-reference/files/delete-file"},{"title":"Download File Content","api":"GET /api/files/{file_id}/content","tag":"v2.0.0+","href":"/api-reference/files/download-file-content"},{"title":"Download File","api":"GET /api/files/download/{file_id}","tag":"v1.1.5+","href":"/api-reference/files/download-file"},{"title":"Get Files Info","api":"GET /api/files/info","tag":"v1.1.5+","href":"/api-reference/files/get-info"},{"title":"Get File","api":"GET /api/files/{file_id}","tag":"v2.0.0+","href":"/api-reference/files/get-file"},{"title":"Get File Metadata","api":"GET /api/files/metadata/{file_id}","tag":"v1.1.5+","href":"/api-reference/files/get-metadata"},{"title":"List Files","api":"GET /api/files","tag":"v2.0.0+","href":"/api-reference/files/list-files"},{"title":"List Files Metadata","api":"GET /api/files/metadata","description":"List metadata for all files in the authenticated organization","tag":"v1.1.5+","href":"/api-reference/files/get-all-metadata"},{"title":"Initiate Upload","api":"POST /api/files/uploads/initiate","tag":"v1.1.5+","href":"/api-reference/files/initiate-upload"},{"title":"Generate Upload Part URLs","api":"POST /api/files/uploads/{upload_id}/parts/urls","description":"Request fresh presigned URLs for specific parts of an in-progress upload","tag":"v1.1.5+","href":"/api-reference/files/generate-part-urls"},{"title":"Checkpoint Upload Parts","api":"POST /api/files/uploads/{upload_id}/parts/checkpoint","tag":"v1.1.5+","href":"/api-reference/files/checkpoint-parts"},{"title":"Complete Upload","api":"POST /api/files/uploads/{upload_id}/complete","tag":"v1.1.5+","href":"/api-reference/files/complete-upload"},{"title":"Abort Upload","api":"POST /api/files/uploads/{upload_id}/abort","tag":"v1.1.5+","href":"/api-reference/files/abort-upload"}]},{"group":"Fine-Tuning Service","root":{"title":"About the Fine-Tuning Service API","sidebarTitle":"About","href":"/api-reference/fine-tuning/about"},"pages":[{"title":"Create Fine-tuning Job","sidebarTitle":"Create Job","api":"POST /api/fine-tuning/jobs","tag":"v1.1.5+","href":"/api-reference/fine-tuning/create-job"},{"title":"Get Fine-tuning Job Details","sidebarTitle":"Get Job Details","api":"GET /api/fine-tuning/jobs/{id}","tag":"v1.1.5+","href":"/api-reference/fine-tuning/get-job"},{"title":"List Fine-tuning Jobs","sidebarTitle":"List Jobs","api":"GET /api/fine-tuning/jobs","tag":"v1.1.5+","href":"/api-reference/fine-tuning/list-jobs"},{"title":"Pause Fine-tuning Job","sidebarTitle":"Pause Job","api":"POST /api/fine-tuning/jobs/{id}/pause","tag":"v1.1.5+","href":"/api-reference/fine-tuning/pause-job"},{"title":"Resume Fine-tuning Job","sidebarTitle":"Resume Job","api":"POST /api/fine-tuning/jobs/{id}/resume","tag":"v1.1.5+","href":"/api-reference/fine-tuning/resume-job"},{"title":"Cancel Fine-tuning Job","sidebarTitle":"Cancel Job","api":"POST /api/fine-tuning/jobs/{id}/cancel","tag":"v1.1.5+","href":"/api-reference/fine-tuning/cancel-job"},{"title":"List Job Checkpoints","api":"GET /api/fine-tuning/jobs/{id}/checkpoints","tag":"v1.1.5+","href":"/api-reference/fine-tuning/list-job-checkpoints"},{"title":"List Job Events","api":"GET /api/fine-tuning/jobs/{id}/events","tag":"v1.1.5+","href":"/api-reference/fine-tuning/list-job-events"},{"title":"List Job Logs","api":"GET /api/fine-tuning/jobs/{id}/logs","tag":"v1.1.5+","href":"/api-reference/fine-tuning/list-job-logs"},{"title":"List Job Metrics","api":"GET /api/fine-tuning/jobs/{id}/metrics","tag":"v1.1.5+","href":"/api-reference/fine-tuning/list-job-metrics"},{"title":"List Checkpoint Options","api":"GET /api/fine-tuning/checkpoints","tag":"v1.1.5+","href":"/api-reference/fine-tuning/list-checkpoint-options"}]},{"group":"Batch Processing API","root":{"title":"About the Batch Processing API","sidebarTitle":"About","href":"/api-reference/batch/about"},"pages":[{"group":"Jobs","pages":[{"title":"Create Job","api":"POST /api/batch/jobs","tag":"v1.1.0+","href":"/api-reference/batch/jobs/create-job"},{"title":"List Jobs","api":"GET /api/batch/jobs","tag":"v1.1.0+","href":"/api-reference/batch/jobs/list-jobs"},{"title":"Get Job","api":"GET /api/batch/jobs/{id}","tag":"v1.1.0+","href":"/api-reference/batch/jobs/get-job"},{"title":"Retry Job","api":"POST /api/batch/jobs/{id}/retry","tag":"v1.1.0+","href":"/api-reference/batch/jobs/retry-job"},{"title":"Pause Job","api":"POST /api/batch/jobs/{id}/pause","tag":"v1.1.5+","href":"/api-reference/batch/jobs/pause-job"},{"title":"Resume Job","api":"POST /api/batch/jobs/{id}/resume","tag":"v1.1.5+","href":"/api-reference/batch/jobs/resume-job"},{"title":"Delete Job","api":"DELETE /api/batch/jobs/{id}","tag":"v1.1.0+","href":"/api-reference/batch/jobs/delete-job"},{"title":"Cancel Job","api":"POST /api/batch/jobs/{id}/cancel","tag":"v1.1.0+","href":"/api-reference/batch/jobs/cancel-job"},{"title":"Get Queue Depths","api":"GET /api/batch/jobs/queue","tag":"v1.1.0+","href":"/api-reference/batch/jobs/get-queue-depths"}]},{"group":"Events","pages":[{"title":"List Job Events","api":"GET /api/batch/jobs/{id}/events","tag":"v1.1.0+","href":"/api-reference/batch/events/list-job-events"}]},{"group":"I/O","pages":[{"title":"List Inputs","api":"GET /api/batch/jobs/{id}/inputs","tag":"v1.1.0+","href":"/api-reference/batch/io/list-inputs"},{"title":"List Outputs","api":"GET /api/batch/jobs/{id}/outputs","tag":"v1.1.0+","href":"/api-reference/batch/io/list-outputs"},{"title":"List Inputs With Progress","api":"GET /api/batch/jobs/{id}/inputs/progress","tag":"v1.1.0+","href":"/api-reference/batch/io/list-inputs-progress"},{"title":"Get Inputs Progress Counts","api":"GET /api/batch/jobs/{id}/inputs/progress/counts","tag":"v1.1.0+","href":"/api-reference/batch/io/get-inputs-progress-counts"},{"title":"Get Inputs Progress Traces","api":"GET /api/batch/jobs/{id}/inputs/progress/traces","tag":"v1.1.0+","href":"/api-reference/batch/io/get-inputs-progress-traces"},{"title":"Validate Prospective Inputs","api":"POST /api/batch/jobs/inputs/validation","tag":"v1.1.5+","href":"/api-reference/batch/io/validate-inputs"}]},{"group":"Progress","pages":[{"title":"List Job Progress","api":"GET /api/batch/jobs/{id}/progress","tag":"v1.1.0+","href":"/api-reference/batch/progress/list-job-progress"}]},{"group":"Registry","pages":[{"title":"List Pipelines","api":"GET /api/batch/registry/pipelines","tag":"v1.1.0+","href":"/api-reference/batch/registry/pipelines/list-pipelines"},{"title":"Get Pipeline","api":"GET /api/batch/registry/pipelines/{id}","tag":"v1.1.0+","href":"/api-reference/batch/registry/pipelines/get-pipeline"},{"title":"Get Pipeline Schema","api":"GET /api/batch/registry/pipelines/{id}/schema","tag":"v1.1.0+","href":"/api-reference/batch/registry/pipelines/get-pipeline-schema"}]}]}]}]},{"tab":"For Agents","pages":[{"title":"For Agents","href":"/for-agents/agent-skills"}]},{"tab":"Admin","pages":[{"title":"Admin","href":"/developer-console/org-admin/overview"}]}]},"basePath":"","title":"Initiate Upload - Archetype AI Documentation","buildId":"dpl_9VVk5y1P8k1ATeJguVngy9Q3cmbD","deploymentId":"dpl_9VVk5y1P8k1ATeJguVngy9Q3cmbD","dynamics":["c2aa737661","2b790eda92","b0f84f53ff"],"chunks":["OpenApiReferenceProvider-DX1Meug0.js","utils-B_OMIQVC.js","cloneDeep-izs3Hzxb.js","_Uint8Array-BVIqJ90l.js","isObjectLike-C8vmzPEN.js","isArray-Dcu1dQ5t.js","utils-ChxhRPMa.js","toString-BX-iyh8G.js","isSymbol-CSH9U2Gm.js","addUniqueKeysToSchema-CuKvD8Iv.js","snippetPresets-C5d7p2hp.js","style-to-object-BY3JEAdk.js","v4-DIgz8zy6.js","ApiExamples-CfHcE8m4.js","isEqual-BfaiBbcl.js","usePlaygroundInputsStore-C1zZV314.js","shallow-CmQhqCJn.js","getApiPlaygroundDisplay-YRo9s1O7.js","CodeSnippet-RN1MTdfk.js","CodeSnippets-DKLPHxJA.js","Page-BAvA99GL.js","getPastedJson-bz0M41mU.js","icon-CsmhpPrv.js","MethodPill-CNGsVE77.js","DuplicateIcon-DilfU_Z2.js","createIcon-BdsYzQck.js","DynamicMarkdown-CbqEDjbV.js","SectionHeading-O6hXpFCN.js","axios-vUo_bRtp.js"]}