



const main = async () => {
const response = await fetch('https://api.ai.cc/v1/images/generations', {
method: 'POST',
headers: {
Authorization: 'Bearer ',
'Content-Type': 'application/json',
},
body: JSON.stringify({
model: 'blackforestlabs/flux-2',
prompt: 'A jellyfish in the ocean',
}),
}).then((res) => res.json());
console.log('Generation:', response);
};
main();
import requests
def main():
response = requests.post(
"https://api.ai.cc/v1/images/generations",
headers={
"Authorization": "Bearer ",
"Content-Type": "application/json",
},
json={
"model": "blackforestlabs/flux-2",
"prompt": "A jellyfish in the ocean",
},
)
response.raise_for_status()
data = response.json()
print("Generation:", data)
if __name__ == "__main__":
main()
-
AI Playground

Test all API models in the sandbox environment before you integrate.
We provide more than 300 models to integrate into your app.


Product Detail
🚀 Introducing FLUX.2 API: Professional Text-to-Image Generation
FLUX.2 represents a groundbreaking evolution in AI image synthesis from Black Forest Labs, specifically engineered for professional, high-fidelity image generation. Moving beyond mere pixel manipulation, FLUX.2 is meticulously trained for visual intelligence, enabling the creation of images with superior real-world logic, precise lighting, and cohesive spatial relationships. This results in outputs that are not only stunning but also remarkably true to life and contextually accurate.
⚙️ Technical Specifications
- Architecture: Latent flow matching, integrating a Mistral-3 24B parameter vision-language model with a rectified flow transformer.
- Resolution: Supports impressive outputs and editing capabilities up to 4 Megapixels.
- Output Formats: Versatile support for both JPEG and PNG formats.
📈 Performance Benchmarks
- ✅ Industry-Leading Performance: Consistently outperforms all other open-weight alternatives in both text-to-image generation and complex image editing tasks.
- ✨ Photorealistic Quality: Achieves unparalleled photorealistic detail, stable lighting, and texture sharpness, matching the quality of professional closed-source models.
💡 Key Features of FLUX.2 API
- ⭐ Real-world Workflow Focus: Ensures stable styling across multiple images, strict brand guideline compliance, and consistent lighting, crucial for professional applications.
- 🎯 Precision Control: Offers surgical parameter tuning for generation steps and guidance, allowing users to expertly balance speed with desired image detail.
- 📄 JSON Structured Prompts: Facilitates intricate scene composition with element-specific controls, including camera angles and precise color palettes.
- 🎨 HEX Color Code Support: Guarantees exact color matching for maintaining brand consistency in all generated visuals.
- ♻️ Reproducible Results: Integrated seed control ensures consistent outputs across iterative generations, vital for design refinement.
💲 FLUX.2 API Pricing
Highly competitive pricing at $0.0126 per megapixel, offering exceptional value for high-quality image generation.
🛠️ Versatile Use Cases
- 🖼️ Product Mockups: Ideal for designs requiring precise text and intricate visual detail.
- 📝 Marketing & Branding: Perfect for materials demanding strict adherence to typography and brand style guides.
- 💻 UI/UX & Infographics: Enables high-fidelity text rendering for design interfaces and informative graphics.
- 🎨 Creative Workflows: Provides flexible output control combined with impressive cost efficiency.
- 🔬 Research & Development: Leverages open-weight models for advanced experimentation in image generation and editing.
💻 Code Sample & Documentation
For detailed API integration and code examples, please refer to the official documentation:
// Example of an API call using the FLUX.2 model
// (Refer to the documentation for full implementation details)
// const response = await aimlapi.image.flux.create({
// model: "blackforestlabs/flux-2",
// prompt: "A futuristic city skyline at sunset, cyberpunk style, high detail",
// resolution: "4MP",
// output_format: "jpeg"
// });
⚖️ Comparison with Other Leading Models
vs DALL·E 2: FLUX.2 distinguishes itself with open-source access and advanced multi-reference image synthesis, providing unparalleled customization and domain-specific fine-tuning. DALL·E 2, while offering excellent generalization, is a closed-source model with less flexibility for on-premise customization.
vs Stable Diffusion XL: FLUX.2 significantly outperforms in multi-reference capabilities and text rendering, boasting state-of-the-art prompt adherence. Stable Diffusion XL offers higher resolution outputs (up to 1024x1024) and strong community support but frequently struggles with complex text and maintaining consistency across multiple images.
vs Imagen: FLUX.2 provides a robust open-source solution with inherent flexibility for custom workflows and LoRA fine-tuning. Imagen, while delivering superior photorealism and image quality, remains a closed-source model, making it less accessible for broad integration and customization.
❓ Frequently Asked Questions (FAQ)
-
Q: What makes FLUX.2 different from other text-to-image models?
A: FLUX.2 is trained for "visual intelligence," which means it generates images with better real-world logic, accurate lighting, and coherent spatial relationships, unlike models focused purely on pixel generation. It also offers advanced features like JSON structured prompts and HEX color support. -
Q: Is FLUX.2 suitable for professional design work?
A: Absolutely. With features like stable styling across images, brand guideline compliance, precision control, and reproducible results, FLUX.2 is specifically designed for professional, high-fidelity image generation and integrates seamlessly into real-world workflows. -
Q: What is the pricing structure for the FLUX.2 API?
A: FLUX.2 API is priced at $0.0126 per megapixel, offering a cost-effective solution for high-quality image generation. -
Q: Can FLUX.2 handle specific color requirements for branding?
A: Yes, FLUX.2 API supports HEX color codes, ensuring exact color matching for brand consistency in all generated images. -
Q: How does FLUX.2 compare in terms of open-source accessibility?
A: FLUX.2 offers open-source access and is built on open-weight models, providing greater flexibility for customization, domain-specific fine-tuning, and on-premise solutions compared to closed-source alternatives like DALL·E 2 and Imagen.
Learn how you can transformyour company with AICC APIs



Log in