# Generation object

What `POST /v1/generations`, `GET /v1/generations/{id}` and each row of `GET /v1/generations` return, inside `data`.

```json
{
  "id": "gen_4Fq9xT2mLr7Kd1sV8bN3pZ0c",
  "object": "generation",
  "status": "succeeded",
  "model": "seedance-2.5",
  "variant": "720p",
  "units": 5,
  "price_usd": 1.05,
  "outputs": [{ "url": "https://...", "mime": "video/mp4" }],
  "created_at": "2026-11-01T18:04:11.000Z",
  "finished_at": "2026-11-01T18:06:02.000Z",
  "outputs_kept_until": "2026-12-01T18:06:02.000Z"
}
```

| Field | Type | What it is |
| - | - | - |
| `id` | string | `gen_` and 24 letters and digits. |
| `object` | string | Always `generation`. |
| `status` | string | `queued`, `running`, `succeeded` or `failed`. See [Statuses](/docs/statuses). |
| `model` | string | The model id. |
| `variant` | string | The priced option used, for example `720p` or `720p+audio`. |
| `units` | number | How many units the price counts (seconds, images, characters ...). |
| `price_usd` | number | The price: reserved while it runs, charged only on success. A failed generation is charged nothing, and `price_usd` still shows what it would have cost. |
| `route`, `listed_price_usd` | string, number | Only when a backup route finished the generation at its own price: the route's place in the ranking (`route-2` is the second route) and the listed price of the same call. `price_usd` is then that route's price, above `listed_price_usd`. See [the price rule](/docs/billing). |
| `wholesale` | object | Only on a wholesale account: `{ list_price_usd, discount_pct, saved_usd }` behind `price_usd`. See [Wholesale accounts](#wholesale-accounts). |
| `queue` | object or null | Only on a wholesale account: where the generation stands in our line while it is `queued`, and `null` once it has been sent to a route. See [Queue](#queue). |
| `outputs` | array | `{ url, mime }` for each file. Empty until `succeeded`. Download them with [`/content`](/docs/get-the-result#download-the-file). |
| `error` | object | Only when `failed`: `{ code, message, retryable }`, and `reason` for a `content_policy` block. See [Why a generation failed](/docs/why-a-generation-failed). |
| `warnings` | array | Only when there is something to tell: `{ code, message }` for each. On the submit answer, a field the model no longer takes was ignored (see [Warnings](/docs/input-fields#warnings)); on a job, something about how it ran. Read on `GET` (the webhook carries the id and the status only). Pass the `message` on to whoever asked for the job. |
| `created_at` | string | ISO 8601 time. |
| `finished_at` | string | ISO 8601 time, once final. |
| `outputs_kept_until` | string | Only when `succeeded`: we keep the files until then, 30 days after the generation finished. Every read gives fresh links. |
| `status_url`, `result_url` | string | Only on the submit answer: where to poll. |

## Wholesale accounts

On an account with wholesale switched on, every generation answer carries a `wholesale` block next to `price_usd`. The `/v1/jobs` aliases carry it too. Other accounts never get the field.

```json
{
  "price_usd": 0.9975,
  "wholesale": { "list_price_usd": 1.05, "discount_pct": 5, "saved_usd": 0.0525 }
}
```

| Field | What it is |
| - | - |
| `price_usd` | Unchanged: what you pay, or were charged. |
| `wholesale.list_price_usd` | The public list price for the same call. |
| `wholesale.discount_pct` | Your wholesale rate, in percent. |
| `wholesale.saved_usd` | What the rate took off. |

`list_price_usd - saved_usd = price_usd`, exact to the micro-dollar (compare in micro-dollars, or with each figure rounded to 6 decimals).

On a job, `list_price_usd` is worked back from `price_usd` (`price_usd + saved_usd`), so it can be one micro-dollar above the quote's list price for the same call.

The rate is the job's own: the one it started with. A later change to your terms does not change it. When `price_usd` moves at the end (a job charged on the seconds delivered), the block is worked out again from the final `price_usd`. A failed job's block follows its `price_usd`, and a failed job is charged nothing.

The webhook carries no price, so it has no block. The Playground and the dashboard logs do not show it.

## Queue

On a wholesale account, every generation answer also carries `queue`, next to `status`. Other accounts never get the field.

```json
{
  "status": "queued",
  "queue": { "ahead": 10, "waited_s": 35, "estimated_start_s": 90, "estimated_seconds": 150 }
}
```

- While the generation is `queued` and waiting in our line, `queue` is an object.
- Once it has been sent to a route (it is `running`, it has ended, or it is being sent right now), `queue` is `null`. From then on there is no place in a line we can see, so we show none. A generation that a route started and gave back, now waiting to be sent again, also reads `null`.

| Field | What it is |
| - | - |
| `queue.ahead` | How many generations of the same model are ahead of it in our line. Exact up to 5, then to the nearest 5 (7 reads 5, 8 reads 10). |
| `queue.waited_s` | Seconds since it was made, to the nearest 5. |
| `queue.estimated_start_s` | Seconds until it is next tried on a route, to the nearest 30. `0` means now. |
| `queue.estimated_seconds` | Seconds until it is expected to be done: the wait to start plus how long this model usually takes for this call, to the nearest 30. |

Every figure is rounded, and the two `estimated_` figures are estimates, not promises: a generation can start or finish sooner or later than they say, and nothing is cancelled for running past them. `queue` is in the `POST /v1/generations` answer, `GET /v1/generations/{id}` (with or without `?wait`) and the `/v1/jobs` aliases, each row of `GET /v1/generations`. The webhook, the Playground and the dashboard logs do not show it.

What happens to a wholesale generation still waiting when its `max_wait_s` passes: see [Submit a generation](/docs/submit-a-generation).

