FLUX.1 [dev] Text to Image
Input
Customize your input with more control.
Result
Waiting for your input...
Your request will cost $0.025 per megapixel.
Images are billed by rounding up to the nearest megapixel.
Logs
Readme
FLUX.1 [dev]: Text-to-Image AI Generator
Transform natural language descriptions into professional-grade images with FLUX.1 [dev], a 12 billion parameter flow transformer built for production workflows. Designed for both personal and commercial use, this model delivers high-fidelity visual results without requiring fine-tuning or complex prompt engineering.
Overview
FLUX.1 [dev] excels at generating photorealistic images, detailed compositions, and consistent visual styles from text descriptions. Built on advanced flow transformer architecture, the model handles everything from marketing assets to concept art with enterprise-grade reliability. Whether you're prototyping product visuals or scaling content production, FLUX.1 [dev] delivers quality results while supporting real-time streaming for interactive applications.
Key Capabilities
- 12B parameter architecture optimized for rapid inference and image coherence
- Commercial licensing suitable for production deployments and client work
- Real-time streaming enables progressive generation and interactive experiences
- Flexible output control through adjustable guidance scale and safety filtering
- High-quality image generation from natural language descriptions
Popular Use Cases
Marketing and Content Production Generate social media visuals, blog illustrations, and campaign assets at scale. Content teams use FLUX.1 [dev] to maintain consistent brand aesthetics across hundreds of images while adapting messaging for different channels and audiences.
Product Development and Design Create UI mockups, concept variations, and visual prototypes for rapid iteration. Designers leverage the model to explore multiple creative directions simultaneously, from initial sketches to polished presentation materials.
E-commerce and Conversion Optimization Produce lifestyle product images, seasonal campaign visuals, and A/B testing variants without photoshoots. E-commerce teams generate contextual product presentations that showcase items in diverse settings and lighting conditions.
Entertainment and Game Development Produce game assets, storyboard illustrations, and creative concept art for media projects. Teams accelerate pre-production workflows by generating visual references and design variations at scale.
Getting Started
Getting up and running with FLUX.1 [dev] takes just a few minutes. Here's how to begin:
-
Get your API key at fal.ai/login to authenticate your requests
-
Install the client library for your preferred language:
bash# JavaScript/TypeScript npm install --save @fal-ai/client # Python pip install fal-client
-
Make your first API call with a descriptive prompt:
javascriptimport { fal } from "@fal-ai/client"; fal.config({ credentials: process.env.FAL_KEY }); const result = await fal.subscribe("fal-ai/flux/dev", { input: { prompt: "A serene mountain landscape at golden hour, snow-capped peaks reflecting in a crystal-clear alpine lake, photorealistic style with dramatic lighting" }, logs: true, onQueueUpdate: (update) => { if (update.status === "IN_PROGRESS") { update.logs.map((log) => log.message).forEach(console.log); } } }); console.log(result.data); // Output: { images: [{ url: "https://...", content_type: "image/jpeg" }] }
pythonfrom fal_client import FalClient client = FalClient(credentials="YOUR_FAL_KEY") result = client.subscribe("fal-ai/flux/dev", { "input": { "prompt": "A serene mountain landscape at golden hour, snow-capped peaks reflecting in a crystal-clear alpine lake, photorealistic style with dramatic lighting" } }) print(result) # Output: {'images': [{'url': 'https://...', 'content_type': 'image/jpeg'}]}
Technical Specifications
Model Architecture
- 12 billion parameter flow transformer optimized for text-to-image generation
- Advanced composition and coherence capabilities for complex scenes
- Support for diverse artistic styles from photorealistic to stylized illustration
- Commercial and personal use licensing included
Input Capabilities
- Natural language prompts with detailed scene descriptions
- Configurable guidance scale for prompt adherence control (default: 3.5)
- Multiple output format options including PNG and JPEG
- Optional safety filtering for content moderation
Performance
- Real-time streaming support for progressive generation
- Usage-based pricing at $0.025 per megapixel (rounded up to nearest megapixel)
- Enterprise-grade reliability for production deployments
- Rapid inference optimized for both single requests and batch operations
Best Practices
Achieve optimal results with these proven approaches:
Write Descriptive, Specific Prompts Instead of generic descriptions like "a beautiful landscape," provide concrete details: "A misty forest clearing at dawn, sunlight filtering through ancient oak trees, wildflowers in the foreground, atmospheric perspective with morning fog." Include lighting conditions, composition elements, and style references. The model responds well to natural language—describe what you want to see as if explaining it to an artist.
Start with Default Parameters and Refine Begin with the default guidance scale of 3.5 and adjust based on results. If images don't match your prompt closely enough, increase the guidance scale for stricter adherence. For more creative interpretations, lower it slightly. Test different prompts and parameter combinations to understand how adjustments affect output quality.
Monitor Usage for Cost-Effective Scaling Track your megapixel consumption to understand costs as you scale. A 1024x1024 image (1 megapixel) costs $0.025, while larger outputs cost proportionally more. For batch operations, consider optimal resolution tradeoffs between quality requirements and budget constraints.
Leverage Streaming for Interactive Applications Use streaming capabilities when building real-time applications where users benefit from seeing generation progress. This approach improves perceived performance and enables cancellation before completion if needed.
Advanced Features
Streaming for Real-Time Generation
FLUX.1 [dev] supports streaming requests that enable progressive image generation and real-time feedback. This capability is particularly valuable for interactive applications where users want to see generation progress:
javascriptimport { fal } from "@fal-ai/client"; const stream = await fal.stream("fal-ai/flux/dev", { input: { prompt: "Detailed architectural rendering of a modern sustainable building with green walls and solar panels" } }); for await (const event of stream) { // Handle streaming events for progress updates console.log(event); } const result = await stream.done(); console.log(result.data); // Output: { images: [{ url: "https://...", content_type: "image/jpeg" }] }
Safety and Content Filtering
Built-in safety checker capabilities allow you to enable content moderation for production applications. This feature helps maintain brand safety and compliance requirements while generating images at scale:
javascriptconst result = await fal.subscribe("fal-ai/flux/dev", { input: { prompt: "Professional product photography of a luxury watch", enable_safety_checker: true } });
Batch Generation with Multiple Variations
Generate multiple image variations efficiently in a single request to explore creative directions, A/B test visual concepts, or produce asset collections:
javascriptconst result = await fal.subscribe("fal-ai/flux/dev", { input: { prompt: "Modern minimalist interior design with natural lighting", num_images: 4 }, logs: true }); // Returns array of 4 different image variations console.log(result.data.images.length); // Output: 4
API Reference
The FLUX.1 [dev] API accepts the following parameters:
Input Parameters
typescriptinterface FluxDevInput { prompt: string; // Required. Text description of the image to generate num_images?: number; // Optional. Number of images to generate (default: 1) guidance_scale?: number; // Optional. Prompt adherence strength (default: 3.5) enable_safety_checker?: boolean; // Optional. Enable content safety filtering output_format?: string; // Optional. Image format: "jpeg" or "png" }
Output Structure
typescriptinterface FluxDevOutput { images: Array<{ url: string; // URL to the generated image content_type: string; // MIME type (e.g., "image/jpeg") }>; }
Parameter Details:
-
prompt (string, required): Detailed text description of the image you want to generate. More specific descriptions yield better results. Example: "A professional product shot of a ceramic mug on a wooden table with morning sunlight"
-
num_images (number, optional): Number of image variations to generate in a single request. Useful for exploring multiple creative directions. Default: 1
-
guidance_scale (number, optional): Controls how closely the model follows your prompt. Range: 0-20. Default: 3.5. Higher values (5-10) create stricter adherence; lower values (1-3) allow more creative interpretation
-
enable_safety_checker (boolean, optional): When true, enables content safety filtering to block potentially problematic content. Default: false
-
output_format (string, optional): Specify output image format. Supported values: "jpeg", "png". Default: "jpeg"
For complete API documentation including authentication methods, queue management, and advanced integration patterns, visit the technical reference.
Pricing and Usage
FLUX.1 [dev] uses transparent usage-based pricing at $0.025 per megapixel. Images are billed by rounding up to the nearest megapixel, making costs predictable and scalable.
Pricing Examples:
- 1024×1024 image = 1 megapixel = $0.025
- 1280×1024 image = 1.31 megapixels (rounds to 2) = $0.05
- 2048×2048 image = 4 megapixels = $0.10
- 3840×2160 image = 8.29 megapixels (rounds to 9) = $0.225
This pricing model scales efficiently from prototyping to production volumes. Generate 100 standard 1024×1024 images for $2.50, or scale to thousands of images while maintaining predictable per-image costs. For enterprise deployments requiring dedicated resources, volume commitments, or custom SLAs, contact sales for tailored solutions.
Integration Methods
Subscribe Method (Recommended for Most Use Cases)
The subscribe method handles polling automatically, making it ideal for straightforward image generation:
javascriptimport { fal } from "@fal-ai/client"; const result = await fal.subscribe("fal-ai/flux/dev", { input: { prompt: "Your detailed prompt here", guidance_scale: 3.5, num_images: 2 } }); console.log(result.data.images);
Queue Method (For Long-Running Requests)
For applications requiring webhook notifications or asynchronous processing, use the queue method with optional webhook callbacks:
javascriptimport { fal } from "@fal-ai/client"; const { request_id } = await fal.queue.submit("fal-ai/flux/dev", { input: { prompt: "Your detailed prompt here" }, webhookUrl: "https://your-app.com/webhook/flux-result" }); // Later, fetch the result const result = await fal.queue.result("fal-ai/flux/dev", { requestId: request_id });
Support and Resources
We're here to help you succeed with FLUX.1 [dev]:
- Model Playground: Test prompts, explore parameters, and preview results before integrating into your application
- Complete API Documentation: Technical guides, parameter references, and integration tutorials for all supported platforms
- Code Examples: Production-ready samples in JavaScript, Python, and TypeScript demonstrating common workflows and advanced patterns
- Enterprise Support: For dedicated resources, custom integrations, or volume pricing, contact our sales team for tailored solutions
Ready to transform text into professional images? Sign up now and start creating with FLUX.1 [dev].