Image
FLUX.2 Flex image
FLUX.2 Flex — flexible speed/quality, with optional reference editing (up to 8). 1K/2K.
Category: Create · flux-2-flex
How to use & limits
- 32B model: text-to-image and multi-reference editing on the same endpoint.
- Optional references: up to 8 images at once, with strong character, product and style consistency.
- resolution: 1K or 2K.
- size accepts aspect ratios (1:1, 4:3, 3:4, 16:9, 9:16, 3:2, 2:3) or auto.
- Flex profile: adjustable balance between speed and quality.
- Clean typography and photoreal images.
Capabilities
What this model supports, straight from the schema — no pricing, no infrastructure detail.
| Capability | Value |
|---|---|
image_edit Image edit | Yes |
create_image Text-to-image | Yes |
max_prompt_length Max prompt length | 1000 |
allowed_resolutions Allowed resolutions | 1K, 2K |
max_reference_images Max reference images | 8 |
Parameters
Fields accepted in params (or first-class, where applicable) for POST /generations.
| Name | Label | Type | Required | Default | Options | Min / Max | Description |
|---|---|---|---|---|---|---|---|
prompt | Prompt | textarea | Required | — | — | — | Image or edit description. Required. |
size | Size | select | Optional | 1:1 | 1:1 · 4:3 · 3:4 · 16:9 · 9:16 · 3:2 · 2:3 · auto | — | Aspect ratio: 1:1, 4:3, 3:4, 16:9, 9:16, 3:2, 2:3 or auto. Default 1:1. |
resolution | Resolution | select | Optional | 1K | 1K · 2K | — | Resolution: 1K or 2K. Default 1K. |
image_urls | Optional references | multi_select | Optional | — | — | — – 8 | Optional references: up to 8 images; when present, enable edit mode. |
Example request
curl -X POST https://caranguejo.art/api/v1/dev/generations \
-H "Authorization: Bearer $CK" \
-H "Content-Type: application/json" \
-d '{
"model": "flux-2-flex",
"prompt": "Modern typographic poster with the word "FLUX" featured, gradient background.",
"params": {
"size": "16:9",
"resolution": "2K"
}
}'
const res = await fetch("https://caranguejo.art/api/v1/dev/generations", {
method: "POST",
headers: {
"Authorization": "Bearer " + process.env.CK,
"Content-Type": "application/json",
},
body: JSON.stringify({
"model": "flux-2-flex",
"prompt": "Modern typographic poster with the word "FLUX" featured, gradient background.",
"params": {
"size": "16:9",
"resolution": "2K"
}
}),
});
const { data } = await res.json();
Example response
{
"id": "9f0c1a7e-…",
"object": "generation",
"model": "flux-2-flex",
"type": "image",
"status": "completed",
"output": {
"assets": [
{
"url": "https://media.caranguejo.art/outputs/example.png",
"type": "image"
}
],
"images": [
{
"url": "https://media.caranguejo.art/outputs/example.png"
}
]
}
}
The job's real cost is returned as credits_charged on the completed response — check GET /balance for the account balance.
Common errors for this job type:
insufficient_credits | Account balance can't cover the job cost. |
content_policy_violation | Prompt or media rejected by content policy. |
generation_timeout | The job exceeded the maximum processing time. |
rate_limited | Too many requests per minute. |
invalid_input | A required parameter is missing or outside the model's schema. |
generation_failed | Generic processing failure. |