POST
/v1/parseCost$0.04/page
Latency~1s
HyperLM
Step 1: Upload your document — call
POST /v1/documents/upload to get a document_keyRequest
Headers
| Name | Type | Required | Allowed values | Description |
|---|---|---|---|---|
X-API-Key | string | required | — | Your HyperAPI key (hk_live_* or hk_test_*). |
X-Async | string | optional | truefalse | Set to "true" to process asynchronously and receive a job ID. |
Body
| Name | Type | Required | Description |
|---|---|---|---|
document_key | string | required | S3 document key obtained from the presigned upload endpoint (/v1/documents/upload). |
Query Parameters
| Name | Type | Default | Allowed values | Description |
|---|---|---|---|---|
mode | string | fast | fastadvanced | OCR mode. `fast` returns text plus per-page word boxes. `advanced` runs the layout-aware structured-output path and additionally populates a per-page `structured` object ({html, markdown, regions}). Defaults to `fast`. |
include_boxes | string | false | truefalse | When `true`, attach a `boxes` array to each page ({text, bbox: [left, top, right, bottom], confidence}). Defaults to `false`. |
include_image | string | false | truefalse | When `true`, attach a presigned `image_url` (valid ~15 minutes) and `dimensions` to each page. A page whose image cannot be presigned is returned without `image_url` rather than failing the request. Defaults to `false`. |
Code examples
# Get a document_key first: see POST /v1/documents/upload
curl -X POST "https://apis.hyperbots.com/v1/parse" \
-H "X-API-Key: hk_live_your_key_here" \
-F "document_key=550e8400-e29b-41d4-a716-446655440000"# Get a document_key first: see POST /v1/documents/upload
curl -X POST "https://apis.hyperbots.com/v1/parse" \
-H "X-API-Key: hk_live_your_key_here" \
-F "document_key=550e8400-e29b-41d4-a716-446655440000"Response
200 OK
application/jsonJSON
{
"status": "success",
"request_id": "req_01j9x...",
"task": "parse",
"model_used": "HyperLM",
"result": {
"ocr": "Invoice\n\nBill To: Acme Corp\nDate: 2024-01-15\n\n...\n\n...",
"pages": [
{ "page_number": 1, "text": "Invoice\n\nBill To: Acme Corp\nDate: 2024-01-15\n\n..." },
{ "page_number": 2, "text": "..." }
]
},
"duration_ms": 843,
"metadata": {
"pages": 2,
"file_type": "pdf"
}
}