flux_edit_image
Edit existing images with a text prompt to modify objects, apply style transfers, or change backgrounds using Flux models.
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 |
|---|---|---|---|
| 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. | |
| 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 Other models also support editing but kontext models give best results. | flux-kontext-pro |
| size | No | Output image size. For kontext models: aspect ratios like '1:1', '16:9'. For other models: pixel dimensions like '1024x1024'. | |
| callback_url | No | Webhook callback URL for asynchronous notifications. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |