wait_for_generation
Monitor a generation job until it completes or times out, retrieving final results after a pending response.
Instructions
Block until a generation reaches a terminal status, or time out.
Resumes waiting on any in-flight job — most usefully after generate
returned TIMEOUT_PENDING, or for a job started with wait=false.
Polls with backoff (2s growing to a 10s cap, jittered) until the job is
"succeeded" or "failed", or until timeout_s elapses (default:
PIXIO_DEFAULT_TIMEOUT_S, 180s). Budget actuals are reconciled from the
job's real creditsCost when it completes.
On timeout the TIMEOUT_PENDING error again carries the
generation_id — the job keeps running server-side and this tool can
be called as many times as needed.
Args:
generation_id: Id returned by generate.
timeout_s: Max seconds to wait; None uses the server default.
Returns: On success the job-result shape: {"generation_id", "status", "output_urls", "outputs", "model_id", "credits_spent", "remaining_balance", "elapsed_s", "error"}. On failure: {"error": {"code", "message", "details"}} with code GENERATION_FAILED (details include the provider reason), TIMEOUT_PENDING (details include generation_id and a resume hint), NOT_FOUND, AUTH, or UPSTREAM_ERROR.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| timeout_s | No | ||
| generation_id | Yes |