v31

latestOpenAPI 3.1.0Proprietaryraw.githubusercontent.com2026-01-07133341.7 KB
Generations
Image

Generate an image

Generate an image with the provided prompt

post/generations/image

Request body

generation_type'image'
model'photon-1' | 'photon-flash-1' required

The image model used for the generation

promptstring

The prompt of the generation

aspect_ratio'1:1' | '16:9' | '9:16' | '4:3' | '3:4' | '21:9' | '9:21'

The aspect ratio of the generation

format'jpg' | 'png'

The format of the image

callback_urlstring uri

The callback URL for the generation

syncboolean

Create image in synchronous mode and return complated image

sync_timeoutnumber

The timeout for the synchronous image generation

Example request

{
  "aspect_ratio": "16:9"
}

Response

Image generated

idstring uuid

The ID of the generation

generation_type'video' | 'image'
state'queued' | 'dreaming' | 'completed' | 'failed'

The state of the generation

failure_reasonstring

The reason for the state of the generation

created_atstring date-time

The date and time when the generation was created

modelstring

The model used for the generation

Example response

{
  "id": "123e4567-e89b-12d3-a456-426614174000",
  "state": "completed",
  "failure_reason": null,
  "created_at": "2023-06-01T12:00:00Z",
  "assets": {
    "video": "https://example.com/video.mp4"
  },
  "model": "ray-2",
  "request": {
    "prompt": "A serene lake surrounded by mountains at sunset",
    "aspect_ratio": "16:9",
    "loop": true,
    "keyframes": {
      "frame0": {
        "type": "image",
        "url": "https://example.com/image.jpg"
      },
      "frame1": {
        "type": "generation",
        "id": "123e4567-e89b-12d3-a456-426614174000"
      }
    }
  }
}