FLUX 3 Image Klein
Request ID flux-3-image-klein
Protocols
POST /v1/images/generations· Generate images exampleGET /v1/images/tasks/{task_id}· Check image task example
Authentication
Requests require an API key from API key management. For JSON requests, set Content-Type: application/json.
Authorization: Bearer YOUR_API_KEY
Request parameters
POST /v1/images/generations
| Field | Type | Required | Description |
|---|---|---|---|
model | string | Required | Use this model ID flux-3-image-klein. |
prompt | string | Required | Describe the image to generate. |
aspect_ratio | string | Optional | Output aspect ratio. Accepted values 1:1, 9:16, 16:9, 2:3, 3:2, 4:5, 5:4. Default 1:1. |
image_size | string | Optional | Output resolution tier. Accepted values 768sq, 1K, 1.5K, 2K, 4K. Default 1K. |
seed | integer | Optional | Random seed from 0 to 4294967295. |
n | integer | Optional | One image per request. Default 1. |
image_input | string[] | Optional | Reference images as a JSON array. Each item is a public HTTPS image URL or a Base64 image data URL. Also accepts image_urls. Maximum reference images 8. |
?async | string | Optional | URL query parameter. Set 1, true, or yes to receive 202 and a task_id. Omit it to wait for the result. |
Request examples
Set your API key in the local ICODEEASY_API_KEY environment variable and choose an endpoint that accepts direct HTTP calls. For endpoints that require a specific client, follow that client’s setup guide.
Replace example media URLs and asset IDs with your own valid assets.
Images Generations
curl -sS 'https://api.icodeeasy.cc/v1/images/generations' \
-H "Authorization: Bearer $ICODEEASY_API_KEY" \
-H 'Content-Type: application/json' \
--data '{
"model": "flux-3-image-klein",
"prompt": "A watercolor illustration of a paper lantern by a lake.",
"aspect_ratio": "16:9",
"image_size": "1K"
}'
Check image task
curl -sS 'https://api.icodeeasy.cc/v1/images/tasks/YOUR_TASK_ID' \
-H "Authorization: Bearer $ICODEEASY_API_KEY"
Responses and tasks
HTTP 200 · Synchronous success
With ?sync=1, read the generated image URLs from data[].url. created is a Unix timestamp in seconds, and id is the task ID.
{
"id": "d142c93a-de26-40c9-be62-0de840d10960",
"created": 1781599773,
"data": [
{
"url": "https://example.com/generated-image.png"
}
]
}
HTTP 202 · Asynchronous submission
{
"task_id": "d142c93a-de26-40c9-be62-0de840d10960",
"status": "pending"
}
With ?async=1, use the same API key to poll GET /v1/images/tasks/{task_id}. status is pending, completed, or failed. On completion, read the image URL from result_url.
HTTP 200 · Completed task lookup
{
"task_id": "d142c93a-de26-40c9-be62-0de840d10960",
"status": "completed",
"model": "flux-3-image-klein",
"result_url": "https://example.com/generated-image.png"
}
Common errors
When the lookup returns failed, read error. If error_detail is present, check retryable before submitting again.
Full integration guide · See the full API guide for request fields, task states, and response formats.
Capabilities and limits
text_to_image· Supportedimage_to_image· Conditional — Requires valid reference images in a supported request formatimage_editing· Not publishedreference_images· Conditional — Requires valid reference images in a supported request format- Limits Reference images: up to 8 · Resolutions: 768sq, 1k, 1.5k, 2k, 4k · Aspect ratios: 1:1, 9:16, 16:9, 2:3, 3:2, 4:5, 5:4
Model Capability Catalog · View pricing
Related guides
Image Generation API
Generate or edit images with the OpenAI-compatible API. Send prompts, size options, and reference images, then read results or check async job status.
Model Capability Catalog
Compare public text, image, and video models by normalized request ID, compatible protocols, supported clients, tool use, media capabilities, limits, and review date.