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 when no input image is provided
- Context-aware — Understands and preserves context from the reference image
- Reproducible — Use
seedfor deterministic generation
Quick example
Image editing
Text-to-image
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
model | string | Yes | Must be flux-1-kontext-pro |
prompt | string | Yes | Image description or editing instructions |
input_image | string | No | Base64 or URL of the reference image to edit. Required for editing mode |
n | integer | No | Number of images (1–4). Default: 1 |
size | string | No | Output size, e.g. 1024x1024 |
output_format | string | No | jpeg or png |
seed | integer | No | Random seed for reproducibility |
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].