Advanced Edit with Canvas
curl --request POST \
--url https://api.legnext.ai/api/v1/upload-paint \
--header 'Content-Type: multipart/form-data' \
--header 'x-api-key: <api-key>' \
--form 'imgUrl=<string>' \
--form 'canvas={
"width": 123,
"height": 123
}' \
--form 'imgPos={
"width": 123,
"height": 123,
"x": 123,
"y": 123
}' \
--form 'mask={
"areas": [
{
"width": 2298,
"height": 2298,
"points": [
123
]
}
],
"url": "<string>"
}' \
--form 'remixPrompt=<string>' \
--form 'callback=<string>'import requests
url = "https://api.legnext.ai/api/v1/upload-paint"
payload = "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"imgUrl\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"canvas\"\r\n\r\n{\r\n \"width\": 123,\r\n \"height\": 123\r\n}\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"imgPos\"\r\n\r\n{\r\n \"width\": 123,\r\n \"height\": 123,\r\n \"x\": 123,\r\n \"y\": 123\r\n}\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"mask\"\r\n\r\n{\r\n \"areas\": [\r\n {\r\n \"width\": 2298,\r\n \"height\": 2298,\r\n \"points\": [\r\n 123\r\n ]\r\n }\r\n ],\r\n \"url\": \"<string>\"\r\n}\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"remixPrompt\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"callback\"\r\n\r\n<string>\r\n-----011000010111000001101001--"
headers = {
"x-api-key": "<api-key>",
"Content-Type": "multipart/form-data"
}
response = requests.post(url, data=payload, headers=headers)
print(response.text)const form = new FormData();
form.append('imgUrl', '<string>');
form.append('canvas', '{
"width": 123,
"height": 123
}');
form.append('imgPos', '{
"width": 123,
"height": 123,
"x": 123,
"y": 123
}');
form.append('mask', '{
"areas": [
{
"width": 2298,
"height": 2298,
"points": [
123
]
}
],
"url": "<string>"
}');
form.append('remixPrompt', '<string>');
form.append('callback', '<string>');
const options = {method: 'POST', headers: {'x-api-key': '<api-key>'}};
options.body = form;
fetch('https://api.legnext.ai/api/v1/upload-paint', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.legnext.ai/api/v1/upload-paint",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"imgUrl\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"canvas\"\r\n\r\n{\r\n \"width\": 123,\r\n \"height\": 123\r\n}\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"imgPos\"\r\n\r\n{\r\n \"width\": 123,\r\n \"height\": 123,\r\n \"x\": 123,\r\n \"y\": 123\r\n}\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"mask\"\r\n\r\n{\r\n \"areas\": [\r\n {\r\n \"width\": 2298,\r\n \"height\": 2298,\r\n \"points\": [\r\n 123\r\n ]\r\n }\r\n ],\r\n \"url\": \"<string>\"\r\n}\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"remixPrompt\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"callback\"\r\n\r\n<string>\r\n-----011000010111000001101001--",
CURLOPT_HTTPHEADER => [
"Content-Type: multipart/form-data",
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.legnext.ai/api/v1/upload-paint"
payload := strings.NewReader("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"imgUrl\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"canvas\"\r\n\r\n{\r\n \"width\": 123,\r\n \"height\": 123\r\n}\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"imgPos\"\r\n\r\n{\r\n \"width\": 123,\r\n \"height\": 123,\r\n \"x\": 123,\r\n \"y\": 123\r\n}\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"mask\"\r\n\r\n{\r\n \"areas\": [\r\n {\r\n \"width\": 2298,\r\n \"height\": 2298,\r\n \"points\": [\r\n 123\r\n ]\r\n }\r\n ],\r\n \"url\": \"<string>\"\r\n}\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"remixPrompt\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"callback\"\r\n\r\n<string>\r\n-----011000010111000001101001--")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.legnext.ai/api/v1/upload-paint")
.header("x-api-key", "<api-key>")
.body("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"imgUrl\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"canvas\"\r\n\r\n{\r\n \"width\": 123,\r\n \"height\": 123\r\n}\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"imgPos\"\r\n\r\n{\r\n \"width\": 123,\r\n \"height\": 123,\r\n \"x\": 123,\r\n \"y\": 123\r\n}\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"mask\"\r\n\r\n{\r\n \"areas\": [\r\n {\r\n \"width\": 2298,\r\n \"height\": 2298,\r\n \"points\": [\r\n 123\r\n ]\r\n }\r\n ],\r\n \"url\": \"<string>\"\r\n}\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"remixPrompt\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"callback\"\r\n\r\n<string>\r\n-----011000010111000001101001--")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.legnext.ai/api/v1/upload-paint")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request.body = "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"imgUrl\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"canvas\"\r\n\r\n{\r\n \"width\": 123,\r\n \"height\": 123\r\n}\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"imgPos\"\r\n\r\n{\r\n \"width\": 123,\r\n \"height\": 123,\r\n \"x\": 123,\r\n \"y\": 123\r\n}\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"mask\"\r\n\r\n{\r\n \"areas\": [\r\n {\r\n \"width\": 2298,\r\n \"height\": 2298,\r\n \"points\": [\r\n 123\r\n ]\r\n }\r\n ],\r\n \"url\": \"<string>\"\r\n}\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"remixPrompt\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"callback\"\r\n\r\n<string>\r\n-----011000010111000001101001--"
response = http.request(request)
puts response.read_body{
"code": 400,
"message": "Invalid request parameters",
"raw_message": "Invalid request parameters",
"detail": null
}{
"code": 401,
"message": "Failed to verify api key",
"raw_message": "",
"detail": null
}{
"code": 402,
"message": "insufficient quota",
"raw_message": "insufficient quota",
"detail": null
}{
"code": 403,
"message": "Forbidden - Sensitive content detected",
"raw_message": "Forbidden - Sensitive content detected",
"detail": null
}{
"code": 413,
"message": "File size exceeds maximum limit",
"raw_message": "file too large",
"detail": null
}{
"code": 422,
"message": "Invalid parameter values",
"raw_message": "Invalid parameter values",
"detail": null
}{
"code": 429,
"message": "rate limit exceeded, please retry later",
"raw_message": "rate limit exceeded, please retry later",
"detail": null
}{
"code": 500,
"message": "Internal server error",
"raw_message": "Internal server error",
"detail": null
}Image Generation
Upload paint
Advanced editing with custom uploads
POST
/
v1
/
upload-paint
Advanced Edit with Canvas
curl --request POST \
--url https://api.legnext.ai/api/v1/upload-paint \
--header 'Content-Type: multipart/form-data' \
--header 'x-api-key: <api-key>' \
--form 'imgUrl=<string>' \
--form 'canvas={
"width": 123,
"height": 123
}' \
--form 'imgPos={
"width": 123,
"height": 123,
"x": 123,
"y": 123
}' \
--form 'mask={
"areas": [
{
"width": 2298,
"height": 2298,
"points": [
123
]
}
],
"url": "<string>"
}' \
--form 'remixPrompt=<string>' \
--form 'callback=<string>'import requests
url = "https://api.legnext.ai/api/v1/upload-paint"
payload = "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"imgUrl\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"canvas\"\r\n\r\n{\r\n \"width\": 123,\r\n \"height\": 123\r\n}\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"imgPos\"\r\n\r\n{\r\n \"width\": 123,\r\n \"height\": 123,\r\n \"x\": 123,\r\n \"y\": 123\r\n}\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"mask\"\r\n\r\n{\r\n \"areas\": [\r\n {\r\n \"width\": 2298,\r\n \"height\": 2298,\r\n \"points\": [\r\n 123\r\n ]\r\n }\r\n ],\r\n \"url\": \"<string>\"\r\n}\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"remixPrompt\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"callback\"\r\n\r\n<string>\r\n-----011000010111000001101001--"
headers = {
"x-api-key": "<api-key>",
"Content-Type": "multipart/form-data"
}
response = requests.post(url, data=payload, headers=headers)
print(response.text)const form = new FormData();
form.append('imgUrl', '<string>');
form.append('canvas', '{
"width": 123,
"height": 123
}');
form.append('imgPos', '{
"width": 123,
"height": 123,
"x": 123,
"y": 123
}');
form.append('mask', '{
"areas": [
{
"width": 2298,
"height": 2298,
"points": [
123
]
}
],
"url": "<string>"
}');
form.append('remixPrompt', '<string>');
form.append('callback', '<string>');
const options = {method: 'POST', headers: {'x-api-key': '<api-key>'}};
options.body = form;
fetch('https://api.legnext.ai/api/v1/upload-paint', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.legnext.ai/api/v1/upload-paint",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"imgUrl\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"canvas\"\r\n\r\n{\r\n \"width\": 123,\r\n \"height\": 123\r\n}\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"imgPos\"\r\n\r\n{\r\n \"width\": 123,\r\n \"height\": 123,\r\n \"x\": 123,\r\n \"y\": 123\r\n}\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"mask\"\r\n\r\n{\r\n \"areas\": [\r\n {\r\n \"width\": 2298,\r\n \"height\": 2298,\r\n \"points\": [\r\n 123\r\n ]\r\n }\r\n ],\r\n \"url\": \"<string>\"\r\n}\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"remixPrompt\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"callback\"\r\n\r\n<string>\r\n-----011000010111000001101001--",
CURLOPT_HTTPHEADER => [
"Content-Type: multipart/form-data",
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.legnext.ai/api/v1/upload-paint"
payload := strings.NewReader("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"imgUrl\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"canvas\"\r\n\r\n{\r\n \"width\": 123,\r\n \"height\": 123\r\n}\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"imgPos\"\r\n\r\n{\r\n \"width\": 123,\r\n \"height\": 123,\r\n \"x\": 123,\r\n \"y\": 123\r\n}\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"mask\"\r\n\r\n{\r\n \"areas\": [\r\n {\r\n \"width\": 2298,\r\n \"height\": 2298,\r\n \"points\": [\r\n 123\r\n ]\r\n }\r\n ],\r\n \"url\": \"<string>\"\r\n}\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"remixPrompt\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"callback\"\r\n\r\n<string>\r\n-----011000010111000001101001--")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.legnext.ai/api/v1/upload-paint")
.header("x-api-key", "<api-key>")
.body("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"imgUrl\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"canvas\"\r\n\r\n{\r\n \"width\": 123,\r\n \"height\": 123\r\n}\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"imgPos\"\r\n\r\n{\r\n \"width\": 123,\r\n \"height\": 123,\r\n \"x\": 123,\r\n \"y\": 123\r\n}\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"mask\"\r\n\r\n{\r\n \"areas\": [\r\n {\r\n \"width\": 2298,\r\n \"height\": 2298,\r\n \"points\": [\r\n 123\r\n ]\r\n }\r\n ],\r\n \"url\": \"<string>\"\r\n}\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"remixPrompt\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"callback\"\r\n\r\n<string>\r\n-----011000010111000001101001--")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.legnext.ai/api/v1/upload-paint")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request.body = "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"imgUrl\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"canvas\"\r\n\r\n{\r\n \"width\": 123,\r\n \"height\": 123\r\n}\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"imgPos\"\r\n\r\n{\r\n \"width\": 123,\r\n \"height\": 123,\r\n \"x\": 123,\r\n \"y\": 123\r\n}\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"mask\"\r\n\r\n{\r\n \"areas\": [\r\n {\r\n \"width\": 2298,\r\n \"height\": 2298,\r\n \"points\": [\r\n 123\r\n ]\r\n }\r\n ],\r\n \"url\": \"<string>\"\r\n}\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"remixPrompt\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"callback\"\r\n\r\n<string>\r\n-----011000010111000001101001--"
response = http.request(request)
puts response.read_body{
"code": 400,
"message": "Invalid request parameters",
"raw_message": "Invalid request parameters",
"detail": null
}{
"code": 401,
"message": "Failed to verify api key",
"raw_message": "",
"detail": null
}{
"code": 402,
"message": "insufficient quota",
"raw_message": "insufficient quota",
"detail": null
}{
"code": 403,
"message": "Forbidden - Sensitive content detected",
"raw_message": "Forbidden - Sensitive content detected",
"detail": null
}{
"code": 413,
"message": "File size exceeds maximum limit",
"raw_message": "file too large",
"detail": null
}{
"code": 422,
"message": "Invalid parameter values",
"raw_message": "Invalid parameter values",
"detail": null
}{
"code": 429,
"message": "rate limit exceeded, please retry later",
"raw_message": "rate limit exceeded, please retry later",
"detail": null
}{
"code": 500,
"message": "Internal server error",
"raw_message": "Internal server error",
"detail": null
}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 |
Example Request
curl -X POST "https://api.legnext.ai/api/v1/upload-paint" \
-H "x-api-key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"imgUrl": "https://cdn.legnext.ai/mj/ba5d06e1-5078-4465-adc1-a4264ecdfac7_0.png",
"canvas": {
"width": 1024,
"height": 1024
},
"imgPos": {
"width": 512,
"height": 512,
"x": 256,
"y": 256
},
"mask": {
"areas": [
{
"width": 500,
"height": 500,
"points": [
10,
10,
10,
100,
100,
100,
100,
10
]
}
]
},
"remixPrompt": "A beautiful mountain scene with trees",
"callback": "https://webhook.site/d0ca59bc-35a6-4a1e-b1b1-aea7faeb7f67"
}'
import requests
url = "https://api.legnext.ai/api/v1/upload-paint"
headers = {
"x-api-key": "YOUR_API_KEY",
"Content-Type": "application/json"
}
data = {
"imgUrl": "https://cdn.legnext.ai/mj/ba5d06e1-5078-4465-adc1-a4264ecdfac7_0.png",
"canvas": {
"width": 1024,
"height": 1024
},
"imgPos": {
"width": 512,
"height": 512,
"x": 256,
"y": 256
},
"mask": {
"areas": [
{
"width": 500,
"height": 500,
"points": [
10,
10,
10,
100,
100,
100,
100,
10
]
}
]
},
"remixPrompt": "A beautiful mountain scene with trees",
"callback": "https://webhook.site/d0ca59bc-35a6-4a1e-b1b1-aea7faeb7f67"
}
response = requests.post(url, headers=headers, json=data)
result = response.json()
print(result)
const response = await fetch('https://api.legnext.ai/api/v1/upload-paint', {
method: 'POST',
headers: {
'x-api-key': 'YOUR_API_KEY',
'Content-Type': 'application/json'
},
body: JSON.stringify({
imgUrl: 'https://cdn.legnext.ai/mj/ba5d06e1-5078-4465-adc1-a4264ecdfac7_0.png',
canvas: {
width: 1024,
height: 1024
},
imgPos: {
width: 512,
height: 512,
x: 256,
y: 256
},
mask: {
areas: [
{
width: 500,
height: 500,
points: [
10,
10,
10,
100,
100,
100,
100,
10
]
}
]
},
remixPrompt: 'A beautiful mountain scene with trees',
callback: 'https://webhook.site/d0ca59bc-35a6-4a1e-b1b1-aea7faeb7f67'
})
});
const result = await response.json();
console.log(result);
Response
Returns a task object containing the task information.{
"job_id": "aa7bd9d9-e20d-408d-b031-46cde06ee888",
"model": "midjourney",
"task_type": "upload_paint",
"status": "pending",
"config": {
"service_mode": "public",
"webhook_config": {
"endpoint": "https://webhook.site/d0ca59bc-35a6-4a1e-b1b1-aea7faeb7f67",
"secret": ""
}
},
"input": null,
"output": {
"image_url": "",
"image_urls": null,
"seed": ""
},
"meta": {
"created_at": "",
"started_at": "",
"ended_at": "",
"usage": {
"type": "point",
"frozen": 120,
"consume": 0
}
},
"detail": null,
"logs": [],
"error": {
"code": 0,
"raw_message": "",
"message": "",
"detail": null
}
}
This is the initial success response. Use the
job_id to check the task status via the Get Task endpoint to retrieve the completed result with image URLs.Authorizations
API key for authentication
Body
multipart/form-data
URL of the source image
Maximum string length:
1024Target canvas dimensions
Show child attributes
Show child attributes
Image position relative to canvas
Show child attributes
Show child attributes
Areas to edit on the original image
Show child attributes
Show child attributes
Text prompt for the editing operation
Required string length:
1 - 8192Callback URL for task completion notifications
Response
Upload paint task created successfully
⌘I