Endpoint
Headers
| Header | Type | Required | Description |
|---|---|---|---|
x-api-key | string | Yes | Your API key |
Request Body
| Parameter | Type | Required | Description |
|---|---|---|---|
jobId | string | Yes | ID of the original image generation task |
imageNo | integer | Yes | Image number to edit (0/1/2/3) |
mask | Mask | Yes | Regions to repaint |
remixPrompt | string | No | Text prompt for the repaint area (1-8192 characters) |
area | Polygon | No | Single polygon area to repaint (deprecated, use mask instead) |
callback | string | No | Callback URL for task completion notifications |
Data Types
Mask
Choose one of the following methods to define the repaint area:| Field | Type | Description |
|---|---|---|
areas | Polygon[] | Array of polygonal areas to repaint |
url | string | Black and white mask image URL (white areas will be repainted) |
Polygon
| Field | Type | Description |
|---|---|---|
width | integer | Image width in pixels (500-4096) |
height | integer | Image height in pixels (500-4096) |
points | integer[] | Polygon coordinates in XYXY format, clockwise from top-left |
Example Request
Using Polygon Areas
Using Mask Image
Response
Returns a task object containing the task information.Authorizations
API key for authentication
Body
application/json
ID of the original image generation task
Image number to edit (0, 1, 2, or 3)
Required range:
0 <= x <= 3Example:
0
Regions to repaint (use either areas or url)
Text prompt for the repaint area
Required string length:
1 - 8192Callback URL for task completion notifications
Response
200
Inpaint task created successfully