Flux · Image
Text to ImageNEWTemporarily Offline
⏸ This model is temporarily offline. The docs are for reference only and calls are unavailable. Watch announcements for restoration.
📌 What is this:Generate images from text with FLUX Kontext models.
💡 When to use:Use for high-quality FLUX-style image generation.
Endpoints
| Usage | Method | Path |
|---|---|---|
| Submit task | POST | /api/cqt/generator/flux |
| Query Result | GET | /api/cqt/info/flux?id={taskId} |
⏱ Recommended polling interval:Poll every 5s until status = succeeded / failed.
Request Parameters
| Param | Type | Required | Description |
|---|---|---|---|
| model | string | Required | flux-kontext-pro / flux-kontext-max |
| prompt | string | Required | Image description |
| aspectRatio | string | — | Output ratio: 1:1 / 9:16 / 16:9 / 4:3 / 3:4 / 21:9 / 3:2 / 2:3 |
| outputFormat | string | — | Output format jpeg / png, default jpeg |
| safetyTolerance | integer | — | Safety tolerance, default 2 |
| enhancePrompt | boolean | — | Whether to enhance the prompt, default true |
| webhookUrl | string | — | Completion webhook URL |
Request Example
curl -X POST https://api.cqtai.com/api/cqt/generator/flux \
-H 'Authorization: Bearer <API_KEY>' \
-H 'Content-Type: application/json' \
-d '{
"model": "flux-kontext-pro",
"prompt": "a futuristic city skyline at sunset, cinematic",
"aspectRatio": "16:9",
"outputFormat": "png"
}'
# -> { "code":200, "data":"<taskId>" }Response Example
{
"code": 200,
"msg": "success",
"data": {
"id": "<taskId>",
"status": "succeeded",
"resultUrl": "https://.../result.png",
"createTime": "2026-06-15 10:00:00",
"completeTime": "2026-06-15 10:00:20"
}
}Billing & Credits
flux-kontext-pro: 12 credits per image; flux-kontext-max: 24 credits per image (x your user rate). Auto-refunded on failure.