# Statuses

A generation moves forward only: `queued`, then `running`, then `succeeded` or `failed`.

| Status | Meaning |
| - | - |
| `queued` | Accepted and waiting. Your input files are fetched and checked at this stage. |
| `running` | A route is working on it. |
| `succeeded` | Done. `outputs` has the files and the price is charged, once. |
| `failed` | Stopped. `error` says why. Nothing is charged and the reservation is released. |

- `succeeded` and `failed` are final. A generation that is still running after 6 hours fails with `timeout`.
- A failed generation is free. To try again, submit a new one with a new `Idempotency-Key`.
- There is no cancel: a started generation runs to the end, and you are charged only if it succeeds.
- Wait for the end with one call, `GET /v1/generations/{id}?wait=60`, in a loop ([Get the result](/docs/get-the-result)), or send `webhook_url` with the generation and we POST to it when it succeeds or fails.

## Wholesale accounts: your place in the line

On a wholesale account, a `queued` generation also says where it stands in our line, in `queue`: how many generations of the same model are ahead of it, how long it has waited, and when it should start and finish. Once it has been sent to a route, `queue` is `null`: from then on there is no place in a line we can see. See [Generation object](/docs/generation-object#queue). Other accounts never get the field.

On a wholesale account, `max_wait_s` is the latest moment a generation may start. One still waiting in our line then is tried on every route that can start it; once started, it runs to its end. If none can, it ends `failed` with `max_wait_exceeded`, and nothing is charged. Our line's own limit (10 minutes today) comes first when it is shorter: the last try is then at that limit. See [Submit a generation](/docs/submit-a-generation).
