flux_edit_image
Edit existing images using text prompts to modify specific elements, add or remove objects, and apply style changes.
Instructions
Edit an existing image using Flux with a text prompt.
This allows you to modify an existing image based on a text description.
The kontext models (flux-kontext-pro, flux-kontext-max) are specifically
designed for high-quality image editing and style transfer.
Use this when:
- You want to modify or transform an existing image
- You want to change specific elements in an image
- You want to apply style changes or artistic effects
- You want to add, remove, or replace objects in an image
For generating new images from scratch, use flux_generate_image instead.
Returns:
Task ID and edited image information including URLs.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| size | Yes | Required output size. Kontext and flux-2-flex/pro/max require aspect ratios such as '1:1' or '16:9'; flux-dev/pro also accept documented pixel presets. | |
| model | No | Flux model to use for editing. Recommended models for editing: - flux-kontext-pro: Best for context-aware editing and style transfer (recommended) - flux-kontext-max: Maximum context for complex edits - flux-dev: Basic editing support flux-2-flex/pro/max also support editing. flux-2-klein supports generation only. | flux-kontext-pro |
| prompt | Yes | Description of how to edit the image. Be specific about what changes to make. Examples: 'Change the background to a sunset beach', 'Add sunglasses to the person', 'Make it look like a watercolor painting', 'Replace the car with a bicycle' | |
| image_url | Yes | URL of the image to edit. Must be a direct image URL (JPEG, PNG, etc.), not a web page containing an image. | |
| callback_url | No | Webhook callback URL for asynchronous notifications. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |