---
title: "Request to get generation by ID"
method: GET
path: "/api/v1/generation/{id}"
tags: ["Generations"]
---

# Request to get generation by ID

`GET /api/v1/generation/{id}`

## Request

- Base URL: `https://api.api-stock.com`
- URL: `https://api.api-stock.com/api/v1/generation/{id}`
- Auth: HTTP bearer

## Path parameters

- `id` string, required

## Response `200`

Generation object

- GenerationDto
  - `taskId` string, required: Unique task identifier of generation
  - `model` 'veo3.1-fast' | 'veo3.1-quality' | 'veo3.1-lite' | 'nano-banana' | 'nano-banana-pro' | 'nano-banana-2' | 'nano-banana-2.1' | 'nano-banana-2-lite' | 'grok-imagine-1.5-video' | 'grok-imagine-1.5-image' | 'grok-imagine-2.0-image' | 'seedance-2.0' | 'seedance-2.0-fast' | 'seedance-2.0-mini' | 'seedance-2.5' | 'seedance-2.5-spicy' | 'seedance-1-5-pro' | 'gpt-image-2' | 'gpt-image-2.5-sunburst' | 'gpt-image-2.5-flare' | 'kling-3.0-motion-control' | 'kling-3.0' | 'kling-4.0' | 'pixverse-v6' | 'seedream-5-0-lite' | 'seedream-5-0-flash' | 'seedream-5-0-pro' | 'seedream-4-5' | 'wan2.7-video' | 'wan3.0-video' | 'wan3.0-video-prime' | 'wan3.0-video-pro' | 'flux-3-video' | 'flux-3-image' | 'gemini-omni-1.1-flash' | 'minimax-h3' | 'agnes-video-2.5' | 'z-image' | 'wan2.7-image' | 'wan2.7-image-pro' | 'midjourney' | 'midjourney-video' | 'suno', nullable, required: Generation model
  - `input` string, nullable, required: Generation input parameters
  - `files` MediaFileDto[]: Generated media files (populated when generation is completed)
    - `fileUrl` string, required: Direct URL to the generated file (retained for 3 days)
    - `fileType` 'image' | 'video' | 'music', required: Type of media file: 'image', 'video' or 'music'
  - `output` object, nullable: Structured provider result stored next to the files (populated when generation is finished). For Suno music: `tracks` with per-track title, duration, lyrics, tags and cover image URLs, in the order of `files`.
  - `status` 'not_started' | 'processing' | 'finished' | 'failed' | 'expired', required: Current generation status
  - `error` string, nullable: Error information during generation
  - `createdAt` string, date-time, required: Generation creation time
  - `completedAt` string, date-time, required: Generation completion time
  - `duration` number, required: Generation duration time in ms
  - `cost` number, nullable, required: Generation cost in integer USD cents
  - `webhook` string, nullable: Callback URL the result was delivered to, as passed on creation. Null when the generation was created without one.

## Other responses

- `401`: Unauthorized - Invalid or missing API key
- `404`: Generation not found
- `500`: Internal Server Error - Server error occurred

---

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