Skip to main content
POST
/
v1
/
ocr
OCR
curl --request POST \
  --url https://api.example.com/v1/ocr

Overview

The OCR endpoint extracts text from documents and images, returning clean markdown. Powered by Mistral’s OCR model. Supported formats: PDF, PNG, JPEG, WebP

Quick Start

curl -X POST https://api.dedaluslabs.ai/v1/ocr \
  -H "Authorization: Bearer $DEDALUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "mistral-ocr-latest",
    "document": {
      "type": "document_url",
      "document_url": "https://arxiv.org/pdf/1706.03762"
    }
  }'
For local files, encode as base64 data URI: data:application/pdf;base64, {base64_data}

Response

{
  "pages": [
    {
      "index": 0,
      "markdown": "# Attention Is All You Need\n\nAshish Vaswani, Noam Shazeer...\n\n# Abstract\n\nThe dominant sequence transduction models..."
    },
    {
      "index": 1,
      "markdown": "## 1 Introduction\n\nRecurrent neural networks..."
    }
  ],
  "model": "mistral-ocr-latest"
}

Use Cases

Invoice Processing

Extract line items, totals, and dates from invoices for automated bookkeeping.

Receipt Scanning

Parse receipts for expense tracking—amounts, vendors, dates extracted as structured text.

Document Digitization

Convert scanned documents to searchable, editable markdown while preserving tables and formatting.

Parameters

ParameterTypeRequiredDescription
modelstringNoOCR model. Default: mistral-ocr-latest
document.typestringYesAlways document_url
document.document_urlstringYesHTTPS URL or data URI

Limits

  • Max file size: 50 MB
  • Max pages: 1,000 per document
  • Timeout: 120 seconds