Skip to main content

API reference

OCR

OCR: Recognize document text. Published endpoints, request parameters, JSON responses and authentication.

Release v1.0.0 · This reference describes the release shown here. Console shows the current published configuration.

Technical limits
ⓘThese limits apply unless an endpoint lists different limits.
Timeout
240 s
Request body
102464 KiB
Response body
4 MiB

Recognize document text

POST/ocr/v1/recognize

Extract text and layout from a document or image using DeepSeek. Upload at most 100 MiB. Reserve up to 1000 pages; charge validated page_count only after complete recognition and release unused reservation. Pages marked length contain truncated text and remain billable. Failures are not charged. Token usage is informational.

Parameters

This operation has no published parameters.

Success response200

Fields inside data

NameTypeRequiredDescription
createdintegerNo
idstringNo
objectstringNo
page_countintegerNo
pagesobject[]No
purposestringNo
usageobjectNo
JSON model

Illustrative JSON shape generated from the published schema. Field values are examples, not live results.

JSON model
{
  "code": 0,
  "data": {
    "created": 0,
    "id": "string",
    "object": "string",
    "page_count": 0,
    "pages": [
      {
        "finish_reason": "string",
        "index": 0,
        "text": "string"
      }
    ],
    "purpose": "string",
    "usage": {
      "input_tokens": 0,
      "output_tokens": 0,
      "total_tokens": 0
    }
  },
  "error": "string"
}