FLUX 2 Klein API for Developers

FLUX 2 Klein API

Generate and edit AI images with FLUX 2 Klein via API. Sub-second generation speed with strong quality — supporting both text-to-image and image editing workflows.

Free to start
No watermarks on paid plans
Subscription or usage-based
Auto-scaling
Flux 2 Klein example: pastel cartoon alpaca character with sleepy expression and soft vector styling
Character illustration
Flux 2 Klein example: iridescent drink in a metal mug against a starry black background
Surreal still life
Flux 2 Klein example: woman in lime green gloves and headscarf in a white vintage convertible
Fashion editorial
Flux 2 Klein example: cute white kitten leaping through a colorful anime speed-line burst
Anime character
Flux 2 Klein example: Monet-style water lilies pond with arched bridge and weeping willows
Impressionist painting
Flux 2 Klein example: small glowing pink dragon on a mossy rock reflected in a forest pond
Fantasy creature
Flux 2 Klein example: swirling galaxy spiral with gold, purple, and blue radial light bands
Cosmic abstract
Flux 2 Klein example: zebra made of black and white balloons standing in a sunny savanna
Surreal wildlife
Flux 2 Klein example: blonde woman in red cap and bandana against a sunlit brick wall
Street portrait
Flux 2 Klein example: smiling woman in a striped shirt with blurred green park bokeh
Outdoor portrait
Flux 2 Klein example: zebra covered in colorful candy buttons standing in golden savanna grass
Pop surrealism

Trusted by teams at

meta
nba
loreal
puma
cisco
deel
shopify
decathlon
dallas-mavericks
pittsburgh-pirates
tala
dyson
dazn
wsc-sports

Everything You Need to Ship FLUX 2 Klein

Sub-second image generation and editing with a versatile, fast model.

Sub-Second Generation
One of the fastest image models available — generate and iterate at near-instant speeds.
Text-to-Image & Editing
Supports both text-to-image generation and instruction-based image editing in a single model.
Free Tier Available
Available on the free plan at 640px — test quality before upgrading.
Fast Single-Image Generation
Sub-second output per request — iterate quickly on prompts with separate API calls.
Auto-Scaling Infrastructure
Scales compute to match demand automatically. No GPU provisioning or cold starts.
Commercial-Ready
Paid plans support non-watermarked outputs for commercial delivery.

Integrate in 3 Steps

Add fast AI image generation and editing to your app in minutes.

1
Get Your API Key
Sign up free and generate an API key from the Developer dashboard. You get free credits to start.
2
Send Your Request
Call /v1/ai-image-generator with a text prompt for text-to-image (one image per request). For editing, call /v1/ai-image-editor with reference images in assets.image_file_paths.
3
Get Results & Scale
Receive generated or edited images via response. Deploy to production — infrastructure scales automatically.
Get Started Free

Code Examples

FLUX 2 Klein in a few lines of code. Install an SDK or use the REST API directly.

from magic_hour import Client
from os import getenv

client = Client(token=getenv("API_TOKEN"))
res = client.v1.ai_image_generator.generate(
    image_count=1,
    style={
        "prompt": "A cozy coffee shop interior with warm lighting and wooden furniture",
        "tool": "general",
    },
    aspect_ratio="16:9",
    model="flux-2-klein",
    name="FLUX 2 Klein",
    resolution="1k",
)
API Docs

FLUX 2 Klein API Pricing

Subscription plans for standard usage.

Prefer usage-based pricing?

Email us or message us in Intercom and we will set up your usage-based pricing.

API Calculator
Use our calculator to estimate your API costs.
Tier
Estimated monthly cost

$0.3600

Built for Builders

See how developers use the FLUX 2 Klein API to power real products.

Rapid Iteration
Generate dozens of prompt variations in seconds to find the right visual direction.
Image Editing Workflows
Edit existing images with natural-language instructions — change styles, objects, or backgrounds.
Social Media Content
Produce high-volume social media assets quickly with consistent quality.
Marketing Prototypes
Generate draft creative concepts for stakeholder review at scale.
Game Asset Concepts
Create concept art and visual references rapidly during early development.
E-Commerce Imagery
Generate product images and lifestyle shots quickly for catalog and ads.
Try before integrating

Try FLUX 2 Klein Free — No Code Required

Test quality first with the free tool, then plug the same output quality into your app with the API when you are ready.

FLUX 2 Klein API — Frequently Asked Questions

Magic Hour's FLUX 2 Klein API lets developers generate and edit AI images using Black Forest Labs' FLUX 2 Klein model via REST API with SDKs for Python, Node.js, Go, and Rust.

FLUX 2 Klein is designed for sub-second generation — one of the fastest image models available for rapid drafts and real-time applications.

Yes. Use /v1/ai-image-generator for text-to-image, or /v1/ai-image-editor with reference images for instruction-based edits.

One. FLUX 2 Klein supports a single image per request — iterate quickly by sending separate API calls.

FLUX 2 Klein is available on the free plan at 640px resolution. Higher resolutions require a paid plan.

640px, 1K, and 2K resolutions in a wide range of aspect ratios.

FLUX 2 Klein costs 5 credits per image at 640px and 1K, and 10 credits per image at 2K. It is one of the most affordable models on Magic Hour.

Start Building with the Magic Hour FLUX 2 Klein Image API

Free credits on signup. SDKs for Python, Node.js, Go, and Rust. Production-ready in minutes.