Skip to main content

Introduction

anyformat provides a REST API that allows you to programmatically create workflows, process documents, and retrieve extracted data. The API uses standard HTTP response codes. All API requests must use HTTPS. All endpoint paths require a trailing slash (/). Requests without a trailing slash will receive a 301 Moved Permanently redirect to the slashed URL.

Base URL

https://api.anyformat.ai/
All v2 endpoints use the /v2/ path prefix. For example: https://api.anyformat.ai/v2/workflows/.

Authentication

All API endpoints (except /docs/ and /schema/) require authentication via Authorization: Bearer:
curl -H "Authorization: Bearer YOUR_API_KEY" https://api.anyformat.ai/v2/workflows/
See Authentication for details on obtaining and managing API keys.

Rate Limits

The API uses two-tier rate limiting to ensure fair usage. File submission endpoints have a stricter limit, while all other endpoints share a higher general limit.
TierEndpointsLimit
SubmissionPOST /v2/workflows/{id}/run/, POST /v2/workflows/{id}/upload/, POST /v2/files/60 requests/min
GeneralAll other authenticated endpoints600 requests/min
The submission tier covers all endpoints that accept file uploads — whether or not they trigger immediate processing. Each tier has an independent counter — using extraction endpoints does not consume your general quota, and vice versa. If you exceed either limit, the API will return a 429 Too Many Requests response. Wait for the number of seconds specified in the Retry-After header before retrying. All successful responses include rate limit headers showing the limit for the tier that applies to that endpoint:
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 is only included in 429 (Too Many Requests) responses, not in every response.

API Endpoints

The API is organized around three main resource groups:

Workflows

Workflows define what information should be extracted from your documents.
MethodEndpointDescription
POST/v2/workflows/Create a new workflow
GET/v2/workflows/List all workflows
GET/v2/workflows/{id}/Get workflow details
DELETE/v2/workflows/{id}/Delete a workflow
POST/v2/workflows/{id}/run/Run workflow on a file
POST/v2/workflows/{id}/upload/Upload a file (no processing)
GET/v2/workflows/{id}/results/Get all results
GET/v2/workflows/{id}/runs/List workflow runs

Files

Files represent uploaded documents and track their processing status.
MethodEndpointDescription
POST/v2/files/Upload a file
GET/v2/files/List files
DELETE/v2/files/{id}/Delete a file
GET/v2/files/{id}/extraction/Get results

Webhooks

Webhooks deliver real-time notifications when processing completes or fails.
MethodEndpointDescription
POST/v2/webhooks/Create a webhook
GET/v2/webhooks/List webhooks
DELETE/v2/webhooks/{id}/Delete a webhook

Quick Start

See the API Quickstart for a complete getting-started tutorial with code examples.

Supported File Types & Limits

The API accepts the following document formats:
CategoryFormats
PDF.pdf
Documents.doc, .docx, .txt, .html, .htm, .rtf, .odt, .ppt, .pptx, .epub
Spreadsheets.xlsx, .xls
Markdown.md, .markdown
Images.png, .jpg, .jpeg, .gif, .bmp, .tiff
Email.eml, .msg
Audio.mp3, .wav
Limits:
  • Maximum file size: 20 MB per file
  • Page count: No hard limit (usage-based billing applies)
Unsupported file types are accepted by the upload endpoint but will cause processing to fail asynchronously. Check the processing status to detect format-related failures.

OpenAPI Schema

The full OpenAPI specification is available at: