Skip to main content
POST
/
v2
/
workflows
/
{workflow_id}
/
run
curl -X POST 'https://api.anyformat.ai/v2/workflows/550e8400-e29b-41d4-a716-446655440000/run/' \
  -H 'Authorization: Bearer YOUR_API_KEY' \
  -F 'file=@/path/to/document.pdf'
{
  "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
  "status": "accepted",
  "workflow_id": "550e8400-e29b-41d4-a716-446655440000"
}

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.

Submit a file or text content for processing using a specific workflow. The process runs asynchronously, and you’ll receive a file UUID to poll for results.

Input Methods

You can submit content for processing in two ways:
  1. File Upload - Upload a binary file directly via multipart form data
  2. Text Input - Send plain text for processing
Only one input method can be used per request. Provide either file or text, not both.
The id returned in the response is a file UUID. Use it to poll for results via GET /v2/workflows/{workflow_id}/files/{id}/results/. The endpoint returns 412 while processing and 200 when results are ready.
curl -X POST 'https://api.anyformat.ai/v2/workflows/550e8400-e29b-41d4-a716-446655440000/run/' \
  -H 'Authorization: Bearer YOUR_API_KEY' \
  -F 'file=@/path/to/document.pdf'
{
  "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
  "status": "accepted",
  "workflow_id": "550e8400-e29b-41d4-a716-446655440000"
}

Authorizations

Authorization
string
header
required

API key issued from app.anyformat.ai/settings. Send as Authorization: Bearer <key>.

Path Parameters

workflow_id
string
required

Body

multipart/form-data
file
string | null
text
string | null

Response

Successful Response

Response after triggering a workflow run. Contains the collection ID to use for polling extraction results.

id
string
required

The collection UUID for this run. Use this ID to poll for results via GET /v2/workflows/{workflow_id}/files/{id}/results/.

Example:

"069dcc2c-e14c-7606-8000-2ee4fb17b4e1"

status
string
required

Initial status of the run, typically success (meaning the run was accepted, not that extraction is complete).

Example:

"success"

workflow_id
string
required

The UUID of the workflow that was executed.

Example:

"0686bb97-8c30-70f0-8000-97669e000eb8"

version_id
string
required

The workflow version this run was bound to (the latest version at submission time). Lets callers verify which schema produced the results — useful right after an edit.

Example:

"FGaV4I2JAA"