Create a workflow from a typed graph of parse / classify / splitter / extract nodes in a single atomic transaction
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.
POST /v2/workflows/ creates a workflow from a strongly-typed graph. Use it to:
parse → extract workflows| Field | Type | Required | Description |
|---|---|---|---|
name | string | Yes | Workflow name |
description | string | No | Optional description |
nodes | Node[] | Yes | At least one node; exactly one must be type="parse" |
edges | Edge[] | No | Directed edges; empty for parse-only workflows |
| Field | Type | Default | Description |
|---|---|---|---|
id | string | — | Stable identifier (e.g. "parse_1") |
type | "parse" | — | Discriminator |
engine | "Fast" | "Performant" | "Fast" | Parser engine |
mode | "standard" | "agentic" | "standard" | Use "agentic" for per-block LLM routing through typed strategies (text/table/figure) |
effort | "low" | "mid" | "accurate" | "mid" when mode="agentic"; must be omitted otherwise | Effort preset for agentic mode |
prompt_hint | string | null | Domain hint shown to the parser (e.g. “medical lab report, preserve numerics exactly”) |
figure_enhancement_enabled | boolean | false | Extract structured descriptions of charts and images (extra LLM cost) |
visual_grounding_enabled | boolean | true | Per-block visual parsing with bounding boxes |
| Field | Type | Required | Description |
|---|---|---|---|
id | string | Yes | Stable identifier |
type | "extract" | Yes | Discriminator |
extraction_schema | object | Yes | { "fields": [...] } — at least one field |
use_images | boolean | No (default false) | Pass rendered page images to the extraction model |
| Field | Type | Required | Description |
|---|---|---|---|
source | string | Yes | Source node id |
target | string | Yes | Target node id |
branch | string | Conditional | Required when leaving a classify (category id) or splitter (rule id) node; forbidden otherwise |
parse node and no edges. Produces markdown only — no extraction.
effort picks a model mix — "low" (fast/cheap), "mid" (balanced, default), "accurate" (best quality, slowest). Use the Agentic Parse to Markdown cookbook for an end-to-end recipe.400 and nothing is persisted.
| Rule | Message |
|---|---|
| Exactly one parse node | workflow must contain exactly one \parse` node` |
| Unique node ids | duplicate node ids: [...] |
| Edges reference existing nodes | edge source X not in nodes / edge target Y not in nodes |
| Edge predecessor compatibility | extract does not accept extract as predecessor |
| Branch routing | edge from classify X requires \branch` to be set` |
| No fan-out from non-routers | node Y (extract) has 3 outgoing edges; only classify and splitter may fan out |
201 Created returns the workflow resource:
id — you’ll reuse it when uploading documents and fetching results.
data_type values for extraction fieldsparse, extractions, splits, and classifications on the results endpointAPI key issued from app.anyformat.ai/settings. Send as Authorization: Bearer <key>.
Request schema for creating a workflow.
Workflow name
1"Invoice Processing"
Field definitions. Each entry's shape is determined by its data_type.
1[
{
"data_type": "string",
"name": "invoice_number"
}
]Workflow description
"Extracts invoice number, vendor, total, and line items."
Successful Response
A workflow defines the extraction template — what fields to extract from documents, their types, and validation rules.
Unique identifier of the workflow (UUID).
"0686bb97-8c30-70f0-8000-97669e000eb8"
Human-readable name of the workflow.
"Invoice Processing"
Optional description of what this workflow extracts.
"A workflow for processing invoices and retrieving invoice details."
Timestamp when the workflow was created (ISO 8601).
Timestamp when the workflow was last modified (ISO 8601).
List of extraction field definitions configured for this workflow. null if not yet configured.