> ## Documentation Index
> Fetch the complete documentation index at: https://docs.bfl.ml/llms.txt
> Use this file to discover all available pages before exploring further.

# FLUX Video Edit

> Edit an existing clip with a prompt: remove, add or replace objects, change the setting, restyle, change text or dialogue.

Send FLUX Video Edit \[fast] a clip and say what should be different. Everything the prompt doesn't
mention stays as shot: length, framing, camera, timing and audio all come from
the source.

## Twelve edits on one clip

Every clip here started as the same ten seconds at the harbor. Pick an edit,
stack a few more on top, and turn on the pixel overlay to see what moved.

Harbor

Edited

## Quick start

Editing a clip is one POST and a poll: send the clip as an HTTP(S) URL or
base64 in `video` and the instruction in `prompt`, then fetch the result from
the `polling_url` you get back.

```bash cURL theme={null}
# Submit a clip by URL (or send a base64-encoded mp4 in video instead)
curl -sS -X POST "https://api.bfl.ai/v1/flux-tools/video-edit-v1" \
  -H "Content-Type: application/json" \
  -H "x-key: $BFL_API_KEY" \
  -d '{
    "video": "https://cdn.sanity.io/files/2gpum2i6/production/f1654af36e7694775939b1aa8a2bb0419ff819ea.mp4",
    "prompt": "Remove the orange bucket."
  }'

# Poll the polling_url from the response until status is "Ready"
curl -sS "https://api.bfl.ai/v1/get_result?id=YOUR_TASK_ID" \
  -H "x-key: $BFL_API_KEY"
```

```python Python theme={null}
import os, time, requests

BFL_API_KEY = os.environ["BFL_API_KEY"]

# 1. Submit: returns an id and a polling_url
submit = requests.post(
    "https://api.bfl.ai/v1/flux-tools/video-edit-v1",
    headers={"x-key": BFL_API_KEY, "Content-Type": "application/json"},
    json={
        "video": "https://cdn.sanity.io/files/2gpum2i6/production/f1654af36e7694775939b1aa8a2bb0419ff819ea.mp4",
        "prompt": "Remove the orange bucket.",
    },
).json()

# 2. Poll the returned URL until the job is Ready
while True:
    time.sleep(5)
    result = requests.get(submit["polling_url"], headers={"x-key": BFL_API_KEY}).json()
    if result["status"] == "Ready":
        print(result["result"]["sample"])   # signed .mp4 URL
        break
    if result["status"] in ("Error", "Request Moderated", "Content Moderated"):
        raise RuntimeError(result["status"])
```

The submit call returns the task id and the URL to poll:

```json theme={null}
{
  "id": "a770da3b-1f6c-4ac8-a0f4-c0d216550e14",
  "polling_url": "https://api.bfl.ai/v1/get_result?id=a770da3b-1f6c-4ac8-a0f4-c0d216550e14"
}
```

While the clip renders, polls come back with `"status": "Pending"`. When it
flips to `Ready`, `result.sample` is a signed URL to the edited mp4.

> [!WARNING]
>
> Signed delivery URLs expire about **1 hour** after the result is ready. Download your video within this timeframe.

`Error`, `Request Moderated`, and `Content Moderated` are terminal: stop polling and check the payload. The [Errors reference](https://docs.bfl.ml/api_integration/errors.md) lists every status.

## Request parameters

Use `video` and `prompt` as the minimum payload. Nothing else is required.

| Parameter | Type | Required | Description |
| - | - | - | - |
| `video` | string | Yes | The clip to edit: an HTTP(S) URL or a base64-encoded mp4, up to 15 seconds and 50 MiB. Each side at least 160 pixels, and at least 17 frames after normalization to 24 fps, about 0.7 seconds |
| `prompt` | string | Yes | The edit to make, 1 to 4,096 characters |
| `safety_tolerance` | integer | No | `0-4`, defaults to `2`. Moderation strictness for the prompt and the delivered frames |

Nothing else is accepted: `mode`, `version`, `seed`, `duration`, `resolution`,
`aspect_ratio` and `generate_audio` return HTTP 422. Length, aspect ratio and
frame rate come from the source, at 24 fps, and sources larger than 720p are
downscaled to 720p: the 1920 × 1088 harbor clip came back at 1248 × 704. Source
audio is carried through unless the prompt asks for a dialogue or sound change.
A silent source returns a silent result.

## Pricing

Editing is priced per second of output video. The output keeps the source
clip's length, so a ten second clip costs the same whatever the edit.

| Variant | Price |
| - | - |
| FLUX Video Edit \[fast] |  per second |

Example: one edit of a 10-second clip is . See the [pricing page](https://docs.bfl.ml/quick_start/pricing.md#flux-tools-video) for the full rate card.

## Limitations

* Sources longer than 15 seconds are rejected, not trimmed. Sources with fewer than 17 frames or a side under 160 pixels fail during processing.
* Duration, resolution and aspect ratio follow the source and cannot be set. Sources larger than 720p are downscaled to 720p.
* A video as a style or motion reference, image input, audio-only input, masks and extending a clip are not supported. Use [video continuation](https://docs.bfl.ml/flux_3/flux3_video.md#video-continuation) to extend.
* Asking for more words than the source's speech has time for won't render them all. Write new dialogue to the length of the line it replaces.

## Related pages

> [card] [Video Editing prompting guide](https://docs.bfl.ml/guides/prompting_video_editing.md)
>
> How to word an edit: placement, dialogue length, blockouts, settings and restyles, with clips.

> [card] [Video Prompting Overview](https://docs.bfl.ml/guides/prompting_video_overview.md)
>
> Choose the right workflow across every FLUX 3 video mode.

> [card] [FLUX Video Edit API](https://docs.bfl.ml/api-reference/tools/video-edit.md)
>
> Request fields, response shape and polling for the editing tool.

> [card] [FLUX 3 Video](https://docs.bfl.ml/flux_3/flux3_video.md)
>
> Text-to-video, image-to-video with keyframes and video continuation.

> [card] [FLUX Video Upscale](https://docs.bfl.ml/flux_tools/flux_video_upscale.md)
>
> Sharpen an edited clip up to 4K afterwards.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.