Reframe

🚀

Looking for the latest Luma API?

Create and manage API access in the Luma API Platform. For current API guides and reference, visit the Luma Agents API documentation.

Now available in API & SDKs

ModelsMax DurationMax Size
ray-210s100 mb
ray-flash-230s100 mb
photon-1n/a10 mb
photon-flash-1n/a10 mb

API Reference

image

video

Basic Usage

  • by default one can just pass the url of image/video to reframe with
    • model
    • target aspect ratio
  • it fits the image horizontally and vertically and make a new video/image
  • optionally provide prompts on how to steer what content goes into the reframed new area
  • target width and height are standard based on chosen aspect ratio

Pricing

Same as cost of the models (ray-2, ray-flash-2, photon-1, photon-flash-1)

learn more

Advanced Usage

aspect_ratio_map = {
    "1:1": [1536, 1536],
    "4:3": [1792, 1344],
    "3:4": [1344, 1792],
    "16:9": [2048, 1152],
    "9:16": [1152, 2048],
    "21:9": [2432, 1024],
    "9:21": [1024, 2432],
}
aspect_ratio_map = {
    "1:1": [1024, 1024],
    "4:3": [1152, 864],
    "3:4": [864, 1152],
    "16:9": [1280, 720],
    "9:16": [720, 1280],
    "21:9": [1552, 656],
    "9:21": [656, 1552],
}

grid_position_x, grid_position_y, x_start, x_end, y_start, y_end, resized_width, resized_height are in pixel values.


Did this page help you?