PaddleOCR Service is a synchronous HTTP API for extracting text and document structure from images. Each request uploads a single image, the server runs inference, and the result is returned in the same response — no polling required.
PaddleOCR Service is a synchronous HTTP API for extracting text and document structure from images. Each request uploads a single image, the server runs inference, and the result is returned in the same response — no polling required.
POST /v1/ocr with Authorization: Bearer YOUR_API_KEY.result field.X-Request-Id to correlate the call with the response header X-Request-Id if you contact support.| Method | Path | Description |
|---|---|---|
POST |
/v1/ocr |
Full OCR pipeline (text detection + recognition) on the uploaded image. |
POST |
/v1/text-detection |
Detect text regions in the uploaded image; returns polygon boxes and scores. |
POST |
/v1/text-recognition |
Recognize text in a single, pre-cropped text-line image. |
POST |
/v1/structure |
Parse the uploaded image as a structured document (layout, tables, formulas), with optional Markdown output. |
See API Reference for full endpoint documentation.
POST /v1/ocr| Parameter | Required | Default | Description |
|---|---|---|---|
image |
Yes | — | Image file to process (supported image type or PDF). |
POST /v1/text-detection| Parameter | Required | Default | Description |
|---|---|---|---|
image |
Yes | — | Image file to process. |
POST /v1/text-recognition| Parameter | Required | Default | Description |
|---|---|---|---|
image |
Yes | — | Pre-cropped single-line text image. |
POST /v1/structure| Parameter | Required | Default | Description |
|---|---|---|---|
image |
Yes | — | Image file to process. |
return_markdown |
No | false |
When true, the response includes a markdown field with a Markdown rendering of the document. |
The recognition model (PP-OCRv6_medium) is a single unified multilingual model whose dictionary natively covers 50 languages — including Japanese, Simplified and Traditional Chinese, English, and 46 Latin-script languages. No language selection parameter is required.
Errors return a JSON body and a non-2xx HTTP status code.
{
"detail": "File too large (24117248 > 20971520 bytes)"
}
| Status | When it occurs |
|---|---|
401 Unauthorized |
Missing Authorization header, or the provided API key is invalid. |
413 Payload Too Large |
Uploaded file exceeds the maximum image size. |
415 Unsupported Media Type |
Upload Content-Type is not an image type or application/pdf. |
422 Unprocessable Entity |
Upload is empty, or the file cannot be decoded as an image. |
500 Internal Server Error |
Inference failed or produced no result. |
504 Gateway Timeout |
Inference exceeded the maximum allowed processing time. |
Full error format and details are documented in API Reference.
| Constraint | Value |
|---|---|
| Maximum upload size | 20 MiB |
| Maximum inference time per request | 120 seconds |
Accepted upload Content-Type |
image/*, application/pdf |
| Color handling | Images are processed as RGB; alpha channels are flattened |
Run models at scale with our fully managed GPU infrastructure, delivering enterprise-grade uptime at the industry's best rates.
