Flux MCP
Use Flux to generate and edit images in the AI Agent through MCP.
Flux AI image generation service.
This is only a basic call example. See the full docs for more parameters and advanced usage.
View DocsGenerate 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.
Flux AI image generation API, generates 1 image per request.
Can be used to query the current Flux task status.
Generate FLUX 3 videos from text, image keyframes or existing clips, enhance owned drafts, and retrieve asynchronous tasks.
We offer various credit packages. The more you purchase, the higher the discount you receive.
up to46% OFFUse Flux to generate and edit images in the AI Agent through MCP.
Configuration Method
Connect the current service in Claude Code:
mcpServers service entry below into .mcp.json in the project root directory, retaining the existing configuration.ACEDATACLOUD_API_TOKEN in the terminal: use export ACEDATACLOUD_API_TOKEN='YOUR_API_TOKEN' on macOS/Linux, and $env:ACEDATACLOUD_API_TOKEN = 'YOUR_API_TOKEN' in Windows PowerShell; replace YOUR_API_TOKEN with your Ace Data Cloud API Token.claude in the same terminal where this variable has been set; new terminals or desktop-launched clients must also be able to read this variable./mcp to confirm that the service is connected and the tools have been loaded; when using the project configuration for the first time, check and approve the service as prompted.export ACEDATACLOUD_API_TOKEN='YOUR_API_TOKEN'
claude mcp add --scope user --transport http 'flux-mcp' 'https://flux.mcp.acedata.cloud/mcp' --header 'Authorization: Bearer ${ACEDATACLOUD_API_TOKEN}'
Provide prompt words, parameter selection, and result processing guidelines for AI Agent in Flux image generation and editing.
Install the current Skill to Claude Code. Project-level configurations are shared across the repository, while user-level configurations apply to all projects on this machine.
npx skills add acedatacloud/skills --skill 'flux-image' -a 'claude-code' --yes