Edit

POST

Edit a given image synchronously using the provided mask. The mask indicates which part of the image should be edited, while the prompt and chosen style type can further guide the edit.

Supported image formats include JPEG, PNG, and WEBP.

Images links are available for a limited period of time; if you would like to keep the image, you must download it.

Request

This endpoint expects a multipart form with multiple files.
image_filefileRequired
maskfileRequired
promptstringRequired

The prompt used to describe the edited result.

modelenumRequired

The model used to generate an image or edit one. /generate and /remix supports all model types, however, /edit is only supported for V_2 and V_2_TURBO.

Allowed values: V_1V_1_TURBOV_2V_2_TURBO
magic_prompt_optionenumOptional

Determine if MagicPrompt should be used in generating the request or not

Allowed values: AUTOONOFF
num_imagesintegerOptional>=1<=8
seedintegerOptional>=0<=2147483647
style_typeenumOptional

The style type to generate with; this is only applicable for models V_2 and above and should not be specified for model versions V_1.

Response

Image edits generated successfully.

createddatetime

The time the request was created.

datalist of objects

A list of ImageObjects that contain the generated image(s).

Errors

Built with