Skip to main content
Yir returns a stable task ID after a request is admitted. The task continues independently of the original HTTP connection, so clients should persist that ID and query it until the selected source-compatible surface reports a terminal state.

State mapping

Progress is a task-level value from 0 to 100 and does not move backward when Yir evaluates more than one eligible attempt.

Unknown is not failed

A timeout, temporary network error, or slow provider does not prove that a generation failed. Retry the query for the same task ID. Do not automatically submit a second logical task merely because one query was inconclusive. Yir continues tracking an attempt that an upstream provider accepted, even when another eligible attempt supplies the winning result. This preserves terminal and billing facts without changing the source-compatible response shape.

Result ownership

On confirmed success, the response contains the winning result in the selected source-compatible shape:
  • KIE-compatible responses provide a JSON-encoded resultJson with result URLs.
  • APIMart-compatible responses provide result.images.
Only the winning attempt supplies the public result. Progress can reflect the furthest confirmed task progress, but results and usage are never combined from unrelated attempts.