Skip to main content
POST
/
workflows
/
{id}
/
run
curl -X POST 'https://api.anyformat.ai/workflows/550e8400-e29b-41d4-a716-446655440000/run/' \
  -H 'x-api-key: YOUR_API_KEY' \
  -F 'file=@/path/to/document.pdf'
{
  "status": "success",
  "extraction_id": "362963",
  "workflow_id": "550e8400-e29b-41d4-a716-446655440000"
}
Submit a file or text content for extraction using a specific workflow. The extraction process runs asynchronously, and you’ll receive a job ID to track the status.

Input Methods

You can submit content for extraction in three ways:
  1. File Upload - Upload a binary file directly
  2. Base64 Encoded - Send file content as base64 with filename
  3. Text Input - Send plain text for extraction
Only one input method can be used per request. If multiple are provided, the priority is: file > file_base64 > text.
curl -X POST 'https://api.anyformat.ai/workflows/550e8400-e29b-41d4-a716-446655440000/run/' \
  -H 'x-api-key: YOUR_API_KEY' \
  -F 'file=@/path/to/document.pdf'
{
  "status": "success",
  "extraction_id": "362963",
  "workflow_id": "550e8400-e29b-41d4-a716-446655440000"
}

Manual Field Values

If your workflow has manual fields defined, you can provide their values when running an extraction:
curl -X POST 'https://api.anyformat.ai/workflows/550e8400-e29b-41d4-a716-446655440000/run/' \
  -H 'x-api-key: YOUR_API_KEY' \
  -F '[email protected]' \
  -F 'manual_field_values={"customer_id": "CUST-001", "department": "Finance"}'
The extraction_id returned in the response can be used to check the status and retrieve results using the Get Job endpoint.

Authorizations

X-API-Key
string
header
required

API key authentication. Add your API key with the X-API-Key header.

Path Parameters

id
string
required

Body

multipart/form-data
file
string<uri> | null
file_base64
string | null

Base64 encoded file content

filename
string | null

Original filename when using file_base64

content_type
string | null

MIME type when using file_base64

text
string | null
manual_field_values
unknown

Response

202 - application/json
status
string
required
extraction_id
integer
required
workflow_id
string<uuid>
required