FLUX 3 Video API: Python Wrapper for Black Forest Labs' Text-to-Video & Image-to-Video

July 23, 2026 ยท View on GitHub

Powered by MuAPI

PyPI version GitHub stars License: MIT Python 3.7+

A focused Python wrapper for the FLUX 3 video API โ€” Black Forest Labs' unified multimodal frontier model, delivered via muapi.ai. Generate cinematic video clips with native synchronized audio from a text prompt (Text-to-Video) or from a static image (Image-to-Video), using the same architecture that jointly produces image, video, and audio.

๐ŸŒŒ FLUX 3 was announced by Black Forest Labs on July 23, 2026 as a unified multimodal frontier model โ€” one architecture generates image, video, and native synchronized audio, and extends to action-prediction for robotics. MuAPI activates each FLUX 3 endpoint automatically for existing API keys as Black Forest Labs opens general availability โ€” no separate waitlist required.

๐Ÿš€ Why Use the FLUX 3 Video API?

FLUX 3 is Black Forest Labs' unified multimodal frontier model โ€” the same weights that generate images also generate video and native synchronized audio in a single request.

  • Native Synchronized Audio: generate_audio produces dialogue, sound effects, and music matched to the visuals โ€” no separate audio pipeline required.
  • Text-to-Video & Image-to-Video: Generate a clip from a prompt alone, or animate an existing still image with physically consistent motion.
  • Unified Model Architecture: Same frontier model family as FLUX 3's image endpoints โ€” consistent visual style across image and video outputs.
  • Developer-First: Simple Python SDK backed by MuAPI's infrastructure โ€” one API key, five FLUX 3 endpoints (image and video).

๐ŸŒŸ Key Features

  • โœ… FLUX 3 Text-to-Video: Transform a text prompt into a cinematic video clip, 4โ€“10 seconds long.
  • โœ… FLUX 3 Image-to-Video: Animate a static image into a video clip using images_list, with motion physically consistent with the source frame.
  • โœ… Native Audio Generation: generate_audio=True produces synchronized voice, sfx, and music from the same generation call.
  • โœ… Flexible Resolutions: 480p, 720p, or 1080p output.
  • โœ… Flexible Aspect Ratios: 16:9, 9:16 (TikTok/Reels/Shorts), 1:1, 4:3, 3:4.
  • โœ… File Upload: Upload local images directly via upload_file for use as Image-to-Video start frames.

๐Ÿ›  Installation

pip install flux-3-video-api

From Source

# Clone the FLUX 3 Video API repository
git clone https://github.com/SamurAIGPT/flux-3-video-api.git
cd flux-3-video-api

# Install required dependencies
pip install -r requirements.txt

Configuration

Create a .env file in the root directory and add your MuAPI API key:

MUAPI_API_KEY=your_muapi_api_key_here

๐Ÿค– FLUX 3 Video MCP Server

You can use FLUX 3 video generation as an MCP (Model Context Protocol) server, so AI models (like Claude Desktop or Cursor) can directly invoke the tools.

Running the MCP Server

  1. Ensure MUAPI_API_KEY is set in your environment.
  2. Run the server:
    python3 mcp_server.py
    
  3. To test with the MCP Inspector:
    npx -y @modelcontextprotocol/inspector python3 mcp_server.py
    

๐Ÿ’ป Quick Start (Python)

from flux3_video_api import Flux3VideoAPI

# Initialize the FLUX 3 Video client
api = Flux3VideoAPI()

# 1. Generate Video from Text (Text-to-Video)
print("Generating AI video using FLUX 3...")
submission = api.text_to_video(
    prompt="A cinematic slow-motion shot of a cyberpunk city in the rain, neon lights reflecting on puddles",
    aspect_ratio="16:9",
    resolution="720p",
    duration=5,
    generate_audio=True,
)

# 2. Wait for completion
result = api.wait_for_completion(submission["request_id"])
print(f"Success! View your FLUX 3 video here: {result.get('outputs', [result.get('url')])}")
# 3. Animate a static image (Image-to-Video)
submission = api.image_to_video(
    prompt="The clouds drift slowly and the water ripples",
    images_list=["https://example.com/landscape.jpg"],
    aspect_ratio="16:9",
    resolution="720p",
    duration=5,
)
result = api.wait_for_completion(submission["request_id"])
print(result.get("outputs", [result.get("url")]))

๐Ÿ“ก API Endpoints & Reference

1. FLUX 3 Text-to-Video

Endpoint: POST https://api.muapi.ai/api/v1/flux-3-text-to-video

curl --location --request POST "https://api.muapi.ai/api/v1/flux-3-text-to-video" \
  --header "Content-Type: application/json" \
  --header "x-api-key: YOUR_API_KEY" \
  --data-raw '{
      "prompt": "A majestic eagle soaring over the snow-capped Himalayas",
      "aspect_ratio": "16:9",
      "resolution": "720p",
      "duration": 5,
      "generate_audio": true
  }'

2. FLUX 3 Image-to-Video

Endpoint: POST https://api.muapi.ai/api/v1/flux-3-image-to-video

curl --location --request POST "https://api.muapi.ai/api/v1/flux-3-image-to-video" \
  --header "Content-Type: application/json" \
  --header "x-api-key: YOUR_API_KEY" \
  --data-raw '{
      "prompt": "The clouds move slowly across the sky",
      "images_list": ["https://example.com/mountain.jpg"],
      "aspect_ratio": "16:9",
      "resolution": "720p",
      "duration": 5,
      "generate_audio": true
  }'

๐Ÿ“– Documentation & Guides

For prompt engineering and advanced use cases across the full FLUX 3 model family (image and video), see awesome-flux-3-api-prompts.

MethodParametersDescription
text_to_videoprompt, aspect_ratio, resolution, duration, generate_audioGenerate a video clip from a text prompt (4-10s), with optional native synchronized audio.
image_to_videoprompt, images_list, aspect_ratio, resolution, duration, generate_audioAnimate a static image into a video clip.
upload_filefile_pathUpload a local file (image or video) to MuAPI for use in generation tasks.
get_resultrequest_idCheck task status for a FLUX 3 video generation task.
wait_for_completionrequest_id, poll_interval, timeoutBlocking helper for FLUX 3 video generation tasks.

๐Ÿ”— Official Resources

๐Ÿ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.


Keywords: FLUX 3 Video API, FLUX 3 Text-to-Video, FLUX 3 Image-to-Video, Black Forest Labs Video AI, FLUX 3 Python SDK, MuAPI, AI Video Generation API, Text-to-Video API, Image-to-Video API, FLUX Video Generator, Native Audio Video Generation, Cinematic AI Video, FLUX 3 API Documentation.