Skip to main content

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.

anyformat exposes a REST API that lets you programmatically create workflows, process documents, and retrieve results. This page is the orientation guide — for a step-by-step walkthrough, see the quickstart. For terminology (Workflow, Field, Run, etc.) start at Concepts. For complete worked examples (invoices, resumes, contracts, …) see Recipes.

Base URL

https://api.anyformat.ai/
All v2 endpoints use the /v2/ prefix — for example, https://api.anyformat.ai/v2/workflows/. All endpoint paths require a trailing slash. Requests without one receive a 301 Moved Permanently redirect.

Authentication

All endpoints (except /docs/ and /schema/) require an API key, passed as a Bearer token:
curl -H "Authorization: Bearer YOUR_API_KEY" https://api.anyformat.ai/v2/workflows/
See Authentication for how to obtain and manage API keys.

Rate limits

The API uses two-tier rate limiting. File submission endpoints have a stricter limit; all other endpoints share a higher general limit.
TierEndpointsLimit
SubmissionPOST /v2/workflows/{id}/run/, POST /v2/workflows/{id}/upload/, POST /v2/workflows/{id}/files/60 requests/min
GeneralAll other authenticated endpoints600 requests/min
Each tier has an independent counter — extraction endpoints don’t consume your general quota, and vice versa. If you exceed a limit, the API responds with 429 Too Many Requests. Wait for the number of seconds in the Retry-After header before retrying. All successful responses include rate-limit headers for the tier that applies:
HeaderDescription
x-ratelimit-limitMaximum requests allowed per window
x-ratelimit-remainingRequests remaining in current window
x-ratelimit-resetSeconds until the rate limit resets
The Retry-After header appears only in 429 responses, not in every response.

Endpoints at a glance

The API is organized around three resource groups.

Workflows

MethodEndpointDescription
POST/v2/workflows/Create a workflow
GET/v2/workflows/List workflows
GET/v2/workflows/{id}/Get a workflow
DELETE/v2/workflows/{id}/Delete a workflow
POST/v2/workflows/{id}/run/Run a workflow on a file
POST/v2/workflows/{id}/upload/Upload a file (no processing)
GET/v2/workflows/{id}/runs/List workflow runs

Files

MethodEndpointDescription
POST/v2/workflows/{workflow_id}/files/Upload a file
GET/v2/workflows/{workflow_id}/files/List files
DELETE/v2/files/{id}/Delete a file
GET/v2/workflows/{workflow_id}/files/{id}/results/Get results

Webhooks

MethodEndpointDescription
POST/v2/webhooks/Create a webhook
GET/v2/webhooks/List webhooks
DELETE/v2/webhooks/{id}/Delete a webhook
See Webhooks overview for setup, signing, and delivery semantics.

Response format

Successful responses are JSON. The detailed envelope (including as_lists=true for tabular shapes) is documented in Response formats. Error responses follow a consistent structured shape:
{
  "error": "Brief, human-readable error description",
  "detail": "Detailed explanation of what went wrong",
  "error_code": "MACHINE_READABLE_ERROR_CODE",
  "retryable": false,
  "request_id": "a1b2c3d4e5f67890abcdef1234567890"
}
See Errors for the complete error code reference and retry patterns.

SDKs

Official client libraries with a fluent builder over the typed-graph API:

OpenAPI schema

The full OpenAPI specification is available at: