invoice_number, total_amount, and issue_date.
Prefer to click? The Quickstart builds the same workflow at app.anyformat.ai with no code. Building your first workflow there is faster, and you can call it from the API afterwards with its workflow ID.
Before you start
Get an API key from app.anyformat.ai/api-key. The snippets below read it from the environment. Both SDKs also take the key as a constructor argument. The Python SDK page carries the Python version pin.1. Create a workflow
A workflow is a typed graph of nodes. The smallest extraction shape is aparse node feeding an extract node: two nodes, one edge. Both SDKs expose a fluent builder over that same graph. Nodes covers the other node types, including Classify and Split.
id, alongside the name, description, and timestamps:
2. Run a document
Upload and run uploads the file and starts a run in one call. ReplaceWORKFLOW_ID with the ID from step 1.
202 response carries the run_id. Keep it to poll for results. status: "queued" means the run was accepted, not that extraction has finished.
3. Read the values
Poll the run. It always returns 200.results is null until status is processed, and then the results envelope arrives inline on the same read. Stop polling when status is processed, error, or cancelled.
status: "processed", and each extracted field carries a value and a confidence:
resultsholds one section per node type that ran. This workflow has a parse node and an extract node, soparseandextractionsare filled.extractionsis a list. One entry per extraction the run produced.fieldsis keyed by the field names you defined in step 1.valueis a string on the wire, including forfloatanddatefields.confidenceis a number from 0 to 100.parseis trimmed above. It holds the parsed markdown, the plain text, per-page blocks, and their bounding boxes.
evidence: the snippet and page number the value came from. Runs & results is the full envelope, section by section, and Get run lists every field.
The whole thing as one script
The whole thing as one script
TypeScript
Python
Where to go next
API reference
Every endpoint, every response, every error code
Runs & results
The full results envelope, confidence, and evidence
Recipes
End-to-end examples: invoices, resumes, contracts, receipts, and more
Coding assistant
Let Claude Code build and run anyformat workflows from your editor

