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

# Generate a video with FLUX 3

> Generate videos with FLUX 3 in BFL official format. Supports text-to-video, image/keyframe-to-video, video continuation, and draft enhance workflows. <a href='https://docs.bfl.ai/api-reference/utility/generate-a-video-with-flux-3' target='_blank'>Official documentation</a>



## OpenAPI

````yaml openapi/en/flux.json POST /bfl/v1/flux-3-video
openapi: 3.1.0
info:
  title: Flux API DOCS
  version: 1.0.0
  description: >-
    TTAPI Flux API service, currently integrating the most advanced video large
    model Sora2.
servers:
  - url: https://api.ttapi.io
security: []
paths:
  /bfl/v1/flux-3-video:
    post:
      description: >-
        Generate videos with FLUX 3 in BFL official format. Supports
        text-to-video, image/keyframe-to-video, video continuation, and draft
        enhance workflows. <a
        href='https://docs.bfl.ai/api-reference/utility/generate-a-video-with-flux-3'
        target='_blank'>Official documentation</a>
      requestBody:
        required: true
        content:
          application/json:
            schema:
              oneOf:
                - title: Text to Video
                  type: object
                  properties:
                    prompt:
                      type: string
                      description: Free-form prompt describing the video.
                    mode:
                      type: string
                      description: 'Allowed value: "t2v"'
                      default: t2v
                    aspect_ratio:
                      type: string
                      description: >-
                        Output aspect ratio. auto lets the harness choose from
                        the prompt and any references.
                      default: auto
                      enum:
                        - auto
                        - '21:9'
                        - '2:1'
                        - '16:9'
                        - '4:3'
                        - '1:1'
                        - '3:4'
                        - '9:16'
                    duration:
                      oneOf:
                        - type: integer
                          minimum: 5
                          maximum: 20
                        - type: string
                          enum:
                            - auto
                      description: >-
                        Video duration in seconds (any whole second from 5 to
                        20), or auto to fit the content.
                      default: auto
                    resolution:
                      type: string
                      description: >-
                        Video resolution class: hd, or fhd for a
                        higher-resolution result finished by the video
                        upsampler. Exact dimensions vary with the aspect ratio.
                      default: hd
                      enum:
                        - hd
                        - fhd
                    version:
                      type: string
                      description: Endpoint version. `latest` serves the current release.
                      example: latest
                      enum:
                        - latest
                    generate_audio:
                      type: boolean
                      description: Generate synchronized audio alongside the video.
                      default: true
                    safety_tolerance:
                      type: integer
                      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. Contextual safety
                        signals can tighten the requested level.
                      minimum: 0
                      maximum: 4
                      default: 2
                    draft:
                      type: boolean
                      description: >-
                        Draft mode: generate a fast preview and return a
                        draft_cache download URL in the result. Download that
                        bundle and pass it back later to render the full-quality
                        version of the same generation.
                      default: false
                    webhook_url:
                      type: string
                      description: >-
                        TTAPI asynchronous callback URL. The initial response
                        returns `jobId`; use this callback or the Flux fetch
                        endpoint to receive the final video result.
                  required:
                    - mode
                    - prompt
                - title: Image to Video
                  description: >-
                    Image continuation: your images become frames of the video.
                    One image

                    starts the video; two start and end it; with more, the first
                    starts it,

                    the last ends it, and the rest fall evenly in between. To
                    control the

                    timing yourself, send [seconds, image] pairs: each image
                    becomes the

                    frame at that second.
                  type: object
                  properties:
                    prompt:
                      type: string
                      description: Free-form prompt describing the video.
                    mode:
                      type: string
                      description: 'Allowed value: "i2v"'
                      default: i2v
                    keyframes:
                      oneOf:
                        - type: string
                        - type: array
                      description: >-
                        Your images become frames of the video; each is an
                        http(s) URL or base64, one to ten total. Plain images:
                        one starts the video, two start and end it, with more
                        the first starts it, the last ends it, and the rest fall
                        evenly in between (3 or more need a set duration). To
                        control the timing yourself, send [seconds, image] pairs
                        in time order, e.g. [[0, "..."], [3.5, "..."]]: each
                        image becomes the frame at that second, and with
                        duration: "auto" the video runs to the last pair's
                        second, rounded up (20s max).
                    aspect_ratio:
                      type: string
                      description: >-
                        Output aspect ratio. auto lets the harness choose from
                        the prompt and any references.
                      default: auto
                      enum:
                        - auto
                        - '21:9'
                        - '2:1'
                        - '16:9'
                        - '4:3'
                        - '1:1'
                        - '3:4'
                        - '9:16'
                    duration:
                      oneOf:
                        - type: integer
                          minimum: 5
                          maximum: 20
                        - type: string
                          enum:
                            - auto
                      description: >-
                        Video duration in seconds (any whole second from 5 to
                        20), or auto to fit the content.
                      default: auto
                    resolution:
                      type: string
                      description: >-
                        Video resolution class: hd, or fhd for a
                        higher-resolution result finished by the video
                        upsampler. Exact dimensions vary with the aspect ratio.
                      default: hd
                      enum:
                        - hd
                        - fhd
                    version:
                      type: string
                      description: Endpoint version. `latest` serves the current release.
                      example: latest
                      enum:
                        - latest
                    generate_audio:
                      type: boolean
                      description: Generate synchronized audio alongside the video.
                      default: true
                    safety_tolerance:
                      type: integer
                      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. Contextual safety
                        signals can tighten the requested level.
                      minimum: 0
                      maximum: 4
                      default: 2
                    draft:
                      type: boolean
                      description: >-
                        Draft mode: generate a fast preview and return a
                        draft_cache download URL in the result. Download that
                        bundle and pass it back later to render the full-quality
                        version of the same generation.
                      default: false
                    webhook_url:
                      type: string
                      description: >-
                        TTAPI asynchronous callback URL. The initial response
                        returns `jobId`; use this callback or the Flux fetch
                        endpoint to receive the final video result.
                  required:
                    - mode
                    - prompt
                    - keyframes
                - title: Video Continuation
                  description: >-
                    Video continuation: the generated clip carries on from your
                    video's

                    final frames.
                  type: object
                  properties:
                    prompt:
                      type: string
                      description: Free-form prompt describing the video.
                    mode:
                      type: string
                      description: 'Allowed value: "v2v"'
                      default: v2v
                    start_video:
                      type: string
                      description: >-
                        The video to continue, an http(s) URL or base64 mp4; the
                        generated clip carries on from its final frames.
                    aspect_ratio:
                      type: string
                      description: >-
                        Output aspect ratio. auto lets the harness choose from
                        the prompt and any references.
                      default: auto
                      enum:
                        - auto
                        - '21:9'
                        - '2:1'
                        - '16:9'
                        - '4:3'
                        - '1:1'
                        - '3:4'
                        - '9:16'
                    duration:
                      oneOf:
                        - type: integer
                          minimum: 5
                          maximum: 20
                        - type: string
                          enum:
                            - auto
                      description: >-
                        Video duration in seconds (any whole second from 5 to
                        20), or auto to fit the content.
                      default: auto
                    resolution:
                      type: string
                      description: >-
                        Video resolution class: hd, or fhd for a
                        higher-resolution result finished by the video
                        upsampler. Exact dimensions vary with the aspect ratio.
                      default: hd
                      enum:
                        - hd
                        - fhd
                    version:
                      type: string
                      description: Endpoint version. `latest` serves the current release.
                      example: latest
                      enum:
                        - latest
                    generate_audio:
                      type: boolean
                      description: Generate synchronized audio alongside the video.
                      default: true
                    safety_tolerance:
                      type: integer
                      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. Contextual safety
                        signals can tighten the requested level.
                      minimum: 0
                      maximum: 4
                      default: 2
                    draft:
                      type: boolean
                      description: >-
                        Draft mode: generate a fast preview and return a
                        draft_cache download URL in the result. Download that
                        bundle and pass it back later to render the full-quality
                        version of the same generation.
                      default: false
                    webhook_url:
                      type: string
                      description: >-
                        TTAPI asynchronous callback URL. The initial response
                        returns `jobId`; use this callback or the Flux fetch
                        endpoint to receive the final video result.
                  required:
                    - mode
                    - prompt
                    - start_video
                - title: Draft Enhance
                  description: >-
                    Full-quality render of a prior draft generation. The bundle
                    pins the

                    generation itself -- the original mode, prompt, seed, and
                    conditioning

                    media -- so resolution is the only output choice left to the
                    caller.
                  type: object
                  properties:
                    mode:
                      type: string
                      description: 'Allowed value: "draft_enhance"'
                      default: draft_enhance
                    draft_cache:
                      type: string
                      description: >-
                        Encrypted draft-cache bundle from a prior draft
                        generation. Primary form: the base64-encoded .bin file
                        downloaded from the prior result's draft_cache URL. An
                        http(s) URL is also accepted for replays within the
                        download URL's expiry window. The harness is skipped and
                        the original FLUX call is reproduced at full quality;
                        the original inputs are embedded in the bundle.
                    resolution:
                      type: string
                      description: >-
                        Video resolution class of the enhanced result: fhd
                        (default) finishes the reproduced generation with the
                        video upsampler, hd returns it without that pass. The
                        reproduced generation is identical either way; only the
                        finishing pass differs.
                      default: fhd
                      enum:
                        - hd
                        - fhd
                    safety_tolerance:
                      type: integer
                      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. Contextual safety
                        signals can tighten the requested level.
                      minimum: 0
                      maximum: 4
                      default: 2
                    webhook_url:
                      type: string
                      description: >-
                        TTAPI asynchronous callback URL. The initial response
                        returns `jobId`; use this callback or the Flux fetch
                        endpoint to receive the final video result.
                  required:
                    - mode
                    - draft_cache
      responses:
        '200':
          $ref: '#/components/responses/SuccessResponse'
        '400':
          $ref: '#/components/responses/400Response'
        '401':
          $ref: '#/components/responses/401Response'
      security:
        - CustomApiKey: []
components:
  responses:
    SuccessResponse:
      description: Request successful
      content:
        application/json:
          schema:
            type: object
            properties:
              status:
                type: string
                example: SUCCESS
              message:
                type: string
                example: success
              data:
                type: object
                example:
                  jobId: jobId
            required:
              - status
              - message
              - data
    400Response:
      description: Parameter error
      content:
        application/json:
          schema:
            type: object
            properties:
              status:
                type: string
                example: FAILED
              message:
                type: string
                example: '"prompt" cannot be empty.'
              data:
                type: object
            required:
              - status
              - message
    401Response:
      description: Authorization failed
      content:
        application/json:
          schema:
            type: object
            properties:
              status:
                type: string
                example: FAILED
              message:
                type: string
                example: Wrong TT-API-KEY or email is not activated.
            required:
              - status
              - message
  securitySchemes:
    CustomApiKey:
      type: apiKey
      in: header
      name: TT-API-KEY
      description: >-
        You can obtain your API key from the <a
        href='https://dashboard.ttapi.io' target='_blank'>TTAPI Dashboard</a>.

````