Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.anyformat.ai/llms.txt

Use this file to discover all available pages before exploring further.

Start a run by submitting a document — through the UI, by calling 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:
StatusDescription
pendingFile collection created, processing not yet started
queuedWaiting for an available processing slot
in_progressProcessing is actively running
processedProcessing complete, results available
errorProcessing failed
cancelledProcessing was cancelled (terminal state; stop polling)
When you fetch results via 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.
SectionFrom which nodeShape
parsethe parse nodeObject with structured markdown + per-block confidence. null if the workflow has no parse node (rare — parse is required by topology).
classificationsclassify nodesArray of {category, confidence, evidence}. Empty when no classifier ran.
splitsthe splitter nodeArray of {name, files, confidence, partitions} describing the segments. Empty when no splitter ran.
extractionsextract nodesArray 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).
extractionextract 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.
Each extracted field carries a 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_confidence from LLM logprobs, parse.layout_confidence from YOLO layout-segmentation) plus a per-block data-confidence attribute 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
Evidence is the right signal to surface in any human-review UI — it lets reviewers jump straight to the source.

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