Generations
Image
Reframe

Reframe an image

Changed on

Reframe an image by its ID

post/generations/image/reframe

Request

  • Base URL
    https://api.lumalabs.ai/dream-machine/v1
  • Auth
    HTTP bearer

Request body

ReframeImageRequest required

The reframe image generation request object

generation_type, 'reframe_image' required
media, Media required

The image entity object

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

Example request

{
  "aspect_ratio": "16:9"
}

Response

Image reframed

Generation required

The generation response object

id, string uuid

The ID of the generation

generation_type, 'video' | 'image'

The type of the generation

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

model, string

The model used for the generation

request, union

The request of 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"
      }
    }
  }
}

Changes