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) |
Two API shapes — one concept. On v3, read the run flat:
GET /v3/runs/{run_id}/ always returns 200 OK with the status above and, once processed, the results envelope inline. On v2, results hang off the file collection: GET /v2/workflows/{wid}/files/{collection_id}/results/ returns 412 Precondition Failed while the run is in flight and 200 OK on completion. Both address the same run — only the read path differs.In v3 the pending state lives on the document packet as status: not_started — a run only exists once triggered, so runs start at queued.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 scores — one for how confident anyformat is in the text it read, and one for how confident it is in the page layout it detected — plus a per-block score inside the rendered markdown. (Technically:parse.parse_confidencecomes from the language model’s token log-probabilities, andparse.layout_confidencefrom the YOLO layout-segmentation model; each<section>of the markdown carries adata-confidenceattribute.) - 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 a run
The flat v3 read that returns a run with its results inline
Webhooks
Get notified the moment a run completes — no polling
