Base URL
307 Temporary Redirect, which preserves the request method and body.
Authentication
All endpoints require an API key, passed as a Bearer token:Resource model
| Resource | What it is | Identifier |
|---|---|---|
| Workflow | The extraction template — a typed graph of parse / classify / splitter / extract / validate nodes. | workflow_id |
| Document packet | The unit a workflow runs on — one or more files treated as a single document. Created by uploading. | document_packet_id |
| Run | One execution attempt of a workflow against a packet. One packet can have many runs. | run_id |
069dcc2c-e14c-7606-8000-2ee4fb17b4e1). Path parameters are always snake_case: workflow_id, document_packet_id, run_id.
The typical flow:
- Create a workflow (or build it visually in the dashboard).
- Upload and run a document in one call — it returns a
run_id. - Get the run until
statusisprocessed; the results envelope is inline on the same response.
Pagination
Every list endpoint is keyset-paginated and returns the same page shape:?limit=— page size, default20, maximum100. Values above 100 are rejected with400, not clamped.?cursor=— the opaquenext_cursortoken from the previous page.- Iterate by following
next_cursoruntil it isnull. - Sort order is fixed at newest-first (
-created_at, -id).
400 instead of silently ignoring them, so a typo like ?pagesize= fails loudly.
Idempotency
The three POSTs that create packets or trigger runs accept an optionalIdempotency-Key header (Stripe convention — any unique string you choose, e.g. a UUID):
POST /v3/workflows/{workflow_id}/upload/POST /v3/workflows/{workflow_id}/upload/run/POST /v3/document-packets/{document_packet_id}/run/
Rate limits
Same two-tier model as v2 — submission endpoints have a stricter limit, everything else shares a higher general limit:| Tier | v3 endpoints | Limit |
|---|---|---|
| Submission | POST .../upload/, POST .../upload/run/, POST .../upload/from-url/, POST /v3/document-packets/{id}/run/ | 60 requests/min |
| General | All other authenticated endpoints | 600 requests/min |
429 Too Many Requests; wait for the number of seconds in the Retry-After header. Every response carries x-ratelimit-limit, x-ratelimit-remaining, and x-ratelimit-reset for the tier that applies.
Response headers
Every/v3/ response is stamped with the API version:
Deprecation or Sunset headers — those appear only on versions that are on the retirement path (as /v2/ responses do today). See Versioning & deprecation for the full header reference and how to alert on sunset signals.
Errors
Error responses use the same structured envelope as v2:retryable: true means the same request may succeed on retry (with backoff); retryable: false means you must change the request first. See Errors for the complete code reference. Two codes worth knowing up front:
402 PAYMENT_REQUIRED— a run trigger was rejected because the organization is out of extraction credit.400 TOPOLOGY_INVALID— a workflow create/update body failed graph validation;detail.violationslists each broken rule with the offending node ids.
v3 never returns
412 Precondition Failed. Where v2 used 412 to signal “results not ready yet”, v3 returns 200 with the run’s status field — see Get run.Endpoints at a glance
Workflows
| Method | Endpoint | Description |
|---|---|---|
| POST | /v3/workflows/ | Create a workflow |
| GET | /v3/workflows/ | List workflows |
| GET | /v3/workflows/{workflow_id}/ | Get a workflow — full typed graph inline |
| PATCH | /v3/workflows/{workflow_id}/ | Update a workflow |
| DELETE | /v3/workflows/{workflow_id}/ | Delete a workflow |
Upload
| Method | Endpoint | Description |
|---|---|---|
| POST | /v3/workflows/{workflow_id}/upload/ | Upload a document packet (no processing) |
| POST | /v3/workflows/{workflow_id}/upload/run/ | Upload and run in one call |
| POST | /v3/workflows/{workflow_id}/upload/from-url/ | Create a packet from URLs |
Document packets
| Method | Endpoint | Description |
|---|---|---|
| GET | /v3/workflows/{workflow_id}/document-packets/ | List a workflow’s packets |
| GET | /v3/document-packets/{document_packet_id}/ | Get a packet — files + latest_run_id |
| POST | /v3/document-packets/{document_packet_id}/run/ | Run a packet — returns a new run_id |
| DELETE | /v3/document-packets/{document_packet_id}/ | Delete a packet |
Runs
| Method | Endpoint | Description |
|---|---|---|
| GET | /v3/workflows/{workflow_id}/runs/ | List a workflow’s runs |
| GET | /v3/runs/{run_id}/ | Get a run — status + results inline |
OpenAPI schema
The full OpenAPI specification (v2 + v3) is available at:- JSON: https://api.anyformat.ai/schema/?format=json
- Swagger UI: https://api.anyformat.ai/docs/
