HyperbotsHyperAPI/Docs
POST
/v1/parse

Parse

Extract raw text from documents using OCR. Supports PDFs and images. Returns structured markdown with page-level text.

Cost$0.04/page
Latency~1s
hyperbots_vlm_ocr
Step 1: Upload your document — call POST /v1/documents/upload to get a document_key

Request

Headers

NameTypeRequiredDescription
X-API-Keystring
required
Your HyperAPI key (hk_live_* or hk_test_*).
X-AsyncstringoptionalSet to "true" to process asynchronously and receive a job ID.

Body

NameTypeRequiredDescription
document_keystring
required
S3 document key obtained from the presigned upload endpoint (/v1/documents/upload).

Query Parameters

NameTypeDefaultDescription
ocr_enginestringpaddleOCR engine to use for text extraction.

Code examples

# Get a document_key first: see POST /v1/documents/upload
curl -X POST "https://apis.hyperbots.com/v1/parse?ocr_engine=paddle" \
  -H "X-API-Key: hk_live_your_key_here" \
  -F "document_key=550e8400-e29b-41d4-a716-446655440000"

Response

200 OK
application/json
JSON
{
  "status": "success",
  "request_id": "req_01j9x...",
  "task": "parse",
  "model_used": "hyperbots_vlm_ocr",
  "result": {
    "ocr": "--- Page 1 ---\nInvoice\n\nBill To: Acme Corp\nDate: 2024-01-15\n\n...\n\n--- Page 2 ---\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"
  }
}