Flux MCP
Use Flux to generate and edit images in the AI Agent through MCP.
Generate and edit images using FLUX Dev, Pro, Kontext, and FLUX.2, and generate videos, extend clips, or enhance drafts using FLUX.3 through a unified REST API.
Choose an image or video endpoint based on your task and use the same API Token to retrieve asynchronous results.
Generate high-resolution images from natural language descriptions. Supports multiple models, including Flux Dev, Pro, Kontext, and Flux 2, to meet different precision requirements.
Use Flux Kontext Pro/Max models for context-aware image editing, precisely modifying local image details while maintaining overall consistency.
Submit generation requests and retrieve results by polling with a Task ID. The polling endpoint is completely free, making it ideal for batch processing and background tasks.
Call flux-3 through POST /flux/videos. Supports text-to-video generation, keyframe-based image-to-video generation, video extension, and draft enhancement, with optional audio synchronization.
Use the standard RESTful API with Bearer Token authentication to quickly submit image generation tasks.
curl -X POST "https://api.acedata.cloud/flux/images" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"action": "generate",
"model": "flux-2-pro",
"prompt": "A futuristic cityscape at sunset",
"size": "1:1",
"count": 1
}'The following excerpt from the existing API guide shows the fields used to retrieve results. The example model, task ID, and media content come from this historical sample. The actual response to your request takes precedence.
{
"success": true,
"task_id": "5456c749-3bbb-4f10-9eb8-cfbcac297500",
"trace_id": "ae4eecb8-1dd6-45b4-bfb3-a1c48872536e",
"data": [
{
"image_url": "https://cdn.acedata.cloud/assets/examples/flux/5456c749-3bbb-4f10-9eb8-cfbcac297500-d0ef60485f73.jpg"
}
]
}
From registration to generating your first image, it only takes a few minutes.
Log in to the Application List, open the General Application, and click the copy button to the right of API KEY. Store the Key on your server and replace YOUR_API_KEY in the example with it.
Use the /flux/images endpoint to submit a generation request and obtain a Task ID.
Use /flux/tasks to check the task status and retrieve the generated image.
A wide range of applications to meet creative design and product-level image needs.
Quickly generate concept art, illustrations, and design assets to accelerate creative workflows.
Generate product showcase images and lifestyle scenes in batches, reducing photography costs.
Quickly produce high-quality visual content to improve social media management efficiency.
Generate game characters and scene concepts to support game development and content creation.
Use the Kontext model for localized editing and modify specific elements within images.
Quickly produce advertising concepts, marketing materials, and brand visuals.
Images are billed by model and number of generations, while videos are billed by actual output duration in seconds, mode, and resolution. Query tasks are free.
| Model | Per Image (Credits) | Description |
|---|---|---|
| Flux 2 Klein | 0.10 | Lightweight image model |
| Flux Dev | 0.24 | For development and testing |
| Flux Pro | 0.32 | Professional-grade generation |
| Flux 2 Pro | 0.28 | Recommended · Next Generation · Great Value |
| Flux 2 Flex | 0.47 | Next Generation · Flexible Generation |
| Flux 2 Max | 0.66 | Next Generation · Highest Quality |
| Flux Kontext Pro | 0.47 | Recommended · Contextual Editing |
| Flux Kontext Max | 0.79 | Most Powerful Editing Capabilities |
For video and package equivalent pricing, please see Live Pricing.
Common questions about using the Flux API
Flux Dev and Flux 2 Klein are suitable for low-cost generation. Flux 2 Klein only supports text-to-image generation. Flux Pro and Flux 2 Pro, Flex, and Max offer other image quality and cost options. For image editing, choose a model that supports edit.
Flux Kontext models support context-aware image editing—provide an existing image and a text instruction to precisely modify specific parts of the image without affecting other areas.
POST /flux/tasks is free and can be used to query image or video tasks.
Use size to set the size. Flux Dev and Flux Pro accept pixel dimensions or aspect ratios, while Kontext and Flux 2 Pro, Flex, and Max use aspect ratios, such as 1:1.
Yes. Use the count parameter to specify the number of images generated per request. The cost is multiplied by the number of images.
Ace Data Cloud offers a variety of AI image generation and editing services
Integrate image generation, reference image editing, and video workflows into your product with a unified API.