Skip to main content
POST
Cross-Document Analysis

Headers

X-API-Key
string

Body

multipart/form-data
schema
string
required

JSON schema — keys are field names, values describe what to validate or compute across documents

files
string[]

Files to analyze (2-5). Labeled by filename or via document_labels.

urls
string | null

JSON array of URLs, or JSON object mapping labels to URLs (e.g. {"invoice": "https://..."}). Combined with files, total must be 2-5.

url_headers
string | null

JSON-encoded headers for URL auth

document_labels
string | null

JSON array of labels for the uploaded files, in order. Must match files count. E.g. ["invoice", "contract"]

include_steps
boolean
default:false

Include the agent's reasoning trace in each answer

sync
boolean
default:true

Set to false to process asynchronously. Returns a task_id to poll.

webhook_url
string | null

URL to POST the result to when async processing completes.

Response

Successful Response

Response for cross-document analysis — flat parallel dicts matching /extract.

data
Data · object
required

Computed/derived values keyed by field name

documents
DocumentInfo · object[]
required

Metadata for each document in the analysis

model_used
string
required

Model used for analysis

total_text_length
integer
required

Combined text length across all documents

total_pages
integer
required

Combined page count across all documents

success
boolean
default:true
confidence
Confidence · object

Per-field confidence scores (0.0–1.0)

sources
Sources · object

Per-field source text snippets (prefixed with [doc_label])

reasoning
Reasoning · object

Per-field step-by-step explanation referencing specific documents

steps
Steps · object

Per-field agent reasoning trace. Empty unless include_steps=true.

credits_used
integer
default:0

Credits consumed

schema_format
enum<string> | null

Schema format: always 'typed'

Available options:
typed