Skip to main content

What you’ll do

Submit an image (generated by any tool, not just a Runflow run) for quality evaluation, then read back a pass verdict, a 0.0-1.0 score, and the specific issues found. See Evaluations for the concepts behind this flow.

Prerequisites

  • A Runflow API key with the evaluations:create and evaluations:read scopes (create to submit, read to poll the result). Create one.
  • An image to evaluate, reachable as an HTTPS URL, a runflow://assets/{uuid} reference, or a data: URI.
  • Enough credit balance to cover one evaluation (submission pre-flights the balance).

Steps

1

Check the price (optional)

Job classes carry per-class prices. Read them at runtime instead of hardcoding:
Today standard is the only active class. The price is frozen onto your evaluation at submission.
2

Submit the image

POST /v1/evaluations. Only generated_image_url and task_type are required; generation_prompt is optional but improves prompt-adherence judging.
The response is 202 Accepted with a pending evaluation. Keep the id.
The id is a UUID. Send the Idempotency-Key header so a retried submit does not create (and bill) a second evaluation.
3

Wait for the verdict

Evaluation is asynchronous and usually takes tens of seconds. Choose one:
Fetch the evaluation until status_code is terminal (completed or failed). Replace {id} with the id from the previous step.
4

Read the result

On a completed evaluation, read the verdict:
weighted_pass_rate is a number (0.0-1.0); cost is a decimal string of credits charged; top_issues is a list of short labels. Use overall_passed for a yes/no gate and weighted_pass_rate for a threshold. For the per-judge breakdown (each issue with its category / subcategory / detail), request embeds: GET /v1/evaluations/{id}?embed=judges,action,gate_failures.

Verify it worked

status_code is completed and overall_passed / weighted_pass_rate are populated. You’re done.

Add reference images

For identity or garment checks, attach up to 4 reference images. Each accepts the same three URL forms as generated_image_url.
To avoid sending public URLs, upload the file first and pass a runflow://assets/{uuid} reference. See Upload large files.

Troubleshooting

Evaluations concept

Lifecycle, scoring, job classes, billing.

Handle async callbacks

Receive terminal evaluations by POST.

Upload large files

The runflow:// reference flow for local images.

API reference

POST /v1/evaluations and friends.