---
title: "Upscale a generation"
method: POST
path: "/generations/{id}/upscale"
tags: ["Generations"]
---

# Upscale a generation

`POST /generations/{id}/upscale`

Upscale a generation by its ID

## Path parameters

- `id` string, required

## Request body

- UpscaleVideoGenerationRequest — The upscale generation request object
  - `generation_type` 'upscale_video'
  - `resolution` union
    - '540p' | '720p' | '1080p' | '4k'
    - string
  - `callback_url` string, uri — The callback URL for the upscale

## Response `200`

Generation upscaled

- Generation — The generation response object
  - `id` string, uuid — The ID of the generation
  - `generation_type` 'video' | 'image'
  - `state` 'queued' | 'dreaming' | 'completed' | 'failed' — The state of the generation
  - `failure_reason` string — The reason for the state of the generation
  - `created_at` string, date-time — The date and time when the generation was created
  - `assets` Assets — The assets of the generation
    - `video` string, uri — The URL of the video
    - `image` string, uri — The URL of the image
    - `progress_video` string, uri — The URL of the progress video
  - `model` string — The model used for the generation
  - `request` union — The request of the generation
    - GenerationRequest — The generation request object
      - `generation_type` 'video'
      - `prompt` string — 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
      - `loop` boolean — Whether to loop the video
      - `keyframes` Keyframes — The keyframes of the generation
        - `frame0` union — A keyframe can be either a Generation reference, an Image, or a Video
          - GenerationReference — The generation reference object
            - `type` 'generation', required
            - `id` string, uuid, required — The ID of the generation
          - ImageReference — The image object
            - `type` 'image', required
            - `url` string, uri, required — The URL of the image
        - `frame1` union — A keyframe can be either a Generation reference, an Image, or a Video
          - GenerationReference — The generation reference object
            - `type` 'generation', required
            - `id` string, uuid, required — The ID of the generation
          - ImageReference — The image object
            - `type` 'image', required
            - `url` string, uri, required — The URL of the image
      - `callback_url` string, uri — The callback URL of the generation, a POST request with Generation object will be sent to the callback URL when the generation is dreaming, completed, or failed
      - `model` 'ray-2' | 'ray-flash-2', required — The video model used for the generation
      - `resolution` union
        - '540p' | '720p' | '1080p' | '4k'
        - string
      - `duration` union
        - '5s' | '9s'
        - string
      - `concepts` Concept[] — The concepts of the generation
        - `key` string, required — The key of the concept
    - ImageGenerationRequest — The image generation request object
      - `generation_type` 'image'
      - `model` 'photon-1' | 'photon-flash-1', required — The image model used for the generation
      - `prompt` string — 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_url` string, uri — The callback URL for the generation
      - `image_ref` ImageRef[]
        - `url` string, uri — The URL of the image reference
        - `weight` number — The weight of the image reference
      - `style_ref` ImageRef[]
        - `url` string, uri — The URL of the image reference
        - `weight` number — The weight of the image reference
      - `character_ref` object
        - `identity0` ImageIdentity — The image identity object
          - `images` string[] — The URLs of the image identity
      - `modify_image_ref` ModifyImageRef — The modify image reference object
        - `url` string, uri — The URL of the image reference
        - `weight` number — The weight of the modify image reference
      - `sync` boolean — Create image in synchronous mode and return complated image
      - `sync_timeout` number — The timeout for the synchronous image generation
    - UpscaleVideoGenerationRequest — The upscale generation request object
      - `generation_type` 'upscale_video'
      - `resolution` union
        - '540p' | '720p' | '1080p' | '4k'
        - string
      - `callback_url` string, uri — The callback URL for the upscale
    - AudioGenerationRequest — The audio generation request object
      - `generation_type` 'add_audio'
      - `prompt` string — The prompt of the audio
      - `negative_prompt` string — The negative prompt of the audio
      - `callback_url` string, uri — The callback URL for the audio
    - ReframeImageRequest — The reframe image generation request object
      - `generation_type` 'reframe_image', required
      - `media` Media, required — The image entity object
        - `url` string, uri, required — The URL of the media
      - `model` 'photon-1' | 'photon-flash-1', required — The model used for the reframe image
      - `prompt` string — The prompt of the generation
      - `aspect_ratio` '1:1' | '16:9' | '9:16' | '4:3' | '3:4' | '21:9' | '9:21', required — The aspect ratio of the generation
      - `grid_position_x` integer — The x position of the image in the grid
      - `grid_position_y` integer — The y position of the image in the grid
      - `x_start` integer — The x start of the crop bounds
      - `x_end` integer — The x end of the crop bounds
      - `y_start` integer — The y start of the crop bounds
      - `y_end` integer — The y end of the crop bounds
      - `resized_width` integer — Resized width of source image
      - `resized_height` integer — Resized height of source image
      - `format` 'jpg' | 'png' — The format of the image
      - `callback_url` string, uri — The callback URL of the generation, a POST request with Generation object will be sent to the callback URL when the generation is dreaming, completed, or failed
    - ReframeVideoRequest — The reframe video generation request object
      - `generation_type` 'reframe_video', required
      - `media` Media, required — The image entity object
        - `url` string, uri, required — The URL of the media
      - `first_frame` Media — The image entity object
        - `url` string, uri, required — The URL of the media
      - `model` 'ray-2' | 'ray-flash-2', required — The model used for the reframe video
      - `prompt` string — The prompt of the generation
      - `aspect_ratio` '1:1' | '16:9' | '9:16' | '4:3' | '3:4' | '21:9' | '9:21', required — The aspect ratio of the generation
      - `grid_position_x` integer — The x position of the image in the grid
      - `grid_position_y` integer — The y position of the image in the grid
      - `x_start` integer — The x start of the crop bounds
      - `x_end` integer — The x end of the crop bounds
      - `y_start` integer — The y start of the crop bounds
      - `y_end` integer — The y end of the crop bounds
      - `resized_width` integer — Resized width of source video
      - `resized_height` integer — Resized height of source video
      - `callback_url` string, uri — The callback URL of the generation, a POST request with Generation object will be sent to the callback URL when the generation is dreaming, completed, or failed
    - ModifyVideoRequest — The modify video generation request object
      - `generation_type` 'modify_video', required
      - `media` Media, required — The image entity object
        - `url` string, uri, required — The URL of the media
      - `first_frame` Media — The image entity object
        - `url` string, uri, required — The URL of the media
      - `model` 'ray-2' | 'ray-flash-2', required — The model used for the modify video
      - `mode` 'adhere_1' | 'adhere_2' | 'adhere_3' | 'flex_1' | 'flex_2' | 'flex_3' | 'reimagine_1' | 'reimagine_2' | 'reimagine_3', required — The mode of the modify video
      - `prompt` string — The prompt of the generation
      - `callback_url` string, uri — The callback URL of the generation, a POST request with Generation object will be sent to the callback URL when the generation is dreaming, completed, or failed

## Other responses

- `default` — Error

---

[API](https://skmtc.net/lumalabs/apis/dream-machine-api.md) · [All operations](https://skmtc.net/lumalabs/apis/dream-machine-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/lumalabs/dream-machine-api/versions/d1f79351570e/schema)
