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
| Models | Max Duration | Max Size |
|---|---|---|
| ray-2 | 10s | 100 mb |
| ray-flash-2 | 30s | 100 mb |
| photon-1 | n/a | 10 mb |
| photon-flash-1 | n/a | 10 mb |
API Reference
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)
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.
Updated 10 days ago
Did this page help you?