Endpoint
Headers
Header | Type | Required | Description |
---|---|---|---|
x-api-key | string | Yes | Your API key |
Request Body
Parameter | Type | Required | Description |
---|---|---|---|
imgUrl | string | Yes | URL of the source image (max length: 1024 characters) |
canvas | Canvas | Yes | Target canvas dimensions |
imgPos | CanvasImg | Yes | Image position and size on canvas |
remixPrompt | string | Yes | Text prompt for the editing operation |
mask | Mask | Yes | Areas to edit on the original image |
callback | string | No | Callback URL for task completion notifications |
Data Types
Canvas
Field | Type | Description |
---|---|---|
width | integer | Canvas width in pixels |
height | integer | Canvas height in pixels |
CanvasImg
Field | Type | Description |
---|---|---|
width | integer | Image width in pixels |
height | integer | Image height in pixels |
x | integer | Horizontal offset from canvas top-left |
y | integer | Vertical offset from canvas top-left |
Mask
Field | Type | Description |
---|---|---|
areas | Polygon[] | Polygonal areas to edit (optional) |
url | string | Black and white mask image URL (optional) |
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 |