Choose where Unfold runs and where your documents travel.
Unfold supports two explicit processing modes. Neither mode silently falls back to the other.
Hosted
Direct / BYOK
TypeScript entry point
Unfold
DirectUnfold
Authentication
Unfold API key
Provider API keys
Document route
Your app → Unfold → provider
Your app → provider
Job orchestration
Managed by Unfold
Runs in your process
Billing
Unfold credits
Provider billing
CLI
Default after login
Add --local
Hosted
Hosted processing is the shortest path to production. Unfold stores the document, creates a durable job, runs each selected provider independently, and retains each normalized result for retrieval.Credits pay for Unfold-hosted processing. Each account receives 5,000 free credits each month, and purchased credits never expire. Direct or BYOK requests do not use Unfold credits.
How credits work
1,000 credits equal $1 of Unfold-hosted usage. Credit usage is based on the selected parser’s upstream price and the infrastructure needed to run the job, with a 10% Unfold beta margin included. Native parser usage depends on active processing time and allocated compute.A comparison uses credits for each provider that successfully returns a parsed result. Providers that fail before returning a result do not consume credits. Direct or BYOK requests are billed by the provider and never use Unfold credits.Free credits reset each month. Purchased credits never expire and remain available after the monthly allowance resets.Hosted document sources are limited to 100 MB, whether uploaded or fetched
from a public URL. Stored documents and completed results expire after 7
days, and job records are retained for 30 days. Delete a document sooner
with router.documents.delete(documentId) or the hosted document deletion
endpoint. Storage during these retention windows does not consume credits.Public URL inputs are fetched once into Unfold storage before any provider
runs. This gives retries and comparisons one immutable source and avoids sending
a user-controlled URL to private native parsers.
Direct / BYOK
Direct processing uses provider adapters from @file_router/sdk inside your runtime. Your document and provider credential do not pass through Unfold, but the selected provider still receives the document.
import { DirectUnfold } from "@file_router/sdk"import { llamaparse } from "@file_router/sdk/llamaparse"const router = new DirectUnfold({ providers: { llamaparse: llamaparse() },})const result = await router.parse("./report.pdf", { provider: "llamaparse", outputs: ["markdown"],})
Direct means the request bypasses Unfold infrastructure. It does not mean the
document stays on the machine.
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"Unfold","description":"Unfold gives your app one API for document parsing across providers.","colors":{"primary":"#F59E0B","light":"#FCD34D","dark":"#D97706"},"logo":{"light":"https://mintcdn.com/unfold-0a6049eb/i4i4NoVPlmbU3kSw/assets/unfold-logo.svg?fit=max\u0026auto=format\u0026n=i4i4NoVPlmbU3kSw\u0026q=85\u0026s=663011025ec3241266661aeffa4ebfb9","dark":"https://mintcdn.com/unfold-0a6049eb/i4i4NoVPlmbU3kSw/assets/unfold-logo.svg?fit=max\u0026auto=format\u0026n=i4i4NoVPlmbU3kSw\u0026q=85\u0026s=663011025ec3241266661aeffa4ebfb9","href":"https://unfold.unfold-app.workers.dev"},"favicon":"https://mintcdn.com/unfold-0a6049eb/i4i4NoVPlmbU3kSw/assets/favicon.svg?fit=max\u0026auto=format\u0026n=i4i4NoVPlmbU3kSw\u0026q=85\u0026s=5cae5c15b010051018bca99b9b87e70d","appearance":{"default":"system"},"navbar":{"links":[{"href":"https://github.com/shankar7055/Unfold.git","label":"GitHub"},{"href":"https://unfold.unfold-app.workers.dev/dashboard","label":"Dashboard"}]},"footer":{"socials":{"github":"https://github.com/unfold-dev/unfold","discord":"https://discord.gg/dtPnzkqCcG"}},"fonts":{"family":"Geist"},"icons":{"library":"lucide"},"styling":{"latex":false},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"unfold-0a6049eb","hasAudioNarration":false,"actualSubdomain":"unfold-0a6049eb","customDomains":[],"gitSource":{"type":"github","owner":"shankywho","repo":"unfold","deployBranch":"main","contentDirectory":"docs","isPrivate":false,"mountPath":"","label":""},"entitlements":{"AI_CHAT":{"status":"DISABLED"}},"buildId":"6aea211e683852a169509c3d:success","clientVersion":"0.0.4286","searchFilterCounts":[{"language":"default","tag":"Guides","count":5},{"language":"default","tag":"Concepts","count":3},{"language":"default","tag":"TypeScript SDK","count":3},{"language":"default","tag":"API reference","count":2},{"language":"default","tag":"Get started","count":2},{"language":"default","tag":"Command line","count":1}]},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":false,"enableContextualStarterQuestions":false,"enableAskAiSearchBar":true},"basePath":"","hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-rbac-roles","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"site-roles","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-metadata","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"sso-setup-deadline-banner","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"live-agents","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"starter-pricing","enabled":true,"variant":{"name":"control","enabled":true,"payload":{"type":"string","value":"control"},"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"wildcard-email-auth","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":true},"customCss":[]}
{"page":{"pagePath":"concepts/processing-modes","slug":"/concepts/processing-modes","pageMetadata":{"title":"Hosted and direct processing","description":"Choose where Unfold runs and where your documents travel.","href":"/concepts/processing-modes"},"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: \"Choose where Unfold runs and where your documents travel.\"\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={code:`code`,p:`p`,pre:`pre`,span:`span`,strong:`strong`,tbody:`tbody`,td:`td`,th:`th`,thead:`thead`,tr:`tr`,..._provideComponents(),...props.components},{CodeBlock,Heading,Table,Warning}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Table)_missingMdxReference(`Table`,true);if(!Warning)_missingMdxReference(`Warning`,true);return _jsxs(_Fragment,{children:[_jsx(_components.p,{children:`Unfold supports two explicit processing modes. Neither mode silently falls back to the other.`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{}),_jsx(_components.th,{children:`Hosted`}),_jsx(_components.th,{children:`Direct / BYOK`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`TypeScript entry point`}),_jsx(_components.td,{children:_jsx(_components.code,{children:`Unfold`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`DirectUnfold`})})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Authentication`}),_jsx(_components.td,{children:`Unfold API key`}),_jsx(_components.td,{children:`Provider API keys`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Document route`}),_jsx(_components.td,{children:`Your app → Unfold → provider`}),_jsx(_components.td,{children:`Your app → provider`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Job orchestration`}),_jsx(_components.td,{children:`Managed by Unfold`}),_jsx(_components.td,{children:`Runs in your process`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Billing`}),_jsx(_components.td,{children:`Unfold credits`}),_jsx(_components.td,{children:`Provider billing`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`CLI`}),_jsxs(_components.td,{children:[`Default after `,_jsx(_components.code,{children:`login`})]}),_jsxs(_components.td,{children:[`Add `,_jsx(_components.code,{children:`--local`})]})]})]})]}),`\n`,_jsx(Heading,{level:`2`,id:`hosted`,children:`Hosted`}),`\n`,_jsx(_components.p,{children:`Hosted processing is the shortest path to production. Unfold stores the document, creates a durable job, runs each selected provider independently, and retains each normalized result for retrieval.`}),`\n`,_jsxs(_components.p,{children:[`Credits pay for Unfold-hosted processing. Each account receives `,_jsx(_components.strong,{children:`5,000 free credits each month`}),`, and purchased credits never expire. Direct or BYOK requests do not use Unfold credits.`]}),`\n`,_jsx(Heading,{level:`2`,id:`how-credits-work`,children:`How credits work`}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`1,000 credits equal $1 of Unfold-hosted usage.`}),` Credit usage is based on the selected parser’s upstream price and the infrastructure needed to run the job, with a 10% Unfold beta margin included. Native parser usage depends on active processing time and allocated compute.`]}),`\n`,_jsx(_components.p,{children:`A comparison uses credits for each provider that successfully returns a parsed result. Providers that fail before returning a result do not consume credits. Direct or BYOK requests are billed by the provider and never use Unfold credits.`}),`\n`,_jsx(_components.p,{children:`Free credits reset each month. Purchased credits never expire and remain available after the monthly allowance resets.`}),`\n`,_jsxs(_components.p,{children:[`Hosted document sources are limited to `,_jsx(_components.strong,{children:`100 MB`}),`, whether uploaded or fetched\nfrom a public URL. Stored documents and completed results expire after `,_jsx(_components.strong,{children:`7\ndays`}),`, and job records are retained for `,_jsx(_components.strong,{children:`30 days`}),`. Delete a document sooner\nwith `,_jsx(_components.code,{children:`router.documents.delete(documentId)`}),` or the hosted document deletion\nendpoint. Storage during these retention windows does not consume credits.`]}),`\n`,_jsx(_components.p,{children:`Public URL inputs are fetched once into Unfold storage before any provider\nruns. This gives retries and comparisons one immutable source and avoids sending\na user-controlled URL to private native parsers.`}),`\n`,_jsx(Heading,{level:`2`,id:`direct-/-byok`,children:`Direct / BYOK`}),`\n`,_jsxs(_components.p,{children:[`Direct processing uses provider adapters from `,_jsx(_components.code,{children:`@file_router/sdk`}),` inside your runtime. Your document and provider credential do not pass through Unfold, but the selected provider still receives the document.`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`11`,language:`typescript`,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:`typescript`,children:_jsxs(_components.code,{language:`typescript`,numberOfLines:`11`,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:` { `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`DirectUnfold`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` } `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`from`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"@file_router/sdk\"`})]}),`\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:` { `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`llamaparse`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` } `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`from`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"@file_router/sdk/llamaparse\"`})]}),`\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:` router`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` new`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` DirectUnfold`}),_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:` providers:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`llamaparse:`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` llamaparse`}),_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:` router`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`parse`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"./report.pdf\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` provider:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"llamaparse\"`}),_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:` outputs:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` [`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"markdown\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`],`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`})`})}),`\n`]})})}),`\n`,_jsx(Warning,{children:_jsx(_components.p,{children:`Direct means the request bypasses Unfold infrastructure. It does not mean the\ndocument stays on the machine.`})})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Hosted and direct processing","description":"Choose where Unfold runs and where your documents travel.","href":"/concepts/processing-modes"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Hosted","slug":"hosted","depth":2,"children":[]},{"title":"How credits work","slug":"how-credits-work","depth":2,"children":[]},{"title":"Direct / BYOK","slug":"direct-/-byok","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":[],"subdomain":"unfold-0a6049eb","siteName":"Unfold","title":"Hosted and direct processing - Unfold","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-07-29T21:24:51.915Z","originalFileLocation":"concepts/processing-modes.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=\"Choose where Unfold runs and where your documents travel.\">\u003cmeta data-mint-head name=\"application-name\" content=\"Unfold\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/unfold-0a6049eb/e5A3Z-6bagweJLj9/_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/unfold-0a6049eb/e5A3Z-6bagweJLj9/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/unfold-0a6049eb/e5A3Z-6bagweJLj9/_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/unfold-0a6049eb/e5A3Z-6bagweJLj9/_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/unfold-0a6049eb/e5A3Z-6bagweJLj9/_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/unfold-0a6049eb/e5A3Z-6bagweJLj9/_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/unfold-0a6049eb/e5A3Z-6bagweJLj9/_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/unfold-0a6049eb/e5A3Z-6bagweJLj9/_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/unfold-0a6049eb/e5A3Z-6bagweJLj9/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Hosted and direct processing - Unfold\">\u003cmeta data-mint-head property=\"og:description\" content=\"Choose where Unfold runs and where your documents travel.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Unfold\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://unfold-0a6049eb.mintlify.app/concepts/processing-modes\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://unfold-0a6049eb.mintlify.site/_mintlify/api/og/v2?division=Concepts\u0026amp;title=Hosted+and+direct+processing\u0026amp;description=Choose+where+Unfold+runs+and+where+your+documents+travel.\u0026amp;theme=c56224accd5d490b8fda66a5\u0026amp;signature=e93fdfd221fd871d50b4ae011695e0426b96e2741cd986515cce0ab9210448c6\">\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=\"Hosted and direct processing - Unfold\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Choose where Unfold runs and where your documents travel.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://unfold-0a6049eb.mintlify.site/_mintlify/api/og/v2?division=Concepts\u0026amp;title=Hosted+and+direct+processing\u0026amp;description=Choose+where+Unfold+runs+and+where+your+documents+travel.\u0026amp;theme=c56224accd5d490b8fda66a5\u0026amp;signature=e93fdfd221fd871d50b4ae011695e0426b96e2741cd986515cce0ab9210448c6\">\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/unfold-0a6049eb/e5A3Z-6bagweJLj9/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Unfold\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#F59E0B\">\u003clink data-mint-head rel=\"canonical\" href=\"https://unfold-0a6049eb.mintlify.app/concepts/processing-modes\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/concepts/processing-modes.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://unfold-0a6049eb.mintlify.app/#organization\",\"name\":\"Unfold\",\"url\":\"https://unfold-0a6049eb.mintlify.app\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/unfold-0a6049eb/i4i4NoVPlmbU3kSw/assets/unfold-logo.svg?fit=max\u0026auto=format\u0026n=i4i4NoVPlmbU3kSw\u0026q=85\u0026s=663011025ec3241266661aeffa4ebfb9\"}},{\"@type\":\"WebSite\",\"@id\":\"https://unfold-0a6049eb.mintlify.app#website\",\"name\":\"Unfold\",\"url\":\"https://unfold-0a6049eb.mintlify.app\",\"publisher\":{\"@id\":\"https://unfold-0a6049eb.mintlify.app/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://unfold-0a6049eb.mintlify.app/concepts/processing-modes#webpage\",\"url\":\"https://unfold-0a6049eb.mintlify.app/concepts/processing-modes\",\"name\":\"Hosted and direct processing\",\"description\":\"Choose where Unfold runs and where your documents travel.\",\"dateModified\":\"2026-07-29T21:24:51.915Z\",\"isPartOf\":{\"@id\":\"https://unfold-0a6049eb.mintlify.app#website\"},\"breadcrumb\":{\"@id\":\"https://unfold-0a6049eb.mintlify.app/concepts/processing-modes#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://unfold-0a6049eb.mintlify.app/concepts/processing-modes#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Concepts\",\"item\":\"https://unfold-0a6049eb.mintlify.app/concepts/how-it-works\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Hosted and direct processing\",\"item\":\"https://unfold-0a6049eb.mintlify.app/concepts/processing-modes\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://unfold-0a6049eb.mintlify.app/concepts/processing-modes#article\",\"headline\":\"Hosted and direct processing\",\"name\":\"Hosted and direct processing\",\"description\":\"Choose where Unfold runs and where your documents travel.\",\"url\":\"https://unfold-0a6049eb.mintlify.app/concepts/processing-modes\",\"mainEntityOfPage\":{\"@id\":\"https://unfold-0a6049eb.mintlify.app/concepts/processing-modes#webpage\"},\"dateModified\":\"2026-07-29T21:24:51.915Z\",\"publisher\":{\"@id\":\"https://unfold-0a6049eb.mintlify.app/#organization\"},\"isPartOf\":{\"@id\":\"https://unfold-0a6049eb.mintlify.app#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Unfold\",\"publisher\":{\"@type\":\"Organization\",\"name\":\"Unfold\"},\"provider\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","agentPointerHref":"/concepts/processing-modes.md","siteName":"Unfold","nav":{"global":null,"groups":[{"group":"Get started","pages":[{"title":"One API for document parsing","sidebarTitle":"Overview","href":"/index"},{"title":"Quickstart","href":"/quickstart"}]},{"group":"Guides","pages":[{"title":"Guides","href":"/guides/overview"},{"title":"Fast preview, then full parse","href":"/guides/fast-then-strong"},{"title":"Cheap path, then escalate","href":"/guides/cheap-path"},{"title":"Bake off engines","href":"/guides/bake-off"},{"title":"Idempotency and cleanup","href":"/guides/durable-jobs"}]},{"group":"Concepts","pages":[{"title":"How Unfold works","description":"The stable contract between your application and document parsing providers.","href":"/concepts/how-it-works"},{"title":"Hosted and direct processing","href":"/concepts/processing-modes"},{"title":"Results","description":"The normalized result shapes returned by Unfold.","href":"/concepts/results"}]},{"group":"TypeScript SDK","pages":[{"title":"Parse","href":"/sdk/parse"},{"title":"Compare","href":"/sdk/compare"},{"title":"Provider options","href":"/sdk/provider-options"}]},{"group":"Command line","pages":[{"title":"CLI","sidebarTitle":"Overview","href":"/cli/overview"}]},{"group":"API reference","pages":[{"title":"Hosted API","href":"/api/overview"},{"title":"Documents and jobs","href":"/api/jobs"}]}]},"basePath":"","title":"Hosted and direct processing - Unfold","deploymentId":"dpl_G6E2ur2Zjq51xGTVZPSFXsWoTxCu","buildId":"dpl_G6E2ur2Zjq51xGTVZPSFXsWoTxCu","dynamics":[],"chunks":[]}