Edit Image Async
Interface description: Edit the image asynchronously, return the logId immediately, and poll the results through the task status query interface.
Before calling this interface, please request the “Image Editing Models” interface (GET /api/ai/models/image/edit) to obtain the currently available model list and the size, maximum number of input images, and price supported by each model, and then fill in the parameters of this interface accordingly.
Image editing is image-to-image: the reference image image must be passed in, and the prompt words can be used to modify and redraw it based on it. If you want to generate a new image (text-to-image) using only text, please use the “Generate Image Async” interface.
Authorizations
Need to get API Key from AiToEarn. Click to go to "API Key Obtaining Tutorial".
Body
Image editing model name. First call the "Image Editing Models" interface (GET /api/ai/models/image/edit) and pass in the data[n].name returned by it; the size, maximum number of input images and price supported by each model shall be subject to the return of this interface.
original picture
Edit description
1 - 4000Mask image URL for partial redraw (optional). It needs to be a PNG image with the same size as image: the completely transparent area (alpha is 0) represents the part that needs to be redrawn according to the prompt word, and the opaque area remains unchanged. Edit the entire image when not uploading.
Number of images generated
1 <= x <= 1Image size. The optional values vary from model to model, and are subject to the data[n].sizes returned by the "Image Editing Models" interface; the prices for different sizes are different, see data[n].pricing.
Return format
url, b64_json Response
The request has been processed by the service. Business success is determined by whether the response body has code === 0.

