Skip to main content
POST

Authorizations

Authorization
string
header
required

API Key authentication. Format: Bearer YOUR_API_KEY.

Body

application/json
prompt
string
required

Image editing instruction, supports Chinese and English. Maximum 10000 characters. We recommend keeping the prompt under 600 words. Interactive precise editing is supported: edit locations can be specified via coordinates, selection boxes, or arrows described in the prompt.

Required string length: 1 - 10000
Example:

"Replace the object in the selection box (100,100)-(300,300) with a red vintage car"

image
string[]
required

Reference image array (2-10 images), each as a URL (or Base64 data URI). Each image must be <= 30 MB, width and height > 14 px, aspect ratio within [1/16, 16], total pixels <= 36,000,000. Supported formats: JPEG, PNG, WEBP, BMP, TIFF, GIF, HEIC, HEIF.

Required array length: 2 - 10 elements
Example:
size
string
default:1024x1024

Image size in format 'widthxheight'. Total pixels must be within [1280x720(921,600), 4,624,220] and aspect ratio within [1/16, 16], corresponding to the official 1K/2K resolution levels (3K/4K not supported). Recommended 2K sizes: 2048x2048 (1:1), 2816x1584 (16:9), 2368x1776 (4:3).

Example:

"2048x2048"

optimize_prompt_mode
enum<string>
default:standard

Prompt optimization mode. 'standard': higher quality with longer generation time. 'fast': faster generation with slightly lower quality.

Available options:
standard,
fast
Example:

"standard"

output_format
enum<string>
default:jpeg

Output image format. Supported values: 'jpeg' and 'png'.

Available options:
jpeg,
png
Example:

"png"

Response

200 - application/json

Task submitted successfully

code
integer
required

Response code, 0 indicates success

Example:

0

message
string
required

Response message

Example:

"success"

data
object
required

Detailed data about the submitted asynchronous task.