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

# Read a generation

`GET /api/v2/generations/{id}`

## Request

- Base URL: `https://azurade.com`
- URL: `https://azurade.com/api/v2/generations/{id}`
- Auth: one of:
  - HTTP bearer
  - API key in header `Authorization`

Status, cost and output files of one generation. Poll this until status is failed, or completed with a non-empty outputs array: the files are attached a moment after the status turns completed. Output URLs are unguessable links that work without authentication; anyone you share one with can download the file.

## Path parameters

- `id` string, required

## Response `200`

OK

- Generation
  - `cost` number: Credits the generation costs: taken when it was accepted, less the share of any images it was asked for and did not deliver, which is refunded
  - `created` string, date-time
  - `error` string: Why it failed, when it did
  - `id` string
  - `input` object: The request body as submitted
  - `model` string
  - `outputs` Output[]
    - `content_type` string
    - `filename` string
    - `id` string
    - `poster_url` string, uri: First frame of a video output as JPEG, an unguessable link like url; absent for images
    - `url` string, uri: Unguessable link that downloads without authentication; anyone holding it can fetch the file
  - `prompt_used` string: The prompt the model was given, when translate_prompt or enhance_prompt rewrote the one in input
  - `status` 'pending' | 'completed' | 'failed' | 'stalled' | 'canceled'
  - `type` 'image' | 'video'
  - `updated` string, date-time

## Other responses

- `400`: Invalid request
- `401`: Missing or invalid credentials
- `404`: Not found

---

[API](https://skmtc.dev/azurade/apis/azurade-ai-api.md) · [All operations](https://skmtc.dev/azurade/apis/azurade-ai-api/llms.txt) · [OpenAPI document](https://skmtc.dev/azurade/apis/azurade-ai-api/revisions/0530fd2c8b63?raw)
