Readme
Luma Reframe Image
Luma Reframe Image allows you to change the aspect ratio of any image using AI interpolation.
The photon-flash-1 model is used here for reframing images—expanding, shifting, or recontextualizing them while staying true to their visual style. It requires a few key inputs to work effectively. The generation_type must be set to “reframe_image”, and you must provide the model name (“photon-flash-1”), a target aspect_ratio like “16:9”, and a reframe_image object with a direct url to the image you want to modify.
With the real API, You can also include optional inputs to control the output more precisely. These include a prompt to guide the model’s interpretation, grid positions (grid_position_x, grid_position_y) for layout-aware generation, and crop coordinates (x_start, x_end, y_start, y_end) to define a specific area of focus. The format field lets you choose the image output type (default is jpg), and a callback_url can be used to receive updates about the generation’s status.