Skip to main content
anyformat API v3 is the current stable major. It runs the same extraction engine as v2 behind a smaller, flatter surface. Three resources cover it: workflows, document packets, and runs. Coming from v2? The migration guide maps every v2 path to its v3 successor. API v2 is retired and answers 410 Gone.

Base URL

All endpoint paths require a trailing slash. Requests without one receive a 307 Temporary Redirect, which preserves the request method and body.

Authentication

All endpoints require an API key, passed as a Bearer token:
See Authentication to create and manage keys.

Resource model

All identifiers are hyphenated UUIDs, such as 069dcc2c-e14c-7606-8000-2ee4fb17b4e1. Path parameters are always snake_case: workflow_id, document_packet_id, run_id. The typical flow:
  1. Create a workflow (or build it visually in the dashboard).
  2. Upload and run a document in one call. The response carries a run_id.
  3. Get the run until status is processed; the results envelope is inline on the same response.

Pagination

Every list endpoint is keyset-paginated and returns the same page shape:
  • ?limit= sets the page size. The default is 20 and the maximum is 100. A larger value returns 400; the API does not clamp it.
  • ?cursor= takes the opaque next_cursor token from the previous page.
  • Iterate by following next_cursor until it is null.
  • Sort order is fixed at newest-first (-created_at, -id).
v3 returns no totals, counts, or page numbers. A count over a growing collection is stale the moment it is computed. List endpoints also reject an unknown query parameter with 400 rather than ignoring it, so a typo like ?pagesize= fails loudly.

Idempotency

The POSTs that create packets, trigger runs or launch evals accept an optional Idempotency-Key header. The value is any unique string you choose, such as a UUID. Retrying a request with the same key replays the original response. The API creates no duplicate packet, and triggers and bills no second extraction or eval. Use it to make network-timeout retries safe. A replayed response carries the header Idempotent-Replayed: true; a first response does not.

How long a key lasts, and what it covers

  • Lifetime. The API remembers a key for 24 hours after its first request, and forgets it within the hour after that. A key sent again once it is forgotten starts a new request.
  • Scope. A key belongs to the user behind your API key and to the resource the request addresses, such as the workflow you upload to or the packet you run. It is not shared across your organization: the same key sent by another user, or to another workflow, is an unrelated request.

What counts as the same request

The same method on the same resource, with byte-identical content as the API forwards it:
  • Uploads: the same files, in the same order, with the same names, bytes and content types, and the same metadata or ground_truth.
  • Evals: the same version_id, the same dataset_tag_ids in the same order, and the same untagged.
  • Runs: a run on the same packet. A run has no body to differ, so a retry always replays it.
Order matters: dataset_tag_ids: ["a", "b"] and ["b", "a"] are different requests. An omitted field is not the same as the field sent with an empty value: metadata left out differs from metadata: {}. An eval that omits version_id targets the version that is current when it arrives, so a retry after a new version is published is a different request. Pass version_id for a replay that survives a publish.

A reused key

Reusing a key with a different request returns 422 IDEMPOTENCY_KEY_REUSED. When the first request created one resource, params names it: An upload whose files’ names, sizes or types changed is refused before any packet is named, so its error carries no params. Never reuse a key for an upload with different files. The API may already have received the new files when it refuses the request. To recover, resend the original request unchanged to get its result, or read the resource that params.resource_id names. Use a new key only for a genuinely new request: a new key on a retried eval or run launches, and bills, a second one.

Rate limits

Submission endpoints have a stricter limit, and so does downloading a split, which renders a document on every request. Everything else shares a higher general limit. Each tier counts separately. Exceeding a limit returns 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:
Every /v3/ and /mcp response also carries a request id, a success as well as an error:
On an error it equals the body’s request_id. Quote it when you contact support. v3 responses carry no Deprecation or Sunset headers. A version on the retirement path would add them, per RFC 8594, so alerting on Sunset catches a future retirement early.

Compression

Send Accept-Encoding: gzip and JSON responses over 1 KB come back gzip-compressed, with Content-Encoding: gzip. A run’s results compress about 4x, so a large run downloads faster. Without the header, you get the same response uncompressed. The SDKs, the CLI, Python requests and httpx, and JavaScript fetch send the header and decompress for you. Some clients need it set by hand:

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 are worth knowing up front:
  • 402 PAYMENT_REQUIRED: the organization is out of extraction credit, so the API rejected the run trigger.
  • 400 TOPOLOGY_INVALID: a workflow create or update body failed graph validation, or a run was refused because the version’s graph cannot run (for example a Validate node fed by two Extract nodes). detail.violations lists 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

Upload

Document packets

Runs


OpenAPI schema

The full OpenAPI specification is available at: