- Text-to-image — POST JSON to
/v1/images/generations - Image editing — POST multipart form data to
/v1/images/edits
Key capabilities
- Image editing — Modify existing images with text instructions (e.g. “change the red car to blue”)
- Text-to-image — Generate images from text prompts
- Context-aware — Understands and preserves context from the reference image
- Reproducible — Use
seedfor deterministic generation
Quick example
Text-to-image
Image editing
Text-to-image parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
model | string | Yes | Must be flux-1-kontext-pro |
prompt | string | Yes | Image description. ⚠️ Prompt must be in English |
n | integer | No | Number of images. Only 1 is supported |
size | string | No | Output size, e.g. 1024x1024 |
output_format | string | No | jpeg or png |
seed | integer | No | Random seed for reproducibility |
Image editing parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
model | string | Yes | Must be flux-1-kontext-pro |
image | file | Yes | Image file to edit (multipart upload) |
prompt | string | Yes | Editing instructions. ⚠️ Prompt must be in English |
n | integer | No | Number of images. Only 1 is supported |
size | string | No | Output size, e.g. 1024x1024 |
Response
| Field | Description |
|---|---|
data[].b64_json | Base64-encoded image data |
created | Unix timestamp |
API Reference
View the interactive API playground for FLUX.1 Kontext [pro].