Extract structured data synchronously
Admit a single extract job from file bytes, file_id, or a tenant-owned succeeded
parse_job_id, then run schema-constrained OpenRouter extraction via llm_model. A
parse_job_id source reuses the canonical ParsedDocument (from dual artifacts or legacy
result_json) without OCR or another page charge; historical raw-only parses return
422 canonical_result_unavailable. Wait up to the sync wait limit and return
ExtractionTerminalResult when ready. Terminal failed within the wait window returns
422; terminal indeterminate returns 504. Returns 202 with a durable job reference
and Location if the wait expires.
Authorization
bearerAuth Existing Eigenpal API key presented as a bearer token.
In: header
Header Parameters
Client-supplied idempotency key. Required on every parse or extract POST. Must be unique per distinct
request body for a given tenant and operation.
1 <= length <= 256Request Body
multipart/form-data
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/extract" \ -H "Idempotency-Key: 7f9f2f3d-0f8a-4f0a-9a2b-2f6f0a7d2c11" \ -H "Authorization: Bearer $OPENPARSER_API_KEY" \ -F request="{}"{ "output": { "invoice_number": "INV-1001", "total_due": 1234.56 }, "parsed_document": { "output_format": "openparser@1", "document_id": "doc_01h2example", "provenance": { "provider": "paddle", "model": "paddleocr-vl-1.6" }, "text": "Total due: $1,234.56", "markdown": "Total due: $1,234.56", "pages": [ { "number": 1, "width": 1700, "height": 2200, "unit": "pixel", "element_ids": [ "e0" ], "reading_order": [ "e0" ] } ], "elements": [ { "id": "e0", "kind": "text", "role": "paragraph", "text": "Total due: $1,234.56", "spans": [], "languages": [], "locations": [ { "page_number": 1, "bbox": { "left": 72, "top": 180, "right": 420, "bottom": 220 } } ] } ], "text_annotations": [], "relations": [], "assets": [] }, "llm_model": "openai/gpt-6-luna", "attempts": [ { "index": 0, "kind": "primary", "llm_model": "openai/gpt-6-luna", "status": "succeeded", "input_tokens": 1200, "output_tokens": 84, "cost_usd": 0.0042 } ], "usage": { "input_tokens": 1200, "output_tokens": 84, "cost_usd": 0.0042 }}Parse multiple documents in one batch POST
Admit up to 100 parse child jobs in one durable batch. Every uploaded file must be mapped exactly once by `file_index`. Partial child failures are preserved in batch results. Parent status derivation for mixed outcomes is defined on `JobStatus`.
Extract structured data asynchronously POST
Admit a durable single extract job from file bytes, `file_id`, or `parse_job_id` and return immediately. Parse reuse does not run OCR or add a page charge; OpenRouter usage remains billable.