Amux AI

DeepSeek OCR

Last updated November 24, 2026

Recognition modes, supported file formats, timeout rules, and request examples for DeepSeek OCR (deepseek/deepseek-ocr).

DeepSeek OCR (official /v1/tools/ocr endpoint) performs high-accuracy text and layout recognition across multi-page PDFs, Office documents, and images up to 100 MiB and 1,000 pages, outputting either plain text or Markdown with headings, tables, and mathematical formulas intact.

Invoke it through the Document OCR (POST /v1/tools/ocr) endpoint with Authorization: Bearer <key>.

Tool specifications

PropertyDetails
Model IDdeepseek/deepseek-ocr
Aliasesdeepseek-ocr
Recognition modes (purpose)text_recognition (extracts text directly from Word/PowerPoint without images, other formats page-by-page), rich_layout_recognition (recognizes every file page-by-page preserving headings, tables, formulas, and layout structure)
Supported formatsPDF, DOC, DOCX, PPT, PPTX, PNG, JPEG, WebP, GIF, BMP, TIFF
File and page limitsMax 100 MiB file size, up to 1,000 pages
Timeout rulesUpload ≤ 120 s, idle pause ≤ 30 s, total timeout ≤ 180 s
BillingBilled strictly per recognized page (page_count); 0 pages or failed requests are free; usage tokens are informational only; see the model detail page for live pricing
StreamingNot supported
POSThttps://gateway.amux.ai/v1/tools/ocr

Authorization

header
AuthorizationstringRequired

Bearer <your Amux AI key> Amux AI API key created in the console.

Request

multipart/form-data
modelstringRequired

Model identifier; supports canonical ID deepseek/deepseek-ocr or bare alias deepseek-ocr.

purpose"text_recognition" | "rich_layout_recognition"Required

Recognition mode: text_recognition extracts text directly from Word/PowerPoint without images and processes other formats page-by-page; rich_layout_recognition recognizes every file page-by-page while preserving headings, tables, formulas, and layout structure.

filestringRequired

Document or image file to recognize. Supports PDF, DOC, DOCX, PPT, PPTX, PNG, JPEG, WebP, GIF, BMP, and TIFF; max 100 MiB and up to 1,000 pages.

Response

200response

Document OCR succeeded.

400response

Missing required fields, invalid purpose, or file exceeds the 100 MiB limit.

402response

Insufficient workspace balance.

Usage notes

  • Choosing a mode: Use text_recognition for plain scans and continuous text; use rich_layout_recognition for multi-column layouts, financial tables, or documents containing LaTeX math.
  • Transparent keep-alive handling: For large PDFs, the service may emit leading newline keep-alives before the JSON body. The gateway trims leading whitespace and validates the payload so callers always receive clean JSON.
  • Comparison with Jina OCR v1: deepseek/deepseek-ocr uses POST /v1/tools/ocr with multipart file upload and per-page billing, ideal for multi-page PDF/Office files. If you want OpenAI vision-chat OCR via image_url billed per token, see Jina OCR v1.

Error handling

Errors follow the standard OpenAI error schema. Missing file or purpose, invalid purpose, files exceeding 100 MiB, or unsupported file types return 400 invalid_request. See Errors and retries.

cURL
curl https://gateway.amux.ai/v1/tools/ocr \
  -H "Authorization: Bearer $AMUX_API_KEY" \
  -F "model=deepseek/deepseek-ocr" \
  -F "purpose=text_recognition" \
  -F "file=@/path/to/file.png"
{
  "id": "ocr-0196a1b2c3d4",
  "object": "ocr.result",
  "created": 1763900000,
  "model": "deepseek/deepseek-ocr",
  "purpose": "text_recognition",
  "page_count": 2,
  "pages": [
    {
      "index": 0,
      "text": "# Quarterly Financial Summary",
      "finish_reason": "stop"
    }
  ],
  "usage": {
    "input_tokens": 512,
    "output_tokens": 128,
    "total_tokens": 640
  }
}