Skip to main content
POST
Rate limit tier: submission, 60 requests/min. See Rate limits. Runs, or re-runs, a document packet on the latest version of its workflow, or on the version you choose. The path is flat: the packet already knows its workflow, so no workflow_id appears in the URL. Every call creates a new run. Re-running the same document after editing the workflow is the intended flow. Earlier runs stay readable at GET /v3/runs/{run_id}/ with their own results. The platform meters a re-run like a fresh run. See How credits work. Run a chosen version. Send an optional JSON body with workflow_version_id, a version_id from GET /v3/workflows/{workflow_id}/versions/. The run uses that version, not the latest. Pin a version to keep production runs off the candidates the optimizer saves, and to make a result reproducible. Without the body, or with {}, the latest version runs. An unknown version, or a version of another workflow, returns 404 and starts no run. The body accepts no other key: a misspelled key such as version_id is refused, so a typo cannot run the wrong version.
An Idempotency-Key replay is the one exception. Retrying with the same key returns the original run, and triggers and bills no second extraction. The key is scoped by version: the same key with a different workflow_version_id starts a separate run. See Idempotency. An unknown id returns 404, as does a packet belonging to another organization. An organization without extraction credit receives 402 PAYMENT_REQUIRED.

Authorizations

Authorization
string
header
required

API key issued from app.anyformat.ai/api-key. Send as Authorization: Bearer <key>.

Headers

Idempotency-Key
string | null

Optional caller-supplied key (Stripe convention). Retrying the request with the same key returns the original run instead of triggering (and billing) a second extraction. The key is scoped by workflow_version_id.

X-Anyformat-Priority
string | null

Path Parameters

document_packet_id
string
required

Body

application/json

Optional body of POST /v3/document-packets/{document_packet_id}/run/.

workflow_version_id
string | null

A version_id from GET /v3/workflows/{workflow_id}/versions/. Runs the packet on that version instead of the latest one. A version of another workflow answers 404.

Minimum string length: 1
Example:

"FGaV4I2JAA"

Response

Successful Response

202 response for the two workflow run triggers: the run, and the version it runs on.

run_id
string
required

Unique identifier of the new run (hyphenated UUID).

Example:

"069dcc2c-e14c-7606-8000-2ee4fb17b4f9"

document_packet_id
string
required

The document packet the run executes on (hyphenated UUID).

Example:

"069dcc2c-e14c-7606-8000-2ee4fb17b4e1"

workflow_id
string
required

The workflow being run (hyphenated UUID).

Example:

"0686bb97-8c30-70f0-8000-97669e000eb8"

status
enum<string>
required

Status at acceptance time — normally queued.

Available options:
queued,
in_progress,
processed,
error,
cancelled
Example:

"queued"

workflow_version_id
string | null

The version of the workflow that runs: a version_id from GET /v3/workflows/{workflow_id}/versions/. The key is absent when the version is not known.

Example:

"FGaV4I2JAA"