get_generation
Check the status and outputs of a generation job by its ID. Use after starting a job without waiting.
Instructions
Fetch the current status and outputs of one generation (no polling).
A single GET /generations/{id} snapshot. Use this to check on a job
started with generate(wait=false) or after a TIMEOUT_PENDING; use
wait_for_generation instead if you want to block until it finishes.
Statuses: "processing" -> "succeeded" | "failed". remaining_balance
is only fetched (best-effort) once the job is terminal; while
processing it is None, as is credits_spent.
Args:
generation_id: Id returned by generate.
Returns:
{"generation_id", "status", "output_urls", "outputs", "model_id",
"credits_spent", "remaining_balance", "elapsed_s", "error"} —
error carries the provider reason when status is "failed".
On failure: {"error": {"code", "message", "details"}} (e.g.
NOT_FOUND for an unknown id).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| generation_id | Yes |