> ## 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.

# Edit a video

> Submits a video edit task: the supplied clip is transformed according to the edit instruction. Duration, resolution, aspect ratio, and audio follow the source clip; inference controls are pinned server-side.

<RequestExample>
  ```bash Edit a video theme={null}
  curl --request POST \
    --url https://api.bfl.ai/v1/flux-tools/video-edit-v1 \
    --header "x-key: $BFL_API_KEY" \
    --header "Content-Type: application/json" \
    --data '{
    "video": "https://cdn.sanity.io/files/2gpum2i6/production/f1654af36e7694775939b1aa8a2bb0419ff819ea.mp4",
    "prompt": "Remove the orange bucket."
  }'
  ```
</RequestExample>

Send a source `video` and an edit `prompt` to FLUX Video Edit. This is a
FLUX Tools endpoint, separate from `/v1/flux-3-video`; do not send a `mode`.

## Retrieve the edited clip

The submission returns an `id` and a `polling_url`. Poll that URL while `status`
is `Pending`, `Reasoning`, or `Generating`. Polling does not require an API key.
When `status` is `Ready`, download the video from `result.sample`.
Do not send the API key to the video download URL.

Stop on `Request Moderated`, `Content Moderated`, `Error`, or `Task not found`.
Requests to use the clip as a reference for a new video or to extend it fail
with HTTP 422, `status: "Error"`, and an explanation in `details.error`.
Use [video continuation](/flux_3/flux3_video#video-continuation)
for extension.

A polling HTTP 503 with `Retry-After` means to wait and retry the same URL,
not submit another generation. Download completed results promptly; their
signed URLs expire after about one hour.

## Limits and pricing

Input limits, output behavior and pricing are on the
[FLUX Video Edit page](/flux_tools/flux_video_edit#request-parameters), with a
[quick start](/flux_tools/flux_video_edit#quick-start) that submits and polls.


## OpenAPI

````yaml https://api.bfl.ai/openapi.json POST /v1/flux-tools/video-edit-v1
openapi: 3.1.0
info:
  title: BFL API
  description: Authorize with an API key from your user profile.
  version: 0.0.1
servers:
  - url: https://api.bfl.ai
    description: BFL API
security: []
tags:
  - name: Models
    description: >-
      Generation task endpoints. These endpoints allow you to submit generation
      tasks.
  - name: Utility
    description: >-
      These utility endpoints allow you to check the results of submitted tasks
      and to manage your finetunes.
paths:
  /v1/flux-tools/video-edit-v1:
    post:
      tags:
        - Models
      summary: Edit a video with FLUX 3.
      description: >-
        Submits a video edit task: the supplied clip is transformed according to
        the edit instruction. Duration, resolution, aspect ratio, and audio
        follow the source clip; inference controls are pinned server-side.
      operationId: generate_flux_tools_video_edit_v1_v1_flux_tools_video_edit_v1_post
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Flux3VideoVE2VNamedInputs'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                anyOf:
                  - $ref: '#/components/schemas/AsyncResponse'
                  - $ref: '#/components/schemas/AsyncWebhookResponse'
                title: >-
                  Response Generate Flux Tools Video Edit V1 V1 Flux Tools Video
                  Edit V1 Post
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - APIKeyHeader: []
components:
  schemas:
    Flux3VideoVE2VNamedInputs:
      properties:
        user:
          anyOf:
            - type: string
              maxLength: 256
              minLength: 1
            - type: 'null'
          title: User
          description: Opaque identifier for the end user supplied by the calling platform.
        video:
          type: string
          title: Video
          description: The video to edit, an http(s) URL or base64-encoded mp4.
        prompt:
          type: string
          maxLength: 4096
          minLength: 1
          title: Prompt
          description: Edit instruction, stripped of surrounding whitespace.
        safety_tolerance:
          type: integer
          maximum: 4
          minimum: 0
          title: Safety Tolerance
          description: >-
            Tolerance level for input and output harm moderation. Between 0 and
            4, with 0 the strictest. Sexual content is limited to level 3 and
            hate content to level 2 regardless of the requested tolerance.
          default: 2
      additionalProperties: false
      type: object
      required:
        - video
        - prompt
      title: Video Edit
      description: >-
        Video edit on a dedicated route: the clip and the instruction.


        The public `/flux-tools/video-edit-v1` body. The route pins the recipe,
        so

        the body has no `mode` and no `version` to pick, and every serving
        control

        -- duration, resolution, aspect ratio, audio, steps, guidance, seed --

        stays server-pinned.
    AsyncResponse:
      properties:
        id:
          type: string
          title: Id
        polling_url:
          type: string
          title: Polling Url
        cost:
          anyOf:
            - type: number
            - type: 'null'
          title: Cost
          description: Cost in credits for this request
        input_mp:
          anyOf:
            - type: number
            - type: 'null'
          title: Input Mp
          description: Input megapixels (2 decimal places)
        output_mp:
          anyOf:
            - type: number
            - type: 'null'
          title: Output Mp
          description: Output megapixels (2 decimal places)
      type: object
      required:
        - id
        - polling_url
      title: AsyncResponse
    AsyncWebhookResponse:
      properties:
        id:
          type: string
          title: Id
        status:
          type: string
          title: Status
        webhook_url:
          type: string
          title: Webhook Url
        cost:
          anyOf:
            - type: number
            - type: 'null'
          title: Cost
          description: Cost in credits for this request
        input_mp:
          anyOf:
            - type: number
            - type: 'null'
          title: Input Mp
          description: Input megapixels (2 decimal places)
        output_mp:
          anyOf:
            - type: number
            - type: 'null'
          title: Output Mp
          description: Output megapixels (2 decimal places)
      type: object
      required:
        - id
        - status
        - webhook_url
      title: AsyncWebhookResponse
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    APIKeyHeader:
      type: apiKey
      in: header
      name: x-key

````

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