
Request
Make aPOST
request to below endpoint and pass the required parameters as a request body.
Body
Body
Your API Key used for request authorization.
The ID of the model. Must be 'flux-kontext-dev' for Flux Kontext model.
A text description of the things you want in the generated image, referencing elements from the input images.
URL of the primary reference image to use as a base for the generation.
Items you don't want in the image. Helps exclude unwanted elements, artifacts, or styles from the generation.
URL of the secondary reference image to incorporate elements from. Optional for single-image workflows.
The number of denoising steps. Values typically range from 1 to 50. Can be provided as integer or string.
1 <= x <= 50
Controls how much the output image should resemble the input image. 0.0 means identical to input, 1.0 means completely different. Can be provided as number or string.
0 <= x <= 1
Scale for classifier-free guidance. Higher values make the model follow the prompt more closely. Can be provided as number or string.
0 <= x <= 20
Enhance prompts for better results. Set to null to use model defaults.
The width of the output image in pixels. Maximum value is 1024.
x <= 1024
The height of the output image in pixels. Maximum value is 1024.
x <= 1024
The number of images to be returned in response. Maximum value is 4.
x <= 4
Used to reproduce results. The same seed will generate the same image again. Pass null for a random number.
Get response as a base64 string.
URL to receive a POST API call once image generation is complete.
This ID is returned in the response to the webhook API call and is used to identify the webhook request.
Create a temporary image link valid for 24 hours.
Response
Flux Kontext Image to Image generation response
- Option 1
- Option 2
- Option 3
Status of the image generation.
success
Time taken to generate the image in seconds.
Unique identifier for the image generation request.
Array of generated image URLs.
Array of proxy image URLs.
Metadata about the image generation including all parameters used.
Indicates if NSFW content was detected in the generated image.