Skip to main content

Document input

Send documents for the model to read and reason over. PDF and scanned documents are automatically processed with OCR — no extra configuration needed.

Document via URL

Document via base64

Encode the file as a data URI. Include the MIME type so the API can route it to the correct processor.

Scanned documents and OCR

Scanned PDFs and images of documents are processed automatically. The API uses OCR to extract text from:
  • Scanned PDF pages (converted to images at 150 DPI, then OCR’d)
  • Photos of documents (JPEG, PNG, TIFF)
  • Office files (DOCX, XLSX, PPTX — converted to PDF first, then OCR’d)
Multi-page documents are processed in parallel. The extracted text is returned as Markdown and passed to the model for reasoning. No special parameters are needed — just send the file as input_file and the pipeline handles detection, conversion, and OCR.

Supported document formats

Size limit: 30 MB per file.

Combine input types

See Multimodal input for a request containing several input types.