run_id is an optional association, not a requirement. Runflow can also auto-evaluate eligible run outputs on the platform; those platform evaluations are separate from the ones you submit here (and from any you attach to a run with run_id). This API is for images generated outside a run, or for re-checking a post-processed export.
How it works
Evaluation is asynchronous. You submit, get back an evaluationid immediately, and the verdict lands a little later (the pipeline runs several judges, so expect tens of seconds). Read the result by polling or by receiving a callback.
The status reference is also available at
GET /v1/evaluations/statuses.
The result
A completed evaluation carries the verdict plus the reasoning behind it. Top-level fields:
The full reasoning tree (per-judge findings, gate failures, and the action detail) is available on
GET /v1/evaluations/{id} through embed (for example ?embed=judges,action,gate_failures). Each embedded issue carries a category, a subcategory, and a detail string; the top-level top_issues above is just the summary label list. The flat fields are enough for most integrations.
Issue categories are discoverable per resource. For Runflow models,
GET /v1/models/{owner}/{slug}/evaluation-issue-categories returns the distinct (category, subcategory) pairs seen across that model’s evaluations, which is handy for building filters.Endpoints
Every endpoint uses
Authorization: Bearer $RUNFLOW_API_KEY. The X-Organization-Id header is optional and defaults to the key’s org.
Authentication and scopes
A submit-and-poll integration needs both
evaluations:create (to submit) and evaluations:read (to read the result back). Create a key with both from the API keys settings. The Submit an image for evaluation guide walks through a full submit-and-read cycle.
Feedback
Rate an evaluation’s analysis with a thumbs-up or thumbs-down, or clear an existing rating:is_positive must be present in the request body, but its value may be true (👍), false (👎), or null (which clears an existing rating). An optional reason string can explain the rating. Feedback needs the evaluations:edit scope, and both org API keys and users holding it can rate — so an API-first integration can submit feedback without a logged-in user. The rating is scoped to the evaluation’s organization and works for run-less and run-scoped evaluations alike.
Existing API keys are not granted evaluations:edit retroactively (least privilege); add the scope to a key, or mint a new one, from the API keys settings.
Job classes and pricing
Each evaluation runs under a job class that sets its price. Discover the active classes and their prices at runtime rather than reading them from docs:job_class field; omit it to use the default. Today standard is the only active class.
Billing
You are charged once, at a terminal state, for the frozen price:
Submission runs a balance pre-flight against the frozen price and returns
402 if you cannot cover it. There is no hold or reservation; the charge is applied at the terminal write.
Media inputs
generated_image_url (and each reference_images[].url) accepts exactly three forms:
Up to 4 reference images are allowed (for example a source face or a target garment).
task_type is required; generation_prompt is optional but improves prompt-adherence judging.
Failures and errors
Whenstatus_code is failed, failure_code says why:
Submission itself can return:
See Errors for the full error envelope.
Callbacks
Passcallback_url on submit to receive a signed POST when the evaluation reaches a terminal state, instead of polling. The signing and retry mechanics are identical to run callbacks (HMAC Runflow-Signature, return 2xx fast, be idempotent), but the body is evaluation-specific:
The callback carries the verdict summary plus correlation handles; fetch the full reasoning tree with
GET /v1/evaluations/{id}. The guide shows a worked receiver.
Idempotency
POST /v1/evaluations honors the Idempotency-Key header. Send a unique key per logical submission so a retried request does not create a second evaluation (and a second charge). client_ref is a correlation label echoed back in responses and callbacks; it is not an idempotency key.
Related
Submit an image for evaluation
Step-by-step: key, submit, poll or callback, read the verdict.
Callbacks
Receive a POST when an evaluation terminates instead of polling.
Pricing
How credits and charges work.
API reference
Full endpoint reference.