---
title: "Get a generation"
method: GET
path: "/generations/{id}"
tags: ["Generations"]
---

# Get a generation

`GET /generations/{id}`

## Request

- Base URL: `https://www.rainbrand.com/api/v1`
- URL: `https://www.rainbrand.com/api/v1/generations/{id}`
- Auth: one of:
  - API key in header `x-api-key`
  - HTTP bearer
  - OAuth 2
    - Authorization code: `https://www.rainbrand.com/api/auth/oauth2/authorize`
    - Token URL: `https://www.rainbrand.com/api/auth/oauth2/token`

Retrieve a generation's status, outputs, or failure details.

## Path parameters

- `id` string, uuid, required: Generation ID returned when the request started.

## Query parameters

- `wait` union: Wait for completion or failure. A timeout leaves generation running.
  - boolean
  - '0' | '1' | 'true' | 'false'
- `timeout` integer: Maximum wait in seconds when wait is true.

## Response `200`

OK

- object
  - `data` object, required
    - `id` string, uuid, required: Generation ID returned when the request started.
    - `status` 'pending' | 'generating' | 'completed' | 'failed', required: Current generation status.
    - `type` string, required: Requested output type. Known values: image, video, audio, svg; more may be added.
    - `model` string, required: Exact model ID returned by GET /models.
    - `brandSessionId` string, uuid, required: Brand the generation belongs to.
    - `outputs` object[], required: Output files in provider order. Empty until the generation completes.
      - `id` string, uuid
      - `type` string, required
      - `url` string, uri
      - `available` boolean, required
      - `mimeType` string, required
      - `durationMs` integer, nullable, required: File duration in milliseconds, when known. Null for images.
      - `width` integer, nullable, required: Displayed width in pixels, when known. Null for audio.
      - `height` integer, nullable, required: Displayed height in pixels, when known. Null for audio.
    - `failure` object, nullable, required: Failure details, or null when generation has not failed.
      - `code` 'upstream_failed', required
      - `message` string, required
      - `retryable` boolean, required: True when a new attempt with the same request may succeed; if you sent an Idempotency-Key, use a new key for it. False when the request must change first, or when a video may still be finishing and already billed.
      - `providerMessage` string, nullable, required: The provider's explanation of why it rejected the request, with links and secrets removed. Null when the provider gave none, or when the failure concerns Rainbrand's own account or a provider-side error. Its wording can change.
    - `createdAt` string, date-time, required: Time the generation was created.

## Other responses

- `401`: 401
- `403`: 403
- `404`: 404
- `429`: 429

---

[API](https://skmtc.dev/rainbrand/apis/rainbrand-api.md) - [All operations](https://skmtc.dev/rainbrand/apis/rainbrand-api/llms.txt) - [OpenAPI document](https://skmtc.dev/rainbrand/apis/rainbrand-api/revisions/012b8e9da4df?raw)
