Edit Images
POST /images/edits
Create edited or extended versions of an existing image.
Request Body
The image to edit. Must be a valid PNG file, less than 4MB, and square.
Additional image whose fully transparent areas indicate where image should be edited. Must be a valid PNG file, less than 4MB, and have the same dimensions as image.
A text description of the desired image(s)
The model to use for image editing (“flux-1-kontext-pro”, “flux-1-kontext-max”, etc)
Number of images to generate (1-10)
Size of the generated images (“256x256”, “512x512”, “1024x1024”)
Format of the generated images (“url” or “b64_json”)
Response
Returns an array of image objects with URLs or base64-encoded images.Example
Image Variations
POST /images/variations
Create variations of an existing image.
Request Body
The image to use as the basis for the variation(s). Must be a valid PNG file, less than 4MB, and square.
The model to use for generating variations (“flux-1-kontext-pro”, “flux-1-kontext-max”, etc)
Number of images to generate (1-10)
Size of the generated images (“256x256”, “512x512”, “1024x1024”)
Format of the generated images (“url” or “b64_json”)
Authorizations
Enter your API key (starts with 'ek-')
Body
multipart/form-data
The image to edit
A text description of the desired image
Example:
"flux-1-kontext-pro"
Required range:
1 <= x <= 10Available options:
256x256, 512x512, 1024x1024 Available options:
url, b64_json 