RepositoryPython
Anil-matcha

Anil-matcha/Flux-3-Dev-API

Python wrapper for Black Forest Labs' FLUX 3 Dev API, available now — fast, low-cost FLUX 3 variant, plus the full FLUX 3 family (Text-to-Image, Image-to-Image, Text-to-Video, Image-to-Video).

183stars
52forks
0issues
1views

Featured achievements

The project's latest awards

1
TINIX TRENDING·Topic: flux-3-api

#1 Repository of the week

1
TINIX TRENDING·Topic: ai-image

#1 Repository of the month

1
TINIX TRENDING·Topic: black-forest-labs

#1 Repository of the week

FLUX 3 Dev API: Python Wrapper for Black Forest Labs' Fast, Low-Cost FLUX 3 Variant

Powered by MuAPI

PyPI version GitHub stars License: MIT Python 3.7+

A Python wrapper for FLUX 3 Dev — the faster, lower-cost variant of Black Forest Labs' newly announced FLUX 3 frontier model — delivered via muapi.ai. FLUX 3 Dev trades a small amount of peak fidelity for significantly reduced latency and cost, making it ideal for rapid iteration, prototyping, and high-volume generation — with a planned open-weight release later in 2026. This SDK also covers the full FLUX 3 family (flagship Text-to-Image, Image-to-Image editing, Text-to-Video, and Image-to-Video), all through the same client.

⚠️ Status: FLUX 3 is rolling out in phases. Black Forest Labs announced FLUX 3 on July 23, 2026. FLUX 3 Video and Action entered early access immediately; FLUX 3 Image (including Dev) is rolling out in the following weeks. Endpoints in this SDK will activate automatically on MuAPI as Black Forest Labs opens general availability — no code changes needed. Track live status at muapi.ai/flux-3.

🚀 Why Use FLUX 3 Dev?

FLUX 3 is Black Forest Labs' newest frontier model — a unified multimodal system jointly trained across image, video, and audio, extendable to action prediction for robotics. FLUX 3 Dev is its fast, affordable entry point:

  • Lower Latency & Cost: Trades a small amount of peak fidelity from the flagship model for significantly faster, cheaper generation.
  • Same Prompting Conventions: Uses the same prompt structure as flagship FLUX 3 — validate ideas cheaply, then re-run on the full model if needed.
  • Planned Open-Weight Release: Black Forest Labs has confirmed a faster, open-weight version of FLUX 3 is coming later in 2026.
  • Full FLUX 3 Family Access: This SDK also wraps FLUX 3 Text-to-Image, Image-to-Image, Text-to-Video, and Image-to-Video — one client for the whole model family.
  • Native Audio in Video: FLUX 3 Video variants can generate scene-appropriate synchronized audio directly alongside the clip.
  • Developer-First: Simple Python SDK on top of MuAPI's unified infrastructure — no separate account or waitlist needed once you have a MuAPI key.

🌟 Key Features

  • ✅ FLUX 3 Dev Text-to-Image: Fast, low-cost image generation via generate().
  • ✅ FLUX 3 Text-to-Image: Flagship higher-fidelity image generation via text_to_image().
  • ✅ FLUX 3 Image-to-Image: Instruction-driven editing with up to 4 reference images via image_to_image().
  • ✅ FLUX 3 Text-to-Video: Cinematic video with optional native synchronized audio via text_to_video().
  • ✅ FLUX 3 Image-to-Video: Animate a still image into video with optional native audio via image_to_video().
  • ✅ File Upload: Upload local images/videos directly using upload_file().
  • ✅ MCP Server: Use FLUX 3 Dev as a Model Context Protocol server for Claude Desktop, Cursor, and other MCP clients.

🛠 Installation

pip install flux-3-dev-api

From Source

git clone https://github.com/Anil-matcha/Flux-3-Dev-API.git
cd Flux-3-Dev-API
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 Dev MCP Server

Use FLUX 3 Dev as an MCP (Model Context Protocol) server so AI clients (like Claude Desktop or Cursor) can directly invoke FLUX 3 generation 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_dev_api import Flux3DevAPI

# Initialize the client
api = Flux3DevAPI()

# Generate an image with FLUX 3 Dev
print("Generating image with FLUX 3 Dev...")
submission = api.generate(
    prompt="A minimalist product shot of a ceramic mug on a wooden table, soft natural light",
    aspect_ratio="1:1",
    resolution="1k"
)

# Wait for completion
result = api.wait_for_completion(submission["request_id"])
print(f"Success! Output: {result['outputs'][0]}")

📡 API Endpoints & Reference

1. FLUX 3 Dev (Text-to-Image, fast/low-cost)

Endpoint: POST https://api.muapi.ai/api/v1/flux-3-dev

curl --location --request POST "https://api.muapi.ai/api/v1/flux-3-dev" \
  --header "Content-Type: application/json" \
  --header "x-api-key: YOUR_API_KEY" \
  --data-raw '{
      "prompt": "A minimalist product shot of a ceramic mug on a wooden table, soft natural light",
      "aspect_ratio": "1:1",
      "resolution": "1k"
  }'

Python SDK:

submission = api.generate(
    prompt="A minimalist product shot of a ceramic mug on a wooden table, soft natural light",
    aspect_ratio="1:1",
    resolution="1k",
)
result = api.wait_for_completion(submission["request_id"])
print(result["outputs"][0])

2. FLUX 3 Text-to-Image (flagship)

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

curl --location --request POST "https://api.muapi.ai/api/v1/flux-3-text-to-image" \
  --header "Content-Type: application/json" \
  --header "x-api-key: YOUR_API_KEY" \
  --data-raw '{
      "prompt": "A hyperrealistic portrait of an astronaut standing on red Martian dunes at golden hour",
      "aspect_ratio": "16:9",
      "resolution": "2k"
  }'

Python SDK:

submission = api.text_to_image(
    prompt="A hyperrealistic portrait of an astronaut standing on red Martian dunes at golden hour",
    aspect_ratio="16:9",
    resolution="2k",
)

3. FLUX 3 Image-to-Image (Edit)

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

curl --location --request POST "https://api.muapi.ai/api/v1/flux-3-image-to-image" \
  --header "Content-Type: application/json" \
  --header "x-api-key: YOUR_API_KEY" \
  --data-raw '{
      "prompt": "Replace the background with a neon-lit city street at night, keep the subject unchanged",
      "images_list": ["https://example.com/input.jpg"],
      "aspect_ratio": "1:1"
  }'

Python SDK:

submission = api.image_to_image(
    prompt="Replace the background with a neon-lit city street at night, keep the subject unchanged",
    images_list=["https://example.com/input.jpg"],
    aspect_ratio="1:1",
)

4. 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 drone shot glides over a bioluminescent forest at night, fireflies drifting between glowing trees",
      "aspect_ratio": "16:9",
      "resolution": "1080p",
      "duration": 6,
      "generate_audio": true
  }'

Python SDK:

submission = api.text_to_video(
    prompt="A drone shot glides over a bioluminescent forest at night, fireflies drifting between glowing trees",
    aspect_ratio="16:9",
    resolution="1080p",
    duration=6,
    generate_audio=True,
)

5. 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 camera slowly pushes in as steam rises from the coffee cup",
      "images_list": ["https://example.com/product.jpg"],
      "duration": 5,
      "generate_audio": true
  }'

Python SDK:

submission = api.image_to_video(
    prompt="The camera slowly pushes in as steam rises from the coffee cup",
    images_list=["https://example.com/product.jpg"],
    duration=5,
    generate_audio=True,
)

📖 Method Reference

MethodParametersDescription
generateprompt, aspect_ratio, resolutionFLUX 3 Dev — fast, low-cost text-to-image.
text_to_imageprompt, aspect_ratio, resolutionFlagship FLUX 3 text-to-image (higher fidelity than Dev).
image_to_imageprompt, images_list, aspect_ratio, resolutionFLUX 3 instruction-driven image editing (up to 4 reference images).
text_to_videoprompt, aspect_ratio, resolution, duration, generate_audioFLUX 3 text-to-video with optional native synchronized audio.
image_to_videoprompt, images_list, aspect_ratio, resolution, duration, generate_audioFLUX 3 image-to-video with optional native synchronized audio.
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 generation.
wait_for_completionrequest_id, poll_interval, timeoutBlocking helper that polls until the task completes.

🔗 Official Resources

📄 License

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


Keywords: FLUX 3 API, FLUX 3 Dev, FLUX 3 Dev API, Black Forest Labs FLUX 3, FLUX 3 Python SDK, FLUX 3 text to image, FLUX 3 image to image, FLUX 3 text to video, FLUX 3 image to video, FLUX multimodal model, AI image generation API, AI video generation API, MuAPI, Python image generation SDK, open-weight FLUX.

Similar Projects

Discover other similar projects and AI models.

RepositoryPython
SamurAIGPT/flux-3-video-api

Python wrapper for Black Forest Labs' FLUX 3 video API — Text-to-Video and Image-to-Video with native synchronized audio.

98
Oct 1, 2026
Repository
Anil-matcha/awesome-flux-3-api-prompts

FLUX 3 video API and image API guide, prompts, parameters, and examples for Black Forest Labs' unified text-to-video, image-to-video, image, and audio generation model

149
Oct 19, 2026
RepositoryJavaScript
Anil-matcha/Open-Generative-AI

Uncensored AI Image & Video Generator — Free AI image & video generation studio with 800+ models (Flux, Midjourney, Kling, Sora, Veo). No content filters. Self-hosted, MIT licensed.

37.4k
Dec 2, 2026
RepositoryPython
harry0703/MoneyPrinterTurbo

利用 AI 大模型和自动化工作流,根据主题或关键词一键生成高清短视频。Generate HD short videos from a topic or keyword with an automated AI workflow.

147.3k
Dec 1, 2026
RepositoryPython
SamurAIGPT/Seedance-2.5-API

Uncensored Seedance 2.5 API: Python SDK for ByteDance Seedance 2.5 and Flash, with Spicy relaxed-moderation routes for text/image-to-video, references, edit, and extend. Native 4K, 30-second clips, and MCP via MuAPI; provider terms apply.

517
Nov 26, 2026
RepositoryPython
Anil-matcha/Seedance-2-API

Uncensored Seedance 2 API search? This Python SDK covers standard Seedance 2.0/2.5 workflows and Seedance 2.5 Flash Spicy routes; for relaxed-moderation Seedance 2 and 2 Mini, use the dedicated Seedance 2 Spicy API.

365
Nov 26, 2026
RepositoryPython
SamurAIGPT/muapi-comfyui

Uncensored AI video generation in ComfyUI: custom nodes for Seedance 2/2.5 Spicy, Wan 3.0 Spicy, and MiniMax H3 relaxed-moderation routes via MuAPI, plus 600+ image, video, audio, and enhancement models. Provider terms apply.

85
Nov 26, 2026
RepositoryPython
Anil-matcha/Wan-3.0-API

Uncensored Wan 3.0 API search? This Python SDK and MCP server documents standard routes; the Wan 3.0 Spicy companion provides relaxed-moderation endpoints.

84
Nov 26, 2026
RepositoryPython
y408wcjci/flux-3-api-cn

FLUX 3 Video API (`flux-3-video`): model id, pricing, parameters and copy-paste examples for the OpenAI-compatible APIMart endpoint.

65
Oct 17, 2026