Turn documents into structured, spatial data.
Parse PDFs and images into Markdown, HTML, reading-order elements, tables, figure descriptions, and normalized polygon coordinates. Built for production workflows with asynchronous jobs, idempotency, and signed webhooks.
Quickstart
Submit once, then poll the canonical status URL until the request reaches a terminal state.
curl --request POST \
--url https://backend.aksonocr.com/api/v1/document-parse \
--header 'X-API-Key: <YOUR_API_KEY>' \
--header 'Idempotency-Key: invoice-2026-001' \
--form '[email protected]' \
--form 'mode=accurate' \
--form 'include_text_lines=true' \
--form 'parse_charts=true' \
--form 'parse_images=true'Submit a document
POST /api/v1/document-parse · multipart/form-data · returns HTTP 202 Accepted
| Field | Type | Required | Description |
|---|---|---|---|
| document | file | Conditional | PDF, PNG, JPEG, or WebP; maximum 50 MB. |
| document_url | string | Conditional | Public HTTPS URL. Use instead of document. |
| mode | enum | No | fast or accurate (default). |
| page_start / page_end | integer | No | Inclusive 1-indexed PDF page range. |
| include_text_lines | boolean | No | Include fine-grained OCR line elements. Default true. |
| include_page_images | boolean | No | Embed page previews for overlays. Default false. |
| parse_charts | boolean | No | Parse detected chart regions into Markdown tables. Default true. |
| parse_images | boolean | No | Describe image, figure, and header_image regions with a VLM (crop kept). Default true. |
| webhook_url | URL | No | HTTPS endpoint for terminal-state notifications. |
document and document_url are mutually exclusive. Send an Idempotency-Key header when retrying submission requests.Request lifecycle
Every request is a resource. Read the same status_url for progress and the final inline result.
{
"api_version": "2026-08-01",
"request_id": "req_01...",
"status": "pending",
"model": "aksonocr1.5",
"status_url": "https://backend.aksonocr.com/api/v1/document-parse/req_01...",
"progress": 0,
"created_at": "2026-08-01T08:00:00.000Z",
"expires_at": "2026-08-04T08:00:00.000Z"
}Result schema
Completed requests add result to the job object. Content is document-level; elements provide page-level structure and geometry.
{
"api_version": "2026-08-01",
"request_id": "req_01...",
"model": "aksonocr1.5",
"mode": "accurate",
"document": { "filename": "invoice.pdf", "total_pages": 1 },
"usage": { "pages_processed": 1, "credits_used": 0.001 },
"content": { "html": "...", "markdown": "...", "text": "..." },
"pages": [{ "page": 1, "width": 1654, "height": 2339 }],
"elements": [{
"id": "element_0",
"type": "table",
"page": 1,
"parent_id": null,
"reading_order": 3,
"confidence": 0.97,
"polygon": [
{ "x": 0.08, "y": 0.31 }, { "x": 0.92, "y": 0.31 },
{ "x": 0.92, "y": 0.67 }, { "x": 0.08, "y": 0.67 }
],
"bounding_box": { "x": 0.08, "y": 0.31, "width": 0.84, "height": 0.36 },
"content": { "html": "<table>...</table>", "markdown": "| ... |", "text": "..." }
}]
}Coordinates
polygon is the source of truth and may contain more than four points for dewarped pages. bounding_box is derived for simpler clients.
Normalized space
Both axes range from 0 to 1. Multiply x by the rendered page width and y by its height.
Stable orientation
Points describe the detected outline in page coordinates. Do not assume every polygon is axis-aligned.
const points = element.polygon
.map(({ x, y }) => `${x * imageWidth},${y * imageHeight}`)
.join(" ");Webhooks
Terminal events are sent as document_parse.completed or document_parse.failed.
When a webhook secret is configured, requests include X-Akson-Signature: sha256=<digest>. Verify the HMAC-SHA256 digest against the raw request body before processing the event.
Errors
Use HTTP status codes for transport errors and error.code for programmatic handling.
| HTTP | Code | Description |
|---|---|---|
| 400 | invalid_request | Invalid options, document, or URL. |
| 401 | unauthorized | Missing or invalid API key. |
| 404 | not_found | The request does not exist or is not owned by this key. |
| 429 | rate_limited | Retry with exponential backoff. |
| 503 | service_busy | GPU capacity is temporarily unavailable. |