Start a run by submitting a document — through the UI, by callingDocumentation Index
Fetch the complete documentation index at: https://docs.anyformat.ai/llms.txt
Use this file to discover all available pages before exploring further.
POST /v2/workflows/{id}/run/, or by uploading then running separately. anyformat creates a file collection to hold the document, walks the workflow graph, and writes structured results.
Run lifecycle
Every run moves through a sequence of statuses:| Status | Description |
|---|---|
pending | File collection created, processing not yet started |
queued | Waiting for an available processing slot |
in_progress | Processing is actively running |
processed | Processing complete, results available |
error | Processing failed |
cancelled | Processing was cancelled (terminal state; stop polling) |
GET /v2/workflows/{wid}/files/{collection_id}/results/, the endpoint returns 412 Precondition Failed while the run is still in flight, and 200 OK once it reaches processed. For production integrations, prefer webhooks over polling.
What the results contain
A run produces one output section per node type that ran. The results envelope has a fixed shape — sections corresponding to nodes you didn’t include come back empty (null or []), so client code can read every key unconditionally.
| Section | From which node | Shape |
|---|---|---|
parse | the parse node | Object with structured markdown + per-block confidence. null if the workflow has no parse node (rare — parse is required by topology). |
classifications | classify nodes | Array of {category, confidence, evidence}. Empty when no classifier ran. |
splits | the splitter node | Array of {name, files, confidence, partitions} describing the segments. Empty when no splitter ran. |
extractions | extract nodes | Array of {split_name, partition, fields}. Linear workflows produce one untagged entry; branched/split workflows produce one entry per (split, partition). Empty when no extract ran (parse-only workflows). |
extraction | extract nodes (legacy) | Deprecated. Flat {field_name → ExtractedField} dict, populated only for linear workflows. Kept for backward compatibility; new code should read extractions[]. Will be removed in a future major version. |
value, an optional human-supplied value_override, a confidence score (0–100), a verification_status, and an evidence array (source-text snippets + page numbers). See Response formats for the full envelope, including the canonical reading pattern for value vs value_override.
What the SDKs give you back — both the TypeScript and Python SDKs return a
Result from Run.wait(). For linear parse → extract workflows the scalar values are right there: result.fields["name"].value (Python) or result.field("name")?.value (TypeScript). The full envelope — parse markdown, classifications, splits, multi-extraction entries — lives at result.raw in both languages, with Python additionally exposing a typed result.parse view. Expect more typed accessors as the underlying atomic operations stabilise.Confidence and evidence
Two signals that travel with most outputs.Confidence
A 0–100 score indicating how certain anyformat is about a value.- For
parse: two document-level rollups (parse.parse_confidencefrom LLM logprobs,parse.layout_confidencefrom YOLO layout-segmentation) plus a per-blockdata-confidenceattribute inside each<section>of the rendered markdown. - For
extractions: a per-field score on each extracted value. - For
classifications: a per-verdict score.
Evidence
An array of metadata objects showing where a value came from. It’s an array because some values are inferred across multiple spans rather than copied from a single place. Each evidence object has:- The snippet of text the value was derived from
- The page number in the document
What’s next?
Outputs
Export formats for results — CSV, Excel, JSON, Markdown
Response formats
Full schema of every section in the results envelope
Get results
The endpoint that returns the envelope
Webhooks
Get notified the moment a run completes — no polling
