Light Mode
Generative Fill API
POST
/image/edits/generative-fillThis API endpoint allows you to perform inpainting, where a masked region of an image is filled in based on a text prompt and other parameters. The response will contain the edited image with the inpainted section.
Request
Header Params
Authorization
string
required
A bearer token that authenticates the user for making the request.
Example:
Bearer {{API Token}}
Body Params multipart/form-data
prompt
string
required
A text description that guides the inpainting process. The image will be modified to align with this prompt in the masked areas.
Example:
A peaceful autumn scene with vibrant orange, red, and gold leaves scattered across the ground
image
file
required
The image file to be edited.
Example:
cmMtdXBsb2FkLTE3MzI3OTQ1ODg4NzktNQ==/camera.jpg
mask
file
required
The mask image indicating the areas to be inpainted. Mask should have same dimensions as the input image.
Example:
cmMtdXBsb2FkLTE3MzI3OTQ1ODg4NzktNw==/camerasmallmask.png
Request samples
Responses
Success(200)
Bad Request(400)
Internal Server Error(500)
Service Unavailable(503)
HTTP Code: 200
Content Type : Binaryapplication/octet-stream
If the request is successful, the API will return the generated image file.
Example
The response for 200 code is bytes.
Last modified: 23 days ago