Skip to main content
POST
Rate limit tier: submission, 60 requests/min. See Rate limits. Launches an eval: one graded run of a workflow’s dataset, or of a tagged subset of it, against a target version. The call is async and fire-and-forget. It enqueues a fresh extraction for every dataset document, pins the realized cohort into a new eval, and returns 202 at once with an eval_id and a run_number. Grading finalizes on a worker, so poll the eval by its eval_id until status leaves in_progress. The response carries counts, never internal ids. enqueued_count counts the documents whose extraction was queued, and failed_count counts those that failed to enqueue. For the per-document breakdown, read the eval by eval_id.

Target version

Omit version_id to evaluate the workflow’s current version; pass one to override. A workflow with no version yet returns 404 NOT_FOUND.

Run a tagged subset

Pass dataset_tag_ids to run only the dataset documents that carry at least one of those dataset tags (GET …/dataset/tags/ lists them), and untagged: true to run the documents that carry no tag. Send both to run their union. Omit both to run the whole dataset. An empty dataset_tag_ids: [] is not the whole dataset: without untagged: true it selects no document and returns 400 VALIDATION_ERROR, and the SDKs raise before they send it. The eval read back with GET …/evals/{eval_id}/ shows the selection. A tag that is not one of this workflow’s dataset tags returns 422 DATASET_INVALID_REQUEST, and the API creates no eval. A valid selection that matches no document returns 422 EMPTY_EVAL.

Credits

An eval is billed like runs, one extraction per document. Running out of credit does not answer 402: the documents that cannot run fail, and the eval ends with failures, or empty.

Idempotency

Without an Idempotency-Key, every launch creates a new eval. Re-launching runs a fresh cohort, and the platform meters it accordingly. See How credits work. Supplying the header replays instead: a retry with the same key returns the original eval, and launches no second run. See Idempotency.
When you omit version_id, a replayed key sent after a new version was published resolves to a different version than the first call, so the request no longer matches and returns 422 IDEMPOTENCY_KEY_REUSED. Pass an explicit version_id when you need a stable replay across version changes.
On IDEMPOTENCY_KEY_REUSED, params.resource_id is the original eval’s eval_id: read it with GET …/evals/{eval_id}/. Do not launch again under a new key, which runs and bills a second eval.

Errors

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 with the same key returns the original eval instead of launching (and billing) a second full-dataset run.

Path Parameters

workflow_id
string
required

Body

application/json

Body for POST /v3/workflows/{workflow_id}/evals/ (JSON, optional).

Send {} (or no body) to evaluate the workflow's current version.

version_id
string | null

Workflow version to evaluate. Omit to run against the workflow's current version; pass a value to override.

Example:

"abcdef1234"

dataset_tag_ids
string[] | null

Run only the dataset documents carrying at least one of these dataset tags. Omit both this and untagged to run the whole dataset. An empty list selects no document, so it is valid only with untagged: true.

Example:
untagged
boolean
default:false

Also run the dataset documents that carry no dataset tag.

Response

Successful Response

202 response: the eval was created and its cohort enqueued.

Exposes counts, never the internal extraction/file ids. Read the eval by eval_id for the per-document breakdown (including which documents failed to enqueue).

eval_id
string
required

Unique identifier of the new eval (hyphenated UUID); the poll handle.

Example:

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

run_number
integer
required

Per-workflow run counter (#1, #2, …) for this eval.

Example:

3

enqueued_count
integer
required

Number of dataset documents whose extraction was enqueued for this run.

Example:

42

failed_count
integer
required

Number of dataset documents that failed to enqueue. Read the eval for the failed document ids.

Example:

0