Analyze and cross-reference multiple documents together. Unlike /analyze (single
document) or /analyze/batch (many documents independently), this endpoint lets
the agent reason across all documents simultaneously.
Use cases:
Validate an invoice against a contract or purchase order
Check that a report’s numbers match a source spreadsheet
Compare terms across multiple agreements
Reconcile data from different sources
Upload 2-5 files and/or provide URLs. Each document gets a label (auto-generated
from filename, or you can provide custom labels). The agent can search, read, and
compare data across all documents.
Provide a typed schema — each field has a type and description.
Example:
{ "rates_match": {"type": "boolean", "description": "Do the hourly rates on the invoice match the contract?"}, "total_valid": {"type": "boolean", "description": "Does the invoice total equal the sum of line items?"}, "correct_vendor": {"type": "boolean", "description": "Is the vendor name on the invoice the same as the contracting party?"}}
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"The Drive AI","colors":{"primary":"#6366F1","light":"#818CF8","dark":"#4F46E5"},"logo":{"light":"https://mintcdn.com/thedriveai/7p_tCtj9qAPOIRij/logo/light.svg?fit=max\u0026auto=format\u0026n=7p_tCtj9qAPOIRij\u0026q=85\u0026s=729f2cc138ce2a3bfb9f73b9dcfc25b1","dark":"https://mintcdn.com/thedriveai/7p_tCtj9qAPOIRij/logo/dark.svg?fit=max\u0026auto=format\u0026n=7p_tCtj9qAPOIRij\u0026q=85\u0026s=a58150ea42b3f6c1a83fc16f2614b555"},"favicon":"https://mintcdn.com/thedriveai/iw4AQrNX1HQm5qm5/favicon.png?fit=max\u0026auto=format\u0026n=iw4AQrNX1HQm5qm5\u0026q=85\u0026s=89fdfcb0c008070c22f5086fedba1f9e","navbar":{"links":[{"href":"https://thedrive.ai/contact","label":"Contact"},{"href":"https://cal.com/bigyan","label":"Get a demo"}],"primary":{"type":"button","label":"Open App","href":"https://thedrive.ai"}},"footer":{"socials":{"discord":"https://discord.com/invite/mCnxKxyxPC","x":"https://x.com/thedriveai","linkedin":"https://linkedin.com/company/thedriveai","instagram":"https://instagram.com/thedriveai","reddit":"https://reddit.com/r/thedriveai"}},"seo":{"metatags":{"og:site_name":"The Drive AI Docs","og:type":"website","og:image":"https://thedrive.ai/cover.png","og:locale":"en_US","twitter:card":"summary_large_image","twitter:site":"@thedriveai","twitter:image":"https://thedrive.ai/cover.png"}},"styling":{"latex":true},"navigation":{"global":{"anchors":[{"anchor":"Website","icon":"globe","href":"https://thedrive.ai"},{"anchor":"Discord","icon":"discord","href":"https://discord.com/invite/mCnxKxyxPC"},{"anchor":"MCP Server","icon":"plug","href":"https://thedrive.ai/mcp"},{"anchor":"Android App","icon":"android","href":"https://play.google.com/store/apps/details?id=com.bigyankarki.thedriveai\u0026referrer=utm_source%3Ddocs%26utm_medium%3Ddocs%26utm_campaign%3Dandroid_launch"},{"anchor":"iOS App","icon":"apple","href":"https://apps.apple.com/us/app/the-drive-ai-file-organizer/id6758524851"}]},"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"thedriveai","hasAudioNarration":false,"actualSubdomain":"thedriveai","customDomains":["docs.thedrive.ai"],"gitSource":{"type":"github","owner":"thedriveai","repo":"docs","deployBranch":"main","contentDirectory":"","isPrivate":false,"mountPath":"","label":""},"chroma":{"liveDeploymentHistoryId":"6ae17da4c013701e12c2a931","collectionId":"e0a124ba-d0a0-4f0d-b7c5-a9dbb922b3d2","schemaVersion":"v3","latestBuiltDeploymentHistoryId":"6ae17da4c013701e12c2a931"},"entitlements":{},"buildId":"6ae17da4c013701e12c2a931","clientVersion":"0.0.4045","searchFilterCounts":[{"language":"default","tag":"Documentation","count":46},{"language":"default","tag":"Developer API","count":18},{"language":"default","tag":"The Agent","count":12},{"language":"default","tag":"Getting Started","count":8},{"language":"default","tag":"Integrations","count":7},{"language":"default","tag":"Account","count":6},{"language":"default","tag":"Workflows","count":6},{"language":"default","tag":"Files","count":5},{"language":"default","tag":"Guides","count":4},{"language":"default","tag":"Collaboration","count":3}]},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":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":"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":"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":"byok-sep-25","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":"billing-updated-9-15","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":[],"page":{"pagePath":"api-reference/analysis/cross-document-analysis","slug":"/api-reference/analysis/cross-document-analysis","pageMetadata":{"title":"Cross-Document Analysis","description":"Analyze and cross-reference multiple documents together. Unlike `/analyze` (single\ndocument) or `/analyze/batch` (many documents independently), this endpoint lets\nthe agent reason **across** all documents simultaneously.\n\n**Use cases**:\n- Validate an invoice against a contract or purchase order\n- Check that a report's numbers match a source spreadsheet\n- Compare terms across multiple agreements\n- Reconcile data from different sources\n\nUpload 2-5 files and/or provide URLs. Each document gets a label (auto-generated\nfrom filename, or you can provide custom labels). The agent can search, read, and\ncompare data across all documents.\n\nProvide a typed schema — each field has a type and description.\n\n**Example**:\n```json\n{\n \"rates_match\": {\"type\": \"boolean\", \"description\": \"Do the hourly rates on the invoice match the contract?\"},\n \"total_valid\": {\"type\": \"boolean\", \"description\": \"Does the invoice total equal the sum of line items?\"},\n \"correct_vendor\": {\"type\": \"boolean\", \"description\": \"Is the vendor name on the invoice the same as the contracting party?\"}\n}\n```\n\n**Pricing**: 5 credits/document + 3 credits/page (minimum 10).","deprecated":null,"version":null,"openapi":"/openapi.json post /api/v1/analyze/cross","href":"/api-reference/analysis/cross-document-analysis","autogeneratedByOpenApi":true},"description":{"compiledSource":"\"use strict\";\nconst {Fragment: _Fragment, jsx: _jsx, jsxs: _jsxs} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n code: \"code\",\n li: \"li\",\n p: \"p\",\n pre: \"pre\",\n span: \"span\",\n strong: \"strong\",\n ul: \"ul\",\n ..._provideComponents(),\n ...props.components\n }, {CodeBlock} = _components;\n if (!CodeBlock) _missingMdxReference(\"CodeBlock\", true);\n return _jsxs(_Fragment, {\n children: [_jsxs(_components.p, {\n children: [\"Analyze and cross-reference multiple documents together. Unlike \", _jsx(_components.code, {\n children: \"/analyze\"\n }), \" (single\\ndocument) or \", _jsx(_components.code, {\n children: \"/analyze/batch\"\n }), \" (many documents independently), this endpoint lets\\nthe agent reason \", _jsx(_components.strong, {\n children: \"across\"\n }), \" all documents simultaneously.\"]\n }), \"\\n\", _jsxs(_components.p, {\n children: [_jsx(_components.strong, {\n children: \"Use cases\"\n }), \":\"]\n }), \"\\n\", _jsxs(_components.ul, {\n children: [\"\\n\", _jsx(_components.li, {\n children: \"Validate an invoice against a contract or purchase order\"\n }), \"\\n\", _jsx(_components.li, {\n children: \"Check that a report’s numbers match a source spreadsheet\"\n }), \"\\n\", _jsx(_components.li, {\n children: \"Compare terms across multiple agreements\"\n }), \"\\n\", _jsx(_components.li, {\n children: \"Reconcile data from different sources\"\n }), \"\\n\"]\n }), \"\\n\", _jsx(_components.p, {\n children: \"Upload 2-5 files and/or provide URLs. Each document gets a label (auto-generated\\nfrom filename, or you can provide custom labels). The agent can search, read, and\\ncompare data across all documents.\"\n }), \"\\n\", _jsx(_components.p, {\n children: \"Provide a typed schema — each field has a type and description.\"\n }), \"\\n\", _jsxs(_components.p, {\n children: [_jsx(_components.strong, {\n children: \"Example\"\n }), \":\"]\n }), \"\\n\", _jsx(CodeBlock, {\n numberOfLines: \"5\",\n language: \"json\",\n children: _jsx(_components.pre, {\n className: \"shiki shiki-themes github-light-default dark-plus\",\n style: {\n backgroundColor: \"#ffffff\",\n \"--shiki-dark-bg\": \"#0B0C0E\",\n color: \"#1f2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n language: \"json\",\n children: _jsxs(_components.code, {\n language: \"json\",\n numberOfLines: \"5\",\n children: [_jsx(_components.span, {\n className: \"line\",\n children: _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \"{\"\n })\n }), \"\\n\", _jsxs(_components.span, {\n className: \"line\",\n children: [_jsx(_components.span, {\n style: {\n color: \"#116329\",\n \"--shiki-dark\": \"#9CDCFE\"\n },\n children: \" \\\"rates_match\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \": {\"\n }), _jsx(_components.span, {\n style: {\n color: \"#116329\",\n \"--shiki-dark\": \"#9CDCFE\"\n },\n children: \"\\\"type\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \": \"\n }), _jsx(_components.span, {\n style: {\n color: \"#0A3069\",\n \"--shiki-dark\": \"#CE9178\"\n },\n children: \"\\\"boolean\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \", \"\n }), _jsx(_components.span, {\n style: {\n color: \"#116329\",\n \"--shiki-dark\": \"#9CDCFE\"\n },\n children: \"\\\"description\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \": \"\n }), _jsx(_components.span, {\n style: {\n color: \"#0A3069\",\n \"--shiki-dark\": \"#CE9178\"\n },\n children: \"\\\"Do the hourly rates on the invoice match the contract?\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \"},\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"line\",\n children: [_jsx(_components.span, {\n style: {\n color: \"#116329\",\n \"--shiki-dark\": \"#9CDCFE\"\n },\n children: \" \\\"total_valid\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \": {\"\n }), _jsx(_components.span, {\n style: {\n color: \"#116329\",\n \"--shiki-dark\": \"#9CDCFE\"\n },\n children: \"\\\"type\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \": \"\n }), _jsx(_components.span, {\n style: {\n color: \"#0A3069\",\n \"--shiki-dark\": \"#CE9178\"\n },\n children: \"\\\"boolean\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \", \"\n }), _jsx(_components.span, {\n style: {\n color: \"#116329\",\n \"--shiki-dark\": \"#9CDCFE\"\n },\n children: \"\\\"description\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \": \"\n }), _jsx(_components.span, {\n style: {\n color: \"#0A3069\",\n \"--shiki-dark\": \"#CE9178\"\n },\n children: \"\\\"Does the invoice total equal the sum of line items?\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \"},\"\n })]\n }), \"\\n\", _jsxs(_components.span, {\n className: \"line\",\n children: [_jsx(_components.span, {\n style: {\n color: \"#116329\",\n \"--shiki-dark\": \"#9CDCFE\"\n },\n children: \" \\\"correct_vendor\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \": {\"\n }), _jsx(_components.span, {\n style: {\n color: \"#116329\",\n \"--shiki-dark\": \"#9CDCFE\"\n },\n children: \"\\\"type\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \": \"\n }), _jsx(_components.span, {\n style: {\n color: \"#0A3069\",\n \"--shiki-dark\": \"#CE9178\"\n },\n children: \"\\\"boolean\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \", \"\n }), _jsx(_components.span, {\n style: {\n color: \"#116329\",\n \"--shiki-dark\": \"#9CDCFE\"\n },\n children: \"\\\"description\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \": \"\n }), _jsx(_components.span, {\n style: {\n color: \"#0A3069\",\n \"--shiki-dark\": \"#CE9178\"\n },\n children: \"\\\"Is the vendor name on the invoice the same as the contracting party?\\\"\"\n }), _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \"}\"\n })]\n }), \"\\n\", _jsx(_components.span, {\n className: \"line\",\n children: _jsx(_components.span, {\n style: {\n color: \"#1F2328\",\n \"--shiki-dark\": \"#D4D4D4\"\n },\n children: \"}\"\n })\n }), \"\\n\"]\n })\n })\n }), \"\\n\", _jsxs(_components.p, {\n children: [_jsx(_components.strong, {\n children: \"Pricing\"\n }), \": 5 credits/document + 3 credits/page (minimum 10).\"]\n })]\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};\nfunction _missingMdxReference(id, component) {\n throw new Error(\"Expected \" + (component ? \"component\" : \"object\") + \" `\" + id + \"` to be defined: you likely forgot to import, pass, or provide it.\");\n}\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){return _jsx(_Fragment,{})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Cross-Document Analysis","description":"Analyze and cross-reference multiple documents together. Unlike `/analyze` (single\ndocument) or `/analyze/batch` (many documents independently), this endpoint lets\nthe agent reason **across** all documents simultaneously.\n\n**Use cases**:\n- Validate an invoice against a contract or purchase order\n- Check that a report's numbers match a source spreadsheet\n- Compare terms across multiple agreements\n- Reconcile data from different sources\n\nUpload 2-5 files and/or provide URLs. Each document gets a label (auto-generated\nfrom filename, or you can provide custom labels). The agent can search, read, and\ncompare data across all documents.\n\nProvide a typed schema — each field has a type and description.\n\n**Example**:\n```json\n{\n \"rates_match\": {\"type\": \"boolean\", \"description\": \"Do the hourly rates on the invoice match the contract?\"},\n \"total_valid\": {\"type\": \"boolean\", \"description\": \"Does the invoice total equal the sum of line items?\"},\n \"correct_vendor\": {\"type\": \"boolean\", \"description\": \"Is the vendor name on the invoice the same as the contracting party?\"}\n}\n```\n\n**Pricing**: 5 credits/document + 3 credits/page (minimum 10).","deprecated":null,"version":null,"openapi":"/openapi.json post /api/v1/analyze/cross","href":"/api-reference/analysis/cross-document-analysis","autogeneratedByOpenApi":true}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[],"codeExamples":{}},"jsLinks":[],"openApiReferenceData":{"operation":{"tags":["analysis"],"summary":"Cross-Document Analysis","description":"Analyze and cross-reference multiple documents together. Unlike `/analyze` (single\ndocument) or `/analyze/batch` (many documents independently), this endpoint lets\nthe agent reason **across** all documents simultaneously.\n\n**Use cases**:\n- Validate an invoice against a contract or purchase order\n- Check that a report's numbers match a source spreadsheet\n- Compare terms across multiple agreements\n- Reconcile data from different sources\n\nUpload 2-5 files and/or provide URLs. Each document gets a label (auto-generated\nfrom filename, or you can provide custom labels). The agent can search, read, and\ncompare data across all documents.\n\nProvide a typed schema — each field has a type and description.\n\n**Example**:\n```json\n{\n \"rates_match\": {\"type\": \"boolean\", \"description\": \"Do the hourly rates on the invoice match the contract?\"},\n \"total_valid\": {\"type\": \"boolean\", \"description\": \"Does the invoice total equal the sum of line items?\"},\n \"correct_vendor\": {\"type\": \"boolean\", \"description\": \"Is the vendor name on the invoice the same as the contracting party?\"}\n}\n```\n\n**Pricing**: 5 credits/document + 3 credits/page (minimum 10).","operationId":"cross_analyze_api_v1_analyze_cross_post","parameters":["e42152a8-4430-4457-bfc4-bed266332164"],"requestBody":"4f4e0844-3d89-47d9-ba63-68b92eca23d4","responses":{"200":"07c38bf2-7e13-474f-be97-8f84d9426143","400":"3257c680-f40a-4ed9-a227-133abe5414f7","413":"bfeb3332-9114-4bd3-b753-3d9f9e4cb9b1","422":"7e032065-1463-4243-9b3a-314600108c5a","500":"e8ded348-85e4-4396-9be1-3c7aa487c4b7","503":"bbc5b9c1-634c-4161-8822-76a4e3fb7da7","504":"3588808c-2dc1-4ee9-a4ff-7e03bd054da1"},"method":"post","type":"path","servers":[],"security":[],"path":"/api/v1/analyze/cross","baseUrlOptions":[],"title":"Cross-Document Analysis","codeSamples":[],"requiredOnlyExamples":false,"requestExampleType":"generated","responseExampleType":"generated"},"dependencies":{"parameters":{"e42152a8-4430-4457-bfc4-bed266332164":{"name":"X-API-Key","in":"header","required":false,"schema":{"type":"string","title":"X-Api-Key","isRequired":false,"uniqueKey":"","typeLabel":"string"}}},"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"properties":{"schema":{"type":"string","title":"Schema","description":"JSON schema — keys are field names, values describe what to validate or compute across documents","isRequired":true,"uniqueKey":"schema","typeLabel":"string"},"files":{"items":{"type":"string","contentMediaType":"application/octet-stream","uniqueKey":"files.items.[INDEX]","typeLabel":"file"},"type":"array","title":"Files","description":"Files to analyze (2-5). Labeled by filename or via document_labels.","default":[],"uniqueKey":"files","typeLabel":"file[]"},"urls":{"oneOf":[{"type":"string","title":"Urls","description":"JSON array of URLs, or JSON object mapping labels to URLs (e.g. {\"invoice\": \"https://...\"}). Combined with files, total must be 2-5.","uniqueKey":"urls.oneOf.0","typeLabel":"string"},{"type":"null","title":"Urls","description":"JSON array of URLs, or JSON object mapping labels to URLs (e.g. {\"invoice\": \"https://...\"}). Combined with files, total must be 2-5.","uniqueKey":"urls.oneOf.1","typeLabel":"null"}],"uniqueKey":"urls","typeLabel":"string | null"},"url_headers":{"oneOf":[{"type":"string","title":"Url Headers","description":"JSON-encoded headers for URL auth","uniqueKey":"url_headers.oneOf.0","typeLabel":"string"},{"type":"null","title":"Url Headers","description":"JSON-encoded headers for URL auth","uniqueKey":"url_headers.oneOf.1","typeLabel":"null"}],"uniqueKey":"url_headers","typeLabel":"string | null"},"document_labels":{"oneOf":[{"type":"string","title":"Document Labels","description":"JSON array of labels for the uploaded files, in order. Must match files count. E.g. [\"invoice\", \"contract\"]","uniqueKey":"document_labels.oneOf.0","typeLabel":"string"},{"type":"null","title":"Document Labels","description":"JSON array of labels for the uploaded files, in order. Must match files count. E.g. [\"invoice\", \"contract\"]","uniqueKey":"document_labels.oneOf.1","typeLabel":"null"}],"uniqueKey":"document_labels","typeLabel":"string | null"},"include_steps":{"type":"boolean","title":"Include Steps","description":"Include the agent's reasoning trace in each answer","default":false,"uniqueKey":"include_steps","typeLabel":"boolean"},"sync":{"type":"boolean","title":"Sync","description":"Set to false to process asynchronously. Returns a task_id to poll.","default":true,"uniqueKey":"sync","typeLabel":"boolean"},"webhook_url":{"oneOf":[{"type":"string","title":"Webhook Url","description":"URL to POST the result to when async processing completes. Signed with HMAC-SHA256 (see GET /api/v1/jobs/{task_id}/deliveries for verification docs).","uniqueKey":"webhook_url.oneOf.0","typeLabel":"string"},{"type":"null","title":"Webhook Url","description":"URL to POST the result to when async processing completes. Signed with HMAC-SHA256 (see GET /api/v1/jobs/{task_id}/deliveries for verification docs).","uniqueKey":"webhook_url.oneOf.1","typeLabel":"null"}],"uniqueKey":"webhook_url","typeLabel":"string | null"}},"type":"object","required":["schema"],"title":"Body_cross_analyze_api_v1_analyze_cross_post","uniqueKey":"","typeLabel":"Body_cross_analyze_api_v1_analyze_cross_post · object"},"examples":{"Example":{"title":"Example","value":{"schema":"\u003cstring>","files":[],"urls":"\u003cstring>","url_headers":"\u003cstring>","document_labels":"\u003cstring>","include_steps":false,"sync":true,"webhook_url":"\u003cstring>"}}},"exampleType":"generated"}},"exampleType":"generated"},"responses":{"07c38bf2-7e13-474f-be97-8f84d9426143":{"description":"Successful Response","content":{"application/json":{"schema":{"properties":{"data":{"additionalProperties":true,"type":"object","title":"Data","description":"Computed/derived values keyed by field name","isRequired":true,"uniqueKey":"data","typeLabel":"Data · object"},"documents":{"items":{"properties":{"label":{"type":"string","title":"Label","description":"Document label used in the analysis","isRequired":true,"uniqueKey":"documents.items.[INDEX].label","typeLabel":"string"},"filename":{"type":"string","title":"Filename","description":"Original filename or URL","isRequired":true,"uniqueKey":"documents.items.[INDEX].filename","typeLabel":"string"},"content_type":{"oneOf":[{"type":"string","title":"Content Type","description":"Detected MIME type","uniqueKey":"documents.items.[INDEX].content_type.oneOf.0","typeLabel":"string"},{"type":"null","title":"Content Type","description":"Detected MIME type","uniqueKey":"documents.items.[INDEX].content_type.oneOf.1","typeLabel":"null"}],"uniqueKey":"documents.items.[INDEX].content_type","typeLabel":"string | null"},"total_pages":{"type":"integer","title":"Total Pages","description":"Number of pages in this document","default":0,"uniqueKey":"documents.items.[INDEX].total_pages","typeLabel":"integer"},"text_length":{"type":"integer","title":"Text Length","description":"Length of extracted text","default":0,"uniqueKey":"documents.items.[INDEX].text_length","typeLabel":"integer"}},"type":"object","required":["label","filename"],"title":"DocumentInfo","description":"Metadata about one document in a cross-document analysis.","uniqueKey":"documents.items.[INDEX]","typeLabel":"DocumentInfo · object"},"type":"array","title":"Documents","description":"Metadata for each document in the analysis","isRequired":true,"uniqueKey":"documents","typeLabel":"DocumentInfo · object[]"},"model_used":{"type":"string","title":"Model Used","description":"Model used for analysis","isRequired":true,"uniqueKey":"model_used","typeLabel":"string"},"total_text_length":{"type":"integer","title":"Total Text Length","description":"Combined text length across all documents","isRequired":true,"uniqueKey":"total_text_length","typeLabel":"integer"},"total_pages":{"type":"integer","title":"Total Pages","description":"Combined page count across all documents","isRequired":true,"uniqueKey":"total_pages","typeLabel":"integer"},"success":{"type":"boolean","title":"Success","default":true,"uniqueKey":"success","typeLabel":"boolean"},"confidence":{"additionalProperties":{"type":"number","uniqueKey":"confidence.additionalProperties","typeLabel":"number"},"type":"object","title":"Confidence","description":"Per-field confidence scores (0.0–1.0)","uniqueKey":"confidence","typeLabel":"Confidence · object"},"sources":{"additionalProperties":{"items":{"type":"string","uniqueKey":"sources.additionalProperties.items.[INDEX]","typeLabel":"string"},"type":"array","uniqueKey":"sources.additionalProperties","typeLabel":"string[]"},"type":"object","title":"Sources","description":"Per-field source text snippets (prefixed with [doc_label])","uniqueKey":"sources","typeLabel":"Sources · object"},"reasoning":{"additionalProperties":{"type":"string","uniqueKey":"reasoning.additionalProperties","typeLabel":"string"},"type":"object","title":"Reasoning","description":"Per-field step-by-step explanation referencing specific documents","uniqueKey":"reasoning","typeLabel":"Reasoning · object"},"steps":{"additionalProperties":{"items":{"properties":{"tool":{"type":"string","title":"Tool","description":"Tool that was called","isRequired":true,"uniqueKey":"steps.additionalProperties.items.[INDEX].tool","typeLabel":"string"},"args":{"additionalProperties":true,"type":"object","title":"Args","description":"Arguments passed to the tool","uniqueKey":"steps.additionalProperties.items.[INDEX].args","typeLabel":"Args · object"},"result_preview":{"type":"string","title":"Result Preview","description":"First 200 chars of the tool output","default":"","uniqueKey":"steps.additionalProperties.items.[INDEX].result_preview","typeLabel":"string"}},"type":"object","required":["tool"],"title":"AgentStepResponse","description":"One step in the agent's reasoning trace.","uniqueKey":"steps.additionalProperties.items.[INDEX]","typeLabel":"AgentStepResponse · object"},"type":"array","uniqueKey":"steps.additionalProperties","typeLabel":"AgentStepResponse · object[]"},"type":"object","title":"Steps","description":"Per-field agent reasoning trace. Empty unless include_steps=true.","uniqueKey":"steps","typeLabel":"Steps · object"},"credits_used":{"type":"integer","title":"Credits Used","description":"Credits consumed","default":0,"uniqueKey":"credits_used","typeLabel":"integer"},"schema_format":{"oneOf":[{"type":"string","title":"SchemaFormat","description":"Schema format: always 'typed'","enum":["typed"],"uniqueKey":"schema_format.oneOf.0","typeLabel":"enum\u003cstring>"},{"type":"null","description":"Schema format: always 'typed'","uniqueKey":"schema_format.oneOf.1","typeLabel":"null"}],"uniqueKey":"schema_format","typeLabel":"enum\u003cstring> | null"}},"type":"object","required":["data","documents","model_used","total_text_length","total_pages"],"title":"CrossAnalyzeResponse","description":"Response for cross-document analysis — flat parallel dicts matching /extract.","example":{"confidence":{"rates_match":0.95},"credits_used":35,"data":{"rates_match":false},"documents":[{"content_type":"application/pdf","filename":"invoice_042.pdf","label":"invoice","text_length":1200,"total_pages":2},{"content_type":"application/pdf","filename":"service_agreement.pdf","label":"contract","text_length":15000,"total_pages":8}],"model_used":"gpt-5.1","reasoning":{"rates_match":"Invoice hourly rate ($150) differs from contract rate ($125)"},"sources":{"rates_match":["[invoice] \"Rate: $150.00/hr\"","[contract] \"Hourly rate: $125.00\""]},"success":true,"total_pages":10,"total_text_length":16200},"uniqueKey":"","typeLabel":"CrossAnalyzeResponse · object"},"examples":{"Example":{"title":"Example","value":{"confidence":{"rates_match":0.95},"credits_used":35,"data":{"rates_match":false},"documents":[{"content_type":"application/pdf","filename":"invoice_042.pdf","label":"invoice","text_length":1200,"total_pages":2},{"content_type":"application/pdf","filename":"service_agreement.pdf","label":"contract","text_length":15000,"total_pages":8}],"model_used":"gpt-5.1","reasoning":{"rates_match":"Invoice hourly rate ($150) differs from contract rate ($125)"},"sources":{"rates_match":["[invoice] \"Rate: $150.00/hr\"","[contract] \"Hourly rate: $125.00\""]},"success":true,"total_pages":10,"total_text_length":16200}}},"exampleType":"generated"}},"exampleType":"generated"},"3257c680-f40a-4ed9-a227-133abe5414f7":{"description":"Invalid request","content":{"application/json":{"schema":{"properties":{"error":{"type":"string","title":"Error","description":"Error type","isRequired":true,"uniqueKey":"error","typeLabel":"string"},"detail":{"type":"string","title":"Detail","description":"Human-readable error message","isRequired":true,"uniqueKey":"detail","typeLabel":"string"},"success":{"type":"boolean","title":"Success","default":false,"uniqueKey":"success","typeLabel":"boolean"}},"type":"object","required":["error","detail"],"title":"ErrorResponse","description":"Standard error response.","example":{"detail":"File size exceeds maximum allowed (50MB)","error":"validation_error","success":false},"uniqueKey":"","typeLabel":"ErrorResponse · object"},"examples":{"Example":{"title":"Example","value":{"detail":"File size exceeds maximum allowed (50MB)","error":"validation_error","success":false}}},"exampleType":"generated"}},"exampleType":"generated"},"bfeb3332-9114-4bd3-b753-3d9f9e4cb9b1":{"description":"File too large","content":{"application/json":{"schema":{"properties":{"error":{"type":"string","title":"Error","description":"Error type","isRequired":true,"uniqueKey":"error","typeLabel":"string"},"detail":{"type":"string","title":"Detail","description":"Human-readable error message","isRequired":true,"uniqueKey":"detail","typeLabel":"string"},"success":{"type":"boolean","title":"Success","default":false,"uniqueKey":"success","typeLabel":"boolean"}},"type":"object","required":["error","detail"],"title":"ErrorResponse","description":"Standard error response.","example":{"detail":"File size exceeds maximum allowed (50MB)","error":"validation_error","success":false},"uniqueKey":"","typeLabel":"ErrorResponse · object"},"examples":{"Example":{"title":"Example","value":{"detail":"File size exceeds maximum allowed (50MB)","error":"validation_error","success":false}}},"exampleType":"generated"}},"exampleType":"generated"},"7e032065-1463-4243-9b3a-314600108c5a":{"description":"Validation Error","content":{"application/json":{"schema":{"properties":{"detail":{"items":{"properties":{"loc":{"items":{"oneOf":[{"type":"string","uniqueKey":"detail.items.[INDEX].loc.items.[INDEX].oneOf.0","typeLabel":"string"},{"type":"integer","uniqueKey":"detail.items.[INDEX].loc.items.[INDEX].oneOf.1","typeLabel":"integer"}],"uniqueKey":"detail.items.[INDEX].loc.items.[INDEX]","typeLabel":"string | integer"},"type":"array","title":"Location","isRequired":true,"uniqueKey":"detail.items.[INDEX].loc","typeLabel":"(string | integer)[]"},"msg":{"type":"string","title":"Message","isRequired":true,"uniqueKey":"detail.items.[INDEX].msg","typeLabel":"string"},"type":{"type":"string","title":"Error Type","isRequired":true,"uniqueKey":"detail.items.[INDEX].type","typeLabel":"string"},"input":{"oneOf":[{"title":"Input"}],"uniqueKey":"detail.items.[INDEX].input","typeLabel":"any"},"ctx":{"type":"object","title":"Context","uniqueKey":"detail.items.[INDEX].ctx","typeLabel":"Context · object"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError","uniqueKey":"detail.items.[INDEX]","typeLabel":"ValidationError · object"},"type":"array","title":"Detail","uniqueKey":"detail","typeLabel":"ValidationError · object[]"}},"type":"object","title":"HTTPValidationError","uniqueKey":"","typeLabel":"HTTPValidationError · object"},"examples":{"Example":{"title":"Example","value":{"detail":[{"loc":["\u003cstring>"],"msg":"\u003cstring>","type":"\u003cstring>","input":"\u003cunknown>","ctx":{}}]}}},"exampleType":"generated"}},"exampleType":"generated"},"e8ded348-85e4-4396-9be1-3c7aa487c4b7":{"description":"Analysis or extraction failed","content":{"application/json":{"schema":{"properties":{"error":{"type":"string","title":"Error","description":"Error type","isRequired":true,"uniqueKey":"error","typeLabel":"string"},"detail":{"type":"string","title":"Detail","description":"Human-readable error message","isRequired":true,"uniqueKey":"detail","typeLabel":"string"},"success":{"type":"boolean","title":"Success","default":false,"uniqueKey":"success","typeLabel":"boolean"}},"type":"object","required":["error","detail"],"title":"ErrorResponse","description":"Standard error response.","example":{"detail":"File size exceeds maximum allowed (50MB)","error":"validation_error","success":false},"uniqueKey":"","typeLabel":"ErrorResponse · object"},"examples":{"Example":{"title":"Example","value":{"detail":"File size exceeds maximum allowed (50MB)","error":"validation_error","success":false}}},"exampleType":"generated"}},"exampleType":"generated"},"bbc5b9c1-634c-4161-8822-76a4e3fb7da7":{"description":"AI service unavailable","content":{"application/json":{"schema":{"properties":{"error":{"type":"string","title":"Error","description":"Error type","isRequired":true,"uniqueKey":"error","typeLabel":"string"},"detail":{"type":"string","title":"Detail","description":"Human-readable error message","isRequired":true,"uniqueKey":"detail","typeLabel":"string"},"success":{"type":"boolean","title":"Success","default":false,"uniqueKey":"success","typeLabel":"boolean"}},"type":"object","required":["error","detail"],"title":"ErrorResponse","description":"Standard error response.","example":{"detail":"File size exceeds maximum allowed (50MB)","error":"validation_error","success":false},"uniqueKey":"","typeLabel":"ErrorResponse · object"},"examples":{"Example":{"title":"Example","value":{"detail":"File size exceeds maximum allowed (50MB)","error":"validation_error","success":false}}},"exampleType":"generated"}},"exampleType":"generated"},"3588808c-2dc1-4ee9-a4ff-7e03bd054da1":{"description":"Analysis timed out","content":{"application/json":{"schema":{"properties":{"error":{"type":"string","title":"Error","description":"Error type","isRequired":true,"uniqueKey":"error","typeLabel":"string"},"detail":{"type":"string","title":"Detail","description":"Human-readable error message","isRequired":true,"uniqueKey":"detail","typeLabel":"string"},"success":{"type":"boolean","title":"Success","default":false,"uniqueKey":"success","typeLabel":"boolean"}},"type":"object","required":["error","detail"],"title":"ErrorResponse","description":"Standard error response.","example":{"detail":"File size exceeds maximum allowed (50MB)","error":"validation_error","success":false},"uniqueKey":"","typeLabel":"ErrorResponse · object"},"examples":{"Example":{"title":"Example","value":{"detail":"File size exceeds maximum allowed (50MB)","error":"validation_error","success":false}}},"exampleType":"generated"}},"exampleType":"generated"}},"security":{},"servers":{}},"originalFileLocation":"openapi.json"},"subdomain":"thedriveai","siteName":"The Drive AI","title":"Cross-Document Analysis - The Drive AI","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-10-06T05:02:03.719Z","originalFileLocation":"api-reference/analysis/cross-document-analysis.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=\"Analyze and cross-reference multiple documents together. Unlike /analyze (single document) or /analyze/batch (many documents independently), this endpoint lets the agent reason across all documents simultaneously. Use cases: - Validate an invoice against a contract or purchase order - Check that a report\u0026#x27;s numbers match a source spreadsheet - Compare terms across multiple agreements - Reconcile data from different sources Upload 2-5 files and/or provide URLs. Each document gets a label (auto-generated from filename, or you can provide custom labels). The agent can search, read, and compare data across all documents. Provide a typed schema — each field has a type and description. Example: json { \u0026quot;rates_match\u0026quot;: {\u0026quot;type\u0026quot;: \u0026quot;boolean\u0026quot;, \u0026quot;description\u0026quot;: \u0026quot;Do the hourly rates on the invoice match the contract?\u0026quot;}, \u0026quot;total_valid\u0026quot;: {\u0026quot;type\u0026quot;: \u0026quot;boolean\u0026quot;, \u0026quot;description\u0026quot;: \u0026quot;Does the invoice total equal the sum of line items?\u0026quot;}, \u0026quot;correct_vendor\u0026quot;: {\u0026quot;type\u0026quot;: \u0026quot;boolean\u0026quot;, \u0026quot;description\u0026quot;: \u0026quot;Is the vendor name on the invoice the same as the contracting party?\u0026quot;} } Pricing: 5 credits/document + 3 credits/page (minimum 10).\">\u003cmeta data-mint-head name=\"application-name\" content=\"The Drive AI\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/thedriveai/OKDmHqZLcGHpxgyK/_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/thedriveai/OKDmHqZLcGHpxgyK/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/thedriveai/OKDmHqZLcGHpxgyK/_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/thedriveai/OKDmHqZLcGHpxgyK/_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/thedriveai/OKDmHqZLcGHpxgyK/_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/thedriveai/OKDmHqZLcGHpxgyK/_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/thedriveai/OKDmHqZLcGHpxgyK/_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/thedriveai/OKDmHqZLcGHpxgyK/_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/thedriveai/OKDmHqZLcGHpxgyK/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Cross-Document Analysis - The Drive AI\">\u003cmeta data-mint-head property=\"og:description\" content=\"Analyze and cross-reference multiple documents together. Unlike /analyze (single document) or /analyze/batch (many documents independently), this endpoint lets the agent reason across all documents simultaneously. Use cases: - Validate an invoice against a contract or purchase order - Check that a report\u0026#x27;s numbers match a source spreadsheet - Compare terms across multiple agreements - Reconcile data from different sources Upload 2-5 files and/or provide URLs. Each document gets a label (auto-generated from filename, or you can provide custom labels). The agent can search, read, and compare data across all documents. Provide a typed schema — each field has a type and description. Example: json { \u0026quot;rates_match\u0026quot;: {\u0026quot;type\u0026quot;: \u0026quot;boolean\u0026quot;, \u0026quot;description\u0026quot;: \u0026quot;Do the hourly rates on the invoice match the contract?\u0026quot;}, \u0026quot;total_valid\u0026quot;: {\u0026quot;type\u0026quot;: \u0026quot;boolean\u0026quot;, \u0026quot;description\u0026quot;: \u0026quot;Does the invoice total equal the sum of line items?\u0026quot;}, \u0026quot;correct_vendor\u0026quot;: {\u0026quot;type\u0026quot;: \u0026quot;boolean\u0026quot;, \u0026quot;description\u0026quot;: \u0026quot;Is the vendor name on the invoice the same as the contracting party?\u0026quot;} } Pricing: 5 credits/document + 3 credits/page (minimum 10).\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"The Drive AI Docs\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.thedrive.ai/api-reference/analysis/cross-document-analysis\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://thedrive.ai/cover.png\">\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=\"Cross-Document Analysis - The Drive AI\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Analyze and cross-reference multiple documents together. Unlike /analyze (single document) or /analyze/batch (many documents independently), this endpoint lets the agent reason across all documents simultaneously. Use cases: - Validate an invoice against a contract or purchase order - Check that a report\u0026#x27;s numbers match a source spreadsheet - Compare terms across multiple agreements - Reconcile data from different sources Upload 2-5 files and/or provide URLs. Each document gets a label (auto-generated from filename, or you can provide custom labels). The agent can search, read, and compare data across all documents. Provide a typed schema — each field has a type and description. Example: json { \u0026quot;rates_match\u0026quot;: {\u0026quot;type\u0026quot;: \u0026quot;boolean\u0026quot;, \u0026quot;description\u0026quot;: \u0026quot;Do the hourly rates on the invoice match the contract?\u0026quot;}, \u0026quot;total_valid\u0026quot;: {\u0026quot;type\u0026quot;: \u0026quot;boolean\u0026quot;, \u0026quot;description\u0026quot;: \u0026quot;Does the invoice total equal the sum of line items?\u0026quot;}, \u0026quot;correct_vendor\u0026quot;: {\u0026quot;type\u0026quot;: \u0026quot;boolean\u0026quot;, \u0026quot;description\u0026quot;: \u0026quot;Is the vendor name on the invoice the same as the contracting party?\u0026quot;} } Pricing: 5 credits/document + 3 credits/page (minimum 10).\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://thedrive.ai/cover.png\">\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/thedriveai/OKDmHqZLcGHpxgyK/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"The Drive AI\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#6366F1\">\u003cmeta data-mint-head name=\"og:locale\" content=\"en_US\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.thedrive.ai/api-reference/analysis/cross-document-analysis\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/api-reference/analysis/cross-document-analysis.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.thedrive.ai/#organization\",\"name\":\"The Drive AI\",\"url\":\"https://docs.thedrive.ai\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/thedriveai/7p_tCtj9qAPOIRij/logo/light.svg?fit=max\u0026auto=format\u0026n=7p_tCtj9qAPOIRij\u0026q=85\u0026s=729f2cc138ce2a3bfb9f73b9dcfc25b1\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.thedrive.ai#website\",\"name\":\"The Drive AI\",\"url\":\"https://docs.thedrive.ai\",\"publisher\":{\"@id\":\"https://docs.thedrive.ai/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.thedrive.ai/api-reference/analysis/cross-document-analysis#webpage\",\"url\":\"https://docs.thedrive.ai/api-reference/analysis/cross-document-analysis\",\"name\":\"Cross-Document Analysis\",\"description\":\"Analyze and cross-reference multiple documents together. Unlike /analyze (single document) or /analyze/batch (many documents independently), this endpoint lets the agent reason across all documents simultaneously. Use cases: - Validate an invoice against a contract or purchase order - Check that a report's numbers match a source spreadsheet - Compare terms across multiple agreements - Reconcile data from different sources Upload 2-5 files and/or provide URLs. Each document gets a label (auto-generated from filename, or you can provide custom labels). The agent can search, read, and compare data across all documents. Provide a typed schema — each field has a type and description. Example: json { \\\"rates_match\\\": {\\\"type\\\": \\\"boolean\\\", \\\"description\\\": \\\"Do the hourly rates on the invoice match the contract?\\\"}, \\\"total_valid\\\": {\\\"type\\\": \\\"boolean\\\", \\\"description\\\": \\\"Does the invoice total equal the sum of line items?\\\"}, \\\"correct_vendor\\\": {\\\"type\\\": \\\"boolean\\\", \\\"description\\\": \\\"Is the vendor name on the invoice the same as the contracting party?\\\"} } Pricing: 5 credits/document + 3 credits/page (minimum 10).\",\"dateModified\":\"2026-10-06T05:02:03.719Z\",\"isPartOf\":{\"@id\":\"https://docs.thedrive.ai#website\"},\"breadcrumb\":{\"@id\":\"https://docs.thedrive.ai/api-reference/analysis/cross-document-analysis#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.thedrive.ai/api-reference/analysis/cross-document-analysis#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Analysis\",\"item\":\"https://docs.thedrive.ai/api-reference/analysis/analyze-document\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Cross-Document Analysis\",\"item\":\"https://docs.thedrive.ai/api-reference/analysis/cross-document-analysis\"}]},{\"@type\":[\"TechArticle\",\"APIReference\"],\"@id\":\"https://docs.thedrive.ai/api-reference/analysis/cross-document-analysis#apireference\",\"headline\":\"Cross-Document Analysis\",\"name\":\"Cross-Document Analysis\",\"description\":\"Analyze and cross-reference multiple documents together. Unlike /analyze (single document) or /analyze/batch (many documents independently), this endpoint lets the agent reason across all documents simultaneously. Use cases: - Validate an invoice against a contract or purchase order - Check that a report's numbers match a source spreadsheet - Compare terms across multiple agreements - Reconcile data from different sources Upload 2-5 files and/or provide URLs. Each document gets a label (auto-generated from filename, or you can provide custom labels). The agent can search, read, and compare data across all documents. Provide a typed schema — each field has a type and description. Example: json { \\\"rates_match\\\": {\\\"type\\\": \\\"boolean\\\", \\\"description\\\": \\\"Do the hourly rates on the invoice match the contract?\\\"}, \\\"total_valid\\\": {\\\"type\\\": \\\"boolean\\\", \\\"description\\\": \\\"Does the invoice total equal the sum of line items?\\\"}, \\\"correct_vendor\\\": {\\\"type\\\": \\\"boolean\\\", \\\"description\\\": \\\"Is the vendor name on the invoice the same as the contracting party?\\\"} } Pricing: 5 credits/document + 3 credits/page (minimum 10).\",\"url\":\"https://docs.thedrive.ai/api-reference/analysis/cross-document-analysis\",\"mainEntityOfPage\":{\"@id\":\"https://docs.thedrive.ai/api-reference/analysis/cross-document-analysis#webpage\"},\"image\":\"https://thedrive.ai/cover.png\",\"dateModified\":\"2026-10-06T05:02:03.719Z\",\"publisher\":{\"@id\":\"https://docs.thedrive.ai/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.thedrive.ai#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"The Drive AI\",\"creator\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","siteName":"The Drive AI","nav":{"global":{"anchors":[{"anchor":"Website","icon":"globe","href":"https://thedrive.ai"},{"anchor":"Discord","icon":"discord","href":"https://discord.com/invite/mCnxKxyxPC"},{"anchor":"MCP Server","icon":"plug","href":"https://thedrive.ai/mcp"},{"anchor":"Android App","icon":"android","href":"https://play.google.com/store/apps/details?id=com.bigyankarki.thedriveai\u0026referrer=utm_source%3Ddocs%26utm_medium%3Ddocs%26utm_campaign%3Dandroid_launch"},{"anchor":"iOS App","icon":"apple","href":"https://apps.apple.com/us/app/the-drive-ai-file-organizer/id6758524851"}]},"tabs":[{"tab":"Documentation","pages":[{"title":"Documentation","href":"/getting-started/introduction"}]},{"tab":"Developer API","groups":[{"group":"Getting Started","pages":[{"title":"Developer Platform","href":"/developer/introduction"},{"title":"Quickstart","href":"/developer/quickstart"},{"title":"Schemas","href":"/developer/schemas"}]},{"group":"Guides","pages":[{"title":"Analyze","href":"/developer/analyze"},{"title":"Decide","href":"/developer/decide"},{"title":"Cross-Analyze","href":"/developer/cross-analyze"},{"title":"Async \u0026 Webhooks","href":"/developer/webhooks"}]},{"group":"Extraction","pages":[{"title":"Extract Structured Data","deprecated":null,"version":null,"openapi":"/openapi.json post /api/v1/extract","href":"/api-reference/extraction/extract-structured-data"},{"title":"Batch Extract","deprecated":null,"version":null,"openapi":"/openapi.json post /api/v1/extract/batch","href":"/api-reference/batch/batch-extract"}]},{"group":"Analysis","pages":[{"title":"Analyze Document","description":"Analyze a document by asking questions. Unlike `/extract`, this endpoint\ncan **compute, reason, and derive** values that aren't explicitly written\nin the document.\n\nUpload a file (or provide a URL) along with a typed schema. Each field\nmust have a `type` and `description`.\n\n**Example schema**:\n```json\n{\n \"total_cost\": {\"type\": \"number\", \"description\": \"Sum all line item amounts\"},\n \"is_auto_renew\": {\"type\": \"boolean\", \"description\": \"Does this contract auto-renew?\"},\n \"risk_level\": {\"type\": \"string\", \"enum\": [\"low\", \"medium\", \"high\"], \"description\": \"Legal risk level\"}\n}\n```\n\n**Supported types**: `string`, `number`, `integer`, `boolean`, `array`, `object`\n\nEvery answer includes:\n- The computed answer (type-enforced)\n- Reasoning explaining how it was derived\n- Source text snippets from the document\n- Confidence level\n\n**Pricing**: 2 credits/page (min 5) for documents, 10 credits for websites.","deprecated":null,"version":null,"openapi":"/openapi.json post /api/v1/analyze","href":"/api-reference/analysis/analyze-document"},{"title":"Cross-Document Analysis","deprecated":null,"version":null,"openapi":"/openapi.json post /api/v1/analyze/cross","href":"/api-reference/analysis/cross-document-analysis"},{"title":"Batch Analyze","description":"Submit multiple files or URLs for analysis with a single schema.\nEach item is processed concurrently. Returns a batch_id to poll.\n\n**Poll**: `GET /api/v1/jobs/batch/{batch_id}`\n\n**Limits**: Maximum 10 items per batch.","deprecated":null,"version":null,"openapi":"/openapi.json post /api/v1/analyze/batch","href":"/api-reference/batch/batch-analyze"}]},{"group":"Decision","pages":[{"title":"Make a Decision","deprecated":null,"version":null,"openapi":"/openapi.json post /api/v1/decide","href":"/api-reference/decision/make-a-decision"}]},{"group":"Utilities","pages":[{"title":"Convert to Markdown","deprecated":null,"version":null,"openapi":"/openapi.json post /api/v1/markdown/convert","href":"/api-reference/markdown/convert-to-markdown"},{"title":"Generate Thumbnail","deprecated":null,"version":null,"openapi":"/openapi.json post /api/v1/thumbnails/generate","href":"/api-reference/thumbnails/generate-thumbnail"}]},{"group":"Jobs \u0026 Webhooks","pages":[{"title":"Get Task Status","deprecated":null,"version":null,"openapi":"/openapi.json get /api/v1/jobs/{task_id}","href":"/api-reference/jobs/get-task-status"},{"title":"Get Batch Status","deprecated":null,"version":null,"openapi":"/openapi.json get /api/v1/jobs/batch/{batch_id}","href":"/api-reference/jobs/get-batch-status"},{"title":"Get Webhook Deliveries","deprecated":null,"version":null,"openapi":"/openapi.json get /api/v1/jobs/{task_id}/deliveries","href":"/api-reference/jobs/get-webhook-deliveries"}]}]}]},"basePath":"","title":"Cross-Document Analysis - The Drive AI","buildId":"dpl_36EDyZCDfRuoUD9af5CH4M1bqY2h","deploymentId":"dpl_36EDyZCDfRuoUD9af5CH4M1bqY2h","dynamics":["c2aa737661","2b790eda92","b0f84f53ff","a9bb46feb3"],"chunks":["OpenApiReferenceProvider-DCDCdBVX.js","utils-ME8dDnLe.js","cloneDeep-izs3Hzxb.js","_Uint8Array-BVIqJ90l.js","isObjectLike-C8vmzPEN.js","isArray-Dcu1dQ5t.js","utils-0e84ACsd.js","toString-BX-iyh8G.js","isSymbol-CSH9U2Gm.js","addUniqueKeysToSchema-wgRBj-ia.js","snippetPresets-C11Sgb-o.js","style-to-object-BY3JEAdk.js","v4-DIgz8zy6.js","ApiExamples-C0lapOpP.js","isEqual-BfaiBbcl.js","usePlaygroundInputsStore-ZeRQV8fF.js","shallow-BupWh095.js","getApiPlaygroundDisplay-BnYQO2Ss.js","CodeSnippet-RKKOc8c_.js","CodeSnippets-Drf_m8wS.js","Page-Bevw23-4.js","getPastedJson-u6QiPzNZ.js","icon-Bb-CBSxO.js","MethodPill-F7l5AI7V.js","DuplicateIcon-IiAXkdSg.js","createIcon-FliI8EBc.js","DynamicMarkdown-B62XqCSI.js","SectionHeading-Dj31pT03.js","axios-vUo_bRtp.js","Markdown-BOgQCTwD.js","clsx-BIWXJmsZ.js","lib-DuNMoZ05.js","lib-B8HbPgcC.js","html-void-elements-mCSPHezU.js","dist-DKZWslLH.js","katex-YMM-FMeD.js","marked.esm-CZWythHk.js","AssistantPageLink-UDqbR6xh.js"]}