Flux Kontext Max
Playground
Try it on WavespeedAI!FLUX.1 Kontext [max] boosts prompt adherence and typography generation for consistent, high-quality image editing at speed. Ready-to-use REST inference API, best performance, no coldstarts, affordable pricing.
Features
FLUX Kontext Max (Image-to-Image Editing) — wavespeed-ai/flux-kontext-max
FLUX Kontext Max is a premium image-to-image editing model built for high-fidelity, instruction-following transformations. Provide a source image plus a natural-language edit prompt, and it performs precise local or global edits while maintaining strong visual coherence—ideal for demanding creative direction, high-end retouching, and style-driven transformations.
Key capabilities
- High-fidelity instruction-based image editing from a single input image
- Strong prompt adherence for complex, multi-constraint edits
- Handles both local edits (specific elements) and global edits (overall look)
- Excellent for style transformations (e.g., toy style, clay, illustration) while preserving composition
Typical use cases
- Premium retouching: lighting correction, cleanup, detail enhancement
- Background swaps with consistent lighting/shadows
- Product and branding edits requiring high accuracy
- Style transformations with minimal drift (toy, clay, cinematic, illustration)
- Creative iterations where output quality matters more than speed
Pricing
$0.08 per image.
Inputs and outputs
Input:
- image (required): Source image (upload or public URL)
- prompt (required): Edit instruction
Output:
- One or more edited images (controlled by num_images, if available in your interface)
Parameters
- prompt (required): Edit instruction describing what to change and what to preserve
- image (required): Source image
- seed: Fixed value for reproducibility; leave empty/random for variation
- guidance_scale: Prompt adherence strength (higher = stricter; too high may over-edit)
- aspect_ratio: Output aspect ratio (choose to control framing/cropping)
Prompting guide
For best control, use a “preserve + edit + constraints” structure:
Template: Keep [what must stay]. Change [what to edit]. Ensure [constraints]. Match [lighting/shadows/perspective].
Example prompts
- Keep the person’s face, pose, and clothing unchanged. Convert the entire image to a high-quality toy style with realistic plastic texture, soft studio lighting, and clean highlights. Keep the background composition consistent.
- Keep the subject identity and expression unchanged. Replace the background with a clean pastel studio backdrop. Match lighting direction and shadow softness.
- Remove background clutter and keep the main subject sharp. Apply a gentle cinematic color grade without changing composition.
Best practices
- Start with one change per run, then iterate for precision.
- If the edit is too strong, lower guidance_scale and add a clearer preserve clause.
- Fix seed for stable comparisons across prompt variants.
- Choose aspect_ratio intentionally to avoid unexpected cropping.
Authentication
For authentication details, please refer to the Authentication Guide.
API Endpoints
Submit Task & Query Result
# Submit the task
curl --location --request POST "https://api.wavespeed.ai/api/v3/wavespeed-ai/flux-kontext-max" \
--header "Content-Type: application/json" \
--header "Authorization: Bearer ${WAVESPEED_API_KEY}" \
--data-raw '{
"guidance_scale": 3.5,
"enable_sync_mode": false
}'
# Get the result
curl --location --request GET "https://api.wavespeed.ai/api/v3/predictions/${requestId}/result" \
--header "Authorization: Bearer ${WAVESPEED_API_KEY}"
Parameters
Task Submission Parameters
Request Parameters
| Parameter | Type | Required | Default | Range | Description |
|---|---|---|---|---|---|
| prompt | string | Yes | - | The positive prompt for the generation. | |
| image | string | Yes | - | The image to generate an image from. | |
| seed | integer | No | - | -1 ~ 2147483647 | The random seed to use for the generation. |
| guidance_scale | number | No | 3.5 | 1.0 ~ 20.0 | The guidance scale to use for the generation. |
| aspect_ratio | No | - | 21:9, 16:9, 4:3, 3:2, 1:1, 2:3, 3:4, 9:16, 9:21 | The aspect ratio of the generated media. | |
| enable_sync_mode | boolean | No | false | - | If set to true, the function will wait for the result to be generated and uploaded before returning the response. It allows you to get the result directly in the response. This property is only available through the API. |
Response Parameters
| Parameter | Type | Description |
|---|---|---|
| code | integer | HTTP status code (e.g., 200 for success) |
| message | string | Status message (e.g., “success”) |
| data.id | string | Unique identifier for the prediction, Task Id |
| data.model | string | Model ID used for the prediction |
| data.outputs | array | Array of URLs to the generated content (empty when status is not completed) |
| data.urls | object | Object containing related API endpoints |
| data.urls.get | string | URL to retrieve the prediction result |
| data.has_nsfw_contents | array | Array of boolean values indicating NSFW detection for each output |
| data.status | string | Status of the task: created, processing, completed, or failed |
| data.created_at | string | ISO timestamp of when the request was created (e.g., “2023-04-01T12:34:56.789Z”) |
| data.error | string | Error message (empty if no error occurred) |
| data.timings | object | Object containing timing details |
| data.timings.inference | integer | Inference time in milliseconds |
Result Request Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| id | string | Yes | - | Task ID |
Result Response Parameters
| Parameter | Type | Description |
|---|---|---|
| code | integer | HTTP status code (e.g., 200 for success) |
| message | string | Status message (e.g., “success”) |
| data | object | The prediction data object containing all details |
| data.id | string | Unique identifier for the prediction, the ID of the prediction to get |
| data.model | string | Model ID used for the prediction |
| data.outputs | string | Array of URLs to the generated content (empty when status is not completed). |
| data.urls | object | Object containing related API endpoints |
| data.urls.get | string | URL to retrieve the prediction result |
| data.status | string | Status of the task: created, processing, completed, or failed |
| data.created_at | string | ISO timestamp of when the request was created (e.g., “2023-04-01T12:34:56.789Z”) |
| data.error | string | Error message (empty if no error occurred) |
| data.timings | object | Object containing timing details |
| data.timings.inference | integer | Inference time in milliseconds |