Black Forest Labs · AI Image Generation

Flux AI Image Generation API

Based on Black Forest Labs' Flux series models, quickly generate and edit high-quality AI images through a unified API, with support for Flux Dev, Pro, Kontext, and the latest Flux 2 series.

🎨 Text-to-Image & Image-to-Image ⚡ Multiple Models Available 🔗 Unified API Integration
7+
Flux Models Available
2
Modes: Generation & Editing
$0.023
Starting Per Image
0.5
Free Credits

Core Features

Covering the complete image generation and editing workflow, with a variety of Flux models ranging from basic to professional.

🖼️

High-Quality Text-to-Image

Generate high-resolution images from natural language descriptions, with support for multiple models including Flux Dev, Pro, Kontext, and Flux 2 to meet different quality requirements.

✏️

Kontext Image Editing

Use Flux Kontext Pro/Max models for context-aware image editing, precisely modifying local image details while maintaining overall consistency.

🔄

Asynchronous Task Architecture

After submitting a generation request, retrieve results by polling with the Task ID. The polling API is completely free, making it ideal for batch and background processing.

📐

Flexible Parameter Control

Supports customizable parameters such as width, height, seed, and quantity, enabling precise control over generation results to meet production-grade image creation needs.

Generate images with a single request

Use the standard RESTful API with Bearer Token authentication to quickly submit image generation tasks.

cURL
curl -X POST "https://api.acedata.cloud/flux/images" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "flux-pro",
    "prompt": "A futuristic cityscape at sunset",
    "width": 1024,
    "height": 1024,
    "count": 1
  }'

Get started in 3 quick steps

From registration to generating your first image, it only takes a few minutes.

1

Register and get an API Key

Create an account on the platform, then go to the console to generate an API key.

2

Call the image generation API

Use the /flux/images endpoint to submit a generation request and obtain a Task ID.

3

Poll for results

Query the task status through /flux/tasks to retrieve the generated image.

What is Flux suitable for?

Multiple application scenarios to meet creative design and production-grade image needs.

🎨

Creative design

Quickly generate concept art, illustrations, and design assets to accelerate creative workflows.

🛒

E-commerce product images

Generate product showcase images and lifestyle images in batches to reduce photography costs.

📱

Social media content

Quickly create high-quality visual content to improve social media operation efficiency.

🎮

Games and entertainment

Generate game characters and scene concept art to support game development and content creation.

📝

Image editing

Use the Kontext model for localized editing to modify specific elements in images.

🏢

Enterprise marketing

Quickly produce advertising creatives, marketing materials, and brand visual content.

Flux API Pricing

Charged by the number of images generated; prices depend on the model. The polling API is completely free.

Model Price per Image Description
Flux Dev $0.023 For development and testing
Flux Pro $0.030 Professional-grade generation
Flux 2 Pro $0.027 Recommended · Next generation · Great value
Flux 2 Flex $0.045 Next generation · Flexible generation
Flux 2 Max $0.063 Next generation · Highest quality
Flux Kontext Pro $0.045 Recommended · Context editing
Flux Kontext Max $0.075 Most powerful editing capabilities

For multiple images, charges are multiplied by the count value · The task status polling API /flux/tasks is completely free

Frequently Asked Questions

Common questions about using the Flux API

What is the difference between Flux Dev and Flux Pro?›

Flux Dev is a model for development and testing, with a lower price ($0.023/image). Flux Pro and the latest Flux 2 series are production-grade models with higher image quality and richer details, recommended for official products.

What is the Kontext model for?›

The Flux Kontext model supports context-aware image editing—provide an existing image along with text instructions to precisely modify specific parts of the image without affecting other areas.

Is polling task status billed?›

No. The /flux/tasks endpoint is completely free; charges apply only when submitting generation requests.

Which image sizes are supported?›

Custom width and height parameters are supported. Common sizes include 1024×1024, 1024×1792, and 1792×1024. The Kontext and Flux 2 series control output by image aspect ratio (such as 1:1, 16:9, and 9:16).

Can images be generated in batches?›

Yes. Use the count parameter to specify the number of images generated per request; charges are calculated as a multiple of the quantity.

Start Using the Flux API Now

Access the full Flux model lineup through a unified interface and easily integrate AI image generation into your product.