---
updatedAt: 2026-07-10T19:01:19.000Z
agentTools:
  projectIndex: https://docs.lumalabs.ai/llms.txt
---

# Modify Video

<Callout icon="🚀" theme="default">
  ### Looking for the latest Luma API?

  Create and manage API access in the [Luma API Platform](https://platform.lumalabs.ai/). For current API guides and reference, visit the [Luma Agents API documentation](https://docs.agents.lumalabs.ai/).
</Callout>

<Embed url="https://www.youtube.com/watch?v=3j5Mo15RmS0" title="Luma AI - Introducing Modify Video" favicon="https://www.youtube.com/favicon.ico" image="https://i.ytimg.com/vi/3j5Mo15RmS0/hqdefault.jpg" provider="youtube.com" href="https://www.youtube.com/watch?v=3j5Mo15RmS0" typeOfEmbed="youtube" html="%3Ciframe%20class%3D%22embedly-embed%22%20src%3D%22%2F%2Fcdn.embedly.com%2Fwidgets%2Fmedia.html%3Fsrc%3Dhttps%253A%252F%252Fwww.youtube.com%252Fembed%252F3j5Mo15RmS0%253Ffeature%253Doembed%26display_name%3DYouTube%26url%3Dhttps%253A%252F%252Fwww.youtube.com%252Fwatch%253Fv%253D3j5Mo15RmS0%26image%3Dhttps%253A%252F%252Fi.ytimg.com%252Fvi%252F3j5Mo15RmS0%252Fhqdefault.jpg%26type%3Dtext%252Fhtml%26schema%3Dyoutube%22%20width%3D%22854%22%20height%3D%22480%22%20scrolling%3D%22no%22%20title%3D%22YouTube%20embed%22%20frameborder%3D%220%22%20allow%3D%22autoplay%3B%20fullscreen%3B%20encrypted-media%3B%20picture-in-picture%3B%22%20allowfullscreen%3D%22true%22%3E%3C%2Fiframe%3E" />

### Now available in API & SDKs

| Models      | Max Duration | Max Size |
| :---------- | :----------- | :------- |
| ray-2       | 10s          | 100 mb   |
| ray-flash-2 | 15s          | 100mb    |

### API Reference

[image](https://docs.lumalabs.ai/reference/reframeimage)

[video](https://docs.lumalabs.ai/reference/reframevideo)

### Basic Usage

* prompt: text value to guide how to modify the video
* media.url: url of the video file
* first\_frame.url: optional (but preferred) provide the first frame of the modified video (to guide it)
* mode: adhere\_1, adhere\_2, adhere\_3, flex\_1, flex\_2, flex\_3, reimagine\_1, reimagine\_2, reimagine\_3
* model: ray-2, ray-flash-2

### Pricing

| Model       | Cost                      |
| :---------- | :------------------------ |
| ray-2       | $0.01582 / million pixels |
| ray-flash-2 | $0.00544 / million pixels |

Example

| Config                      | Cost  |
| :-------------------------- | :---- |
| ray-2, 720p, 5s, 16:9       | $1.75 |
| ray-flash-2, 720p, 5s, 16:9 | $0.60 |

[learn more](https://docs.agents.lumalabs.ai/guides/pricing/)

### Example

```json
{
    "prompt": "you can direct how to modify the video by providing a text prompt here",
    "media": {
        "url": "https://example.com/video.mp4"
    },
    "first_frame": {
        "url": "https://example.com/image.png"
    },
    "mode": "flex_1",
    "model": "ray-2" # or ray-flash-2
}
```

### Modes

a) Adhere — The output adheres very closely to the source video. This is ideal for subtle enhancements, minor retexturing, or applying a light stylistic filter without drastically altering the original content.

b) Flex —  The output flexibly adheres somewhat to the shapes, characters, and details of the source video. This range allows for more significant stylistic changes while still maintaining recognizable elements from the original footage.

c) Reimagine —  The output adheres much more loosely to the source video. This setting is best for fundamentally changing the world and style to something entirely new, even transforming the characters or objects into completely different forms.

### What can I achieve with Modify Video?

Preserve full-body motion and facial performance, including choreography, lip sync, and nuanced expression

Restyle or retexture the entire shot, from turning live-action into CG or stylized animation, to changing wardrobe, props, or the overall aesthetic

Swap environments or time periods, giving you control over background, location, or even weather

Edit at the element level, like isolating just the outfit, face, or prop — or adding generative FX (smoke, fire, water, etc.) on top

### API Reference

<https://docs.lumalabs.ai/reference/modifyvideo>