analysis
Cross-Document Analysis
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?"}
}
Pricing: 5 credits/document + 3 credits/page (minimum 10).
post/api/v1/analyze/cross
Request
- Base URL: https://docs.thedrive.ai (the document declares no server; this is the origin it was published from)
- URL: https://docs.thedrive.ai/api/v1/analyze/cross
- Auth: none declared
Headers
X-API-Keystring
Response
Successful Response
Example response
{
"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
}Changes
No recorded changes to this operation across all 1 revision of this API.