flux-image
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseFlux Image Generation
Flux 图片生成
Generate and edit images through AceDataCloud's Flux API.
Setup: See authentication for token setup.
通过AceDataCloud的Flux API生成和编辑图片。
设置: 请查看身份验证了解令牌设置方法。
Quick Start
快速开始
bash
curl -X POST https://api.acedata.cloud/flux/images \
-H "Authorization: Bearer $ACEDATACLOUD_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{"prompt": "a cat wearing a space helmet, photorealistic", "model": "flux-dev", "callback_url": "https://api.acedata.cloud/health"}'Async: See async task polling. Poll viawithPOST /flux/tasks.{"id": "..."}
bash
curl -X POST https://api.acedata.cloud/flux/images \
-H "Authorization: Bearer $ACEDATACLOUD_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{"prompt": "a cat wearing a space helmet, photorealistic", "model": "flux-dev", "callback_url": "https://api.acedata.cloud/health"}'异步处理: 请查看异步任务轮询。通过接口并传入POST /flux/tasks进行轮询。{"id": "..."}
Models
模型
| Model | Quality | Speed | Sizes | Best For |
|---|---|---|---|---|
| Good | Fast | 256–1440px | Quick generation (default) |
| High | Medium | 256–1440px | Production work |
| Good | Fastest | 256–1440px | Compact / lowest-latency Flux 2 generation |
| High | Fast | 256–1440px | Faster high-quality generation |
| Higher | Medium | 256–1440px | Better prompt following |
| Highest | Slow | 256–1440px | Maximum quality generation |
| High | Medium | Aspect ratios | Image editing |
| Highest | Slow | Aspect ratios | Complex editing |
| 模型 | 画质 | 速度 | 尺寸 | 适用场景 |
|---|---|---|---|---|
| 良好 | 快速 | 256–1440px | 快速生成(默认) |
| 高 | 中等 | 256–1440px | 生产环境使用 |
| 良好 | 最快 | 256–1440px | 轻量/最低延迟的Flux 2生成 |
| 高 | 快速 | 256–1440px | 更快的高质量生成 |
| 更高 | 中等 | 256–1440px | 更好的提示词遵循度 |
| 最高 | 缓慢 | 256–1440px | 最高画质生成 |
| 高 | 中等 | 宽高比 | 图片编辑 |
| 最高 | 缓慢 | 宽高比 | 复杂编辑 |
Generate Images
生成图片
json
POST /flux/images
{
"prompt": "a minimalist logo of a mountain",
"action": "generate",
"model": "flux-2-pro",
"size": "1024x1024",
"count": 1
}json
POST /flux/images
{
"prompt": "a minimalist logo of a mountain",
"action": "generate",
"model": "flux-2-pro",
"size": "1024x1024",
"count": 1
}Size Options
尺寸选项
For dev/pro/flux-2 (pixel dimensions):
- ,
"1024x1024","1344x768","768x1344","1024x576""576x1024"
For kontext (aspect ratios):
- ,
"1:1","16:9","9:16","4:3","3:4","3:2","2:3","21:9""9:21"
适用于dev/pro/flux-2模型(像素尺寸):
- ,
"1024x1024","1344x768","768x1344","1024x576""576x1024"
适用于kontext模型(宽高比):
- ,
"1:1","16:9","9:16","4:3","3:4","3:2","2:3","21:9""9:21"
Edit Images
编辑图片
Use kontext models for text-guided image editing:
json
POST /flux/images
{
"prompt": "change the background to a beach sunset",
"action": "edit",
"image_url": "https://example.com/photo.jpg",
"model": "flux-kontext-pro"
}使用kontext模型进行文本引导的图片编辑:
json
POST /flux/images
{
"prompt": "change the background to a beach sunset",
"action": "edit",
"image_url": "https://example.com/photo.jpg",
"model": "flux-kontext-pro"
}Gotchas
注意事项
- Use pixel dimensions (e.g., ) with dev/pro/flux-2 models, aspect ratios (e.g.,
"1024x1024") with kontext models"16:9" - Editing requires kontext models (or
flux-kontext-pro) — other models only support generationflux-kontext-max - parameter generates multiple images in one request (increases cost proportionally)
count - is the lightest Flux 2 model — useful when latency matters more than peak quality
flux-2-klein - produces highest quality but is slowest — use dev/klein/flex for iteration and max for final output
flux-2-max - All generation is async — always set to get a task id immediately, then poll
"callback_url"using/flux/tasksor{"id":"<task_id>"}{"ids":[...],"action":"retrieve_batch"}
MCP:| Hosted:pip install mcp-flux-pro| See all MCP servershttps://flux.mcp.acedata.cloud/mcp
- dev/pro/flux-2模型需使用像素尺寸(如),kontext模型需使用宽高比(如
"1024x1024")"16:9" - 图片编辑仅支持kontext模型(或
flux-kontext-pro)——其他模型仅支持生成功能flux-kontext-max - 参数可在单次请求中生成多张图片(成本会按比例增加)
count - 是最轻量的Flux 2模型——当延迟优先级高于峰值画质时适用
flux-2-klein - 生成的画质最高但速度最慢——迭代阶段使用dev/klein/flex模型,最终输出使用max模型
flux-2-max - 所有生成操作均为异步——请务必设置以立即获取任务ID,随后通过传入
"callback_url"或{"id":"<task_id>"}调用{"ids":[...],"action":"retrieve_batch"}接口进行轮询/flux/tasks
MCP:| 托管地址:pip install mcp-flux-pro| 查看所有MCP服务器https://flux.mcp.acedata.cloud/mcp