Extract Document Fields
document_extractTurn a document image into structured fields. doc_type picks the schema (receipt/invoice/id/contract/form/generic).
A page with no readable text returns an error rather than a guess.
Returns: dict with keys: doc_type (str), fields (dict — null for any value not present), text (str — the recognised plain text).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| image | Yes | Base64-encoded PNG/JPEG of a single document page | |
| doc_type | No | The document kind — picks the field schema: receipt | invoice | id | contract | form | generic | business_card | w2 | health_card | mortgage | pay_stub | generic |