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

idstring required

Generation identifier

Response

Generation object

taskIdstring 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

inputstring nullable required

Generation input parameters

outputobject 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

errorstring nullable

Error information during generation

createdAtstring date-time required

Generation creation time

completedAtstring date-time required

Generation completion time

durationnumber required

Generation duration time in ms

costnumber nullable required

Generation cost in integer USD cents

webhookstring nullable

Callback URL the result was delivered to, as passed on creation. Null when the generation was created without one.

Example response

{
  "files": [
    {
      "fileUrl": "https://s3.api-stock.com/generated/image-abc123.jpg",
      "fileType": "image"
    }
  ],
  "cost": 15075
}

Changes

No recorded changes to this operation across all 1 revision of this API.