curl -X GET 'https://api.anyformat.ai/v3/workflows/0686bb97-8c30-70f0-8000-97669e000eb8/' \
-H 'Authorization: Bearer YOUR_API_KEY'
curl -X GET 'https://api.anyformat.ai/v3/workflows/0686bb97-8c30-70f0-8000-97669e000eb8/?version=AbCdEfGhIj' \
-H 'Authorization: Bearer YOUR_API_KEY'
import requests
workflow_id = "0686bb97-8c30-70f0-8000-97669e000eb8"
url = f"https://api.anyformat.ai/v3/workflows/{workflow_id}/"
headers = {"Authorization": "Bearer YOUR_API_KEY"}
workflow = requests.get(url, headers=headers).json()
for node in workflow["nodes"]:
print(node["id"], node["type"])
{
"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",
"nodes": [
{
"id": "parse_1",
"type": "parse",
"mode": "standard",
"prompt_hint": null,
"figure_enhancement": false,
"cache": true,
"effort": "mid",
"scanned_pages": "ocr"
},
{
"id": "extract_1",
"type": "extract",
"mode": "standard",
"extraction_schema": {
"fields": [
{
"name": "invoice_number",
"description": "The unique invoice identifier",
"data_type": "string",
"persistent_id": "8f14e45f-ceea-467f-a34e-9b6e2f7d3c1a"
},
{
"name": "total_amount",
"description": "Total invoice amount including tax",
"data_type": "float",
"persistent_id": "45c48cce-2e2d-4fbd-aa47-1a8a5d8f6b2b"
}
]
},
"lookup_file_ids": [],
"lookup_suggestion": null,
"lookup_reasoning_effort": null,
"lookup_file_uploads": [],
"use_images": false
}
],
"edges": [
{ "source": "parse_1", "target": "extract_1", "branch": null }
]
}
Get Workflow
Retrieve a workflow with its complete typed graph inline
curl -X GET 'https://api.anyformat.ai/v3/workflows/0686bb97-8c30-70f0-8000-97669e000eb8/' \
-H 'Authorization: Bearer YOUR_API_KEY'
curl -X GET 'https://api.anyformat.ai/v3/workflows/0686bb97-8c30-70f0-8000-97669e000eb8/?version=AbCdEfGhIj' \
-H 'Authorization: Bearer YOUR_API_KEY'
import requests
workflow_id = "0686bb97-8c30-70f0-8000-97669e000eb8"
url = f"https://api.anyformat.ai/v3/workflows/{workflow_id}/"
headers = {"Authorization": "Bearer YOUR_API_KEY"}
workflow = requests.get(url, headers=headers).json()
for node in workflow["nodes"]:
print(node["id"], node["type"])
{
"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",
"nodes": [
{
"id": "parse_1",
"type": "parse",
"mode": "standard",
"prompt_hint": null,
"figure_enhancement": false,
"cache": true,
"effort": "mid",
"scanned_pages": "ocr"
},
{
"id": "extract_1",
"type": "extract",
"mode": "standard",
"extraction_schema": {
"fields": [
{
"name": "invoice_number",
"description": "The unique invoice identifier",
"data_type": "string",
"persistent_id": "8f14e45f-ceea-467f-a34e-9b6e2f7d3c1a"
},
{
"name": "total_amount",
"description": "Total invoice amount including tax",
"data_type": "float",
"persistent_id": "45c48cce-2e2d-4fbd-aa47-1a8a5d8f6b2b"
}
]
},
"lookup_file_ids": [],
"lookup_suggestion": null,
"lookup_reasoning_effort": null,
"lookup_file_uploads": [],
"use_images": false
}
],
"edges": [
{ "source": "parse_1", "target": "extract_1", "branch": null }
]
}
/definition/ endpoint: this read is the round-trippable definition.
The {name, description, nodes, edges} subset is the exact shape POST /v3/workflows/ accepts. Strip the read-only id, created_at and updated_at, then feed the remainder to PATCH /v3/workflows/{workflow_id}/. Its Python example shows the one-liner. An unknown field is rejected with 400 VALIDATION_ERROR.
Every field in an extract node carries its server-assigned persistent_id, the stable identity that survives a rename. Echo it unchanged when you PATCH, and analytics, ground truth and quality metrics stay attached to the field. See the migration guide.
Reading an earlier version
The response is the latest version by default. Pass?version=<version_id> to read an earlier version’s graph in the same shape. Take the version_id from GET /v3/workflows/{workflow_id}/versions/. An unknown version_id answers 404 with a detail naming it. Any other query parameter is rejected with 400 VALIDATION_ERROR, so a misspelled version cannot silently read the latest.
Versions are read-only, for comparison and audit. A run always uses the latest version, and a PATCH always builds on it. The versions page shows how to diff two versions’ field descriptions.
curl -X GET 'https://api.anyformat.ai/v3/workflows/0686bb97-8c30-70f0-8000-97669e000eb8/' \
-H 'Authorization: Bearer YOUR_API_KEY'
curl -X GET 'https://api.anyformat.ai/v3/workflows/0686bb97-8c30-70f0-8000-97669e000eb8/?version=AbCdEfGhIj' \
-H 'Authorization: Bearer YOUR_API_KEY'
import requests
workflow_id = "0686bb97-8c30-70f0-8000-97669e000eb8"
url = f"https://api.anyformat.ai/v3/workflows/{workflow_id}/"
headers = {"Authorization": "Bearer YOUR_API_KEY"}
workflow = requests.get(url, headers=headers).json()
for node in workflow["nodes"]:
print(node["id"], node["type"])
{
"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",
"nodes": [
{
"id": "parse_1",
"type": "parse",
"mode": "standard",
"prompt_hint": null,
"figure_enhancement": false,
"cache": true,
"effort": "mid",
"scanned_pages": "ocr"
},
{
"id": "extract_1",
"type": "extract",
"mode": "standard",
"extraction_schema": {
"fields": [
{
"name": "invoice_number",
"description": "The unique invoice identifier",
"data_type": "string",
"persistent_id": "8f14e45f-ceea-467f-a34e-9b6e2f7d3c1a"
},
{
"name": "total_amount",
"description": "Total invoice amount including tax",
"data_type": "float",
"persistent_id": "45c48cce-2e2d-4fbd-aa47-1a8a5d8f6b2b"
}
]
},
"lookup_file_ids": [],
"lookup_suggestion": null,
"lookup_reasoning_effort": null,
"lookup_file_uploads": [],
"use_images": false
}
],
"edges": [
{ "source": "parse_1", "target": "extract_1", "branch": null }
]
}
Authorizations
API key issued from app.anyformat.ai/api-key. Send as Authorization: Bearer <key>.
Path Parameters
Query Parameters
A version_id from GET /v3/workflows/{workflow_id}/versions/. Reads that version's graph instead of the latest.
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

