curl -X POST 'https://api.anyformat.ai/v3/workflows/' \
-H 'Authorization: Bearer YOUR_API_KEY' \
-H 'Content-Type: application/json' \
-d '{
"name": "Invoice Processing",
"description": "Extract data from invoice documents",
"nodes": [
{ "id": "parse_1", "type": "parse" },
{
"id": "extract_1",
"type": "extract",
"extraction_schema": {
"fields": [
{ "name": "invoice_number", "description": "The unique invoice identifier", "data_type": "string" },
{ "name": "total_amount", "description": "Total invoice amount including tax", "data_type": "float" }
]
}
}
],
"edges": [ { "source": "parse_1", "target": "extract_1" } ]
}'
import requests
url = "https://api.anyformat.ai/v3/workflows/"
headers = {"Authorization": "Bearer YOUR_API_KEY"}
body = {
"name": "Invoice Processing",
"description": "Extract data from invoice documents",
"nodes": [
{"id": "parse_1", "type": "parse"},
{
"id": "extract_1",
"type": "extract",
"extraction_schema": {
"fields": [
{"name": "invoice_number", "description": "The unique invoice identifier", "data_type": "string"},
{"name": "total_amount", "description": "Total invoice amount including tax", "data_type": "float"},
]
},
},
],
"edges": [{"source": "parse_1", "target": "extract_1"}],
}
workflow = requests.post(url, headers=headers, json=body).json()
print(workflow["id"])
{
"id": "0686bb97-8c30-70f0-8000-97669e000eb8",
"name": "Invoice Processing",
"description": "Extract data from invoice documents",
"created_at": "2026-07-01T12:00:00.000Z",
"updated_at": "2026-07-01T12:00:00.000Z"
}
{
"error": "Validation failed",
"detail": {
"message": "Workflow graph has 1 violation",
"violations": [
{
"rule": "single_parse_entrypoint",
"message": "Exactly one parse node is required",
"node_ids": []
}
]
},
"error_code": "TOPOLOGY_INVALID",
"retryable": false,
"request_id": "a1b2c3d4e5f67890abcdef1234567890"
}
Create Workflow
Create a workflow from a typed graph of nodes (parse, extract, classify, splitter, validate, if_else, slack_alert, edit, knowledge) in a single atomic transaction
curl -X POST 'https://api.anyformat.ai/v3/workflows/' \
-H 'Authorization: Bearer YOUR_API_KEY' \
-H 'Content-Type: application/json' \
-d '{
"name": "Invoice Processing",
"description": "Extract data from invoice documents",
"nodes": [
{ "id": "parse_1", "type": "parse" },
{
"id": "extract_1",
"type": "extract",
"extraction_schema": {
"fields": [
{ "name": "invoice_number", "description": "The unique invoice identifier", "data_type": "string" },
{ "name": "total_amount", "description": "Total invoice amount including tax", "data_type": "float" }
]
}
}
],
"edges": [ { "source": "parse_1", "target": "extract_1" } ]
}'
import requests
url = "https://api.anyformat.ai/v3/workflows/"
headers = {"Authorization": "Bearer YOUR_API_KEY"}
body = {
"name": "Invoice Processing",
"description": "Extract data from invoice documents",
"nodes": [
{"id": "parse_1", "type": "parse"},
{
"id": "extract_1",
"type": "extract",
"extraction_schema": {
"fields": [
{"name": "invoice_number", "description": "The unique invoice identifier", "data_type": "string"},
{"name": "total_amount", "description": "Total invoice amount including tax", "data_type": "float"},
]
},
},
],
"edges": [{"source": "parse_1", "target": "extract_1"}],
}
workflow = requests.post(url, headers=headers, json=body).json()
print(workflow["id"])
{
"id": "0686bb97-8c30-70f0-8000-97669e000eb8",
"name": "Invoice Processing",
"description": "Extract data from invoice documents",
"created_at": "2026-07-01T12:00:00.000Z",
"updated_at": "2026-07-01T12:00:00.000Z"
}
{
"error": "Validation failed",
"detail": {
"message": "Workflow graph has 1 violation",
"violations": [
{
"rule": "single_parse_entrypoint",
"message": "Exactly one parse node is required",
"node_ids": []
}
]
},
"error_code": "TOPOLOGY_INVALID",
"retryable": false,
"request_id": "a1b2c3d4e5f67890abcdef1234567890"
}
{name, description, nodes, edges}. The node types are parse, extract, classify, splitter, validate, if_else, slack_alert, edit and knowledge. Nodes says what each one does, Node schemas lists every node’s fields, and Field types covers the field types.
A body that violates graph topology is rejected with 400 TOPOLOGY_INVALID. A missing parse node and an orphaned extract node both violate it. detail.violations lists each broken rule with the offending node ids.
Fetch the stored graph back with GET /v3/workflows/{workflow_id}/. That response carries a server-assigned persistent_id on every field.
curl -X POST 'https://api.anyformat.ai/v3/workflows/' \
-H 'Authorization: Bearer YOUR_API_KEY' \
-H 'Content-Type: application/json' \
-d '{
"name": "Invoice Processing",
"description": "Extract data from invoice documents",
"nodes": [
{ "id": "parse_1", "type": "parse" },
{
"id": "extract_1",
"type": "extract",
"extraction_schema": {
"fields": [
{ "name": "invoice_number", "description": "The unique invoice identifier", "data_type": "string" },
{ "name": "total_amount", "description": "Total invoice amount including tax", "data_type": "float" }
]
}
}
],
"edges": [ { "source": "parse_1", "target": "extract_1" } ]
}'
import requests
url = "https://api.anyformat.ai/v3/workflows/"
headers = {"Authorization": "Bearer YOUR_API_KEY"}
body = {
"name": "Invoice Processing",
"description": "Extract data from invoice documents",
"nodes": [
{"id": "parse_1", "type": "parse"},
{
"id": "extract_1",
"type": "extract",
"extraction_schema": {
"fields": [
{"name": "invoice_number", "description": "The unique invoice identifier", "data_type": "string"},
{"name": "total_amount", "description": "Total invoice amount including tax", "data_type": "float"},
]
},
},
],
"edges": [{"source": "parse_1", "target": "extract_1"}],
}
workflow = requests.post(url, headers=headers, json=body).json()
print(workflow["id"])
{
"id": "0686bb97-8c30-70f0-8000-97669e000eb8",
"name": "Invoice Processing",
"description": "Extract data from invoice documents",
"created_at": "2026-07-01T12:00:00.000Z",
"updated_at": "2026-07-01T12:00:00.000Z"
}
{
"error": "Validation failed",
"detail": {
"message": "Workflow graph has 1 violation",
"violations": [
{
"rule": "single_parse_entrypoint",
"message": "Exactly one parse node is required",
"node_ids": []
}
]
},
"error_code": "TOPOLOGY_INVALID",
"retryable": false,
"request_id": "a1b2c3d4e5f67890abcdef1234567890"
}
Authorizations
API key issued from app.anyformat.ai/api-key. Send as Authorization: Bearer <key>.
Body
Public-surface workflow create body — typed graph of parse / classify / splitter / extract / validate nodes.
A validate node carries rules; each rule is either AI-evaluated
(kind="ai" + a natural-language description) or deterministic
(kind="deterministic" + a structured check, evaluated in pure
Python with no model call).
Uses PublicNode (public request models with only the fields callers
may set); the domain AnyNode also carries filter (worker-only)
and executor-injected / staff-only fields, so the public bodies pin a
stricter node schema. Call :meth:to_domain before forwarding to the
backend.
1"Invoice or receipt"
1- PublicParseNode
- ClassifyNode
- SplitterNode
- PublicExtractNode
- PublicValidateNode
- PublicIfElseNode
- PublicSlackAlertNode
- PublicEditNode
- KnowledgeNode
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Response
Successful Response
A workflow with its complete typed graph inline.
{name, description, nodes, edges} is the exact shape
POST /v3/workflows/ accepts — mutate it and feed it back to edit.
Unique identifier of the workflow (hyphenated UUID).
"0686bb97-8c30-70f0-8000-97669e000eb8"
Human-readable name of the workflow.
"Invoice Processing"
Typed graph nodes (parse / classify / splitter / extract / validate / if_else).
- PublicParseNode
- ClassifyNode
- SplitterNode
- PublicExtractNode
- PublicValidateNode
- PublicIfElseNode
- PublicSlackAlertNode
- PublicEditNode
- KnowledgeNode
Show child attributes
Show child attributes
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).
Directed edges between the graph nodes.
Show child attributes
Show child attributes

