区域重绘
curl --request POST \
--url https://model-api.skyengine.com.cn/v1/tob/inpaint \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"jobId": "<source_job_id>",
"imageNo": 0,
"mask": {
"areas": [
{
"width": 1024,
"height": 1024,
"points": [
300,
300,
300,
700,
700,
700,
700,
300
]
}
]
}
}
'import requests
url = "https://model-api.skyengine.com.cn/v1/tob/inpaint"
payload = {
"jobId": "<source_job_id>",
"imageNo": 0,
"mask": { "areas": [
{
"width": 1024,
"height": 1024,
"points": [300, 300, 300, 700, 700, 700, 700, 300]
}
] }
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
jobId: '<source_job_id>',
imageNo: 0,
mask: {
areas: [{width: 1024, height: 1024, points: [300, 300, 300, 700, 700, 700, 700, 300]}]
}
})
};
fetch('https://model-api.skyengine.com.cn/v1/tob/inpaint', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://model-api.skyengine.com.cn/v1/tob/inpaint"
payload := strings.NewReader("{\n \"jobId\": \"<source_job_id>\",\n \"imageNo\": 0,\n \"mask\": {\n \"areas\": [\n {\n \"width\": 1024,\n \"height\": 1024,\n \"points\": [\n 300,\n 300,\n 300,\n 700,\n 700,\n 700,\n 700,\n 300\n ]\n }\n ]\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://model-api.skyengine.com.cn/v1/tob/inpaint")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"jobId\": \"<source_job_id>\",\n \"imageNo\": 0,\n \"mask\": {\n \"areas\": [\n {\n \"width\": 1024,\n \"height\": 1024,\n \"points\": [\n 300,\n 300,\n 300,\n 700,\n 700,\n 700,\n 700,\n 300\n ]\n }\n ]\n }\n}")
.asString();<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://model-api.skyengine.com.cn/v1/tob/inpaint",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'jobId' => '<source_job_id>',
'imageNo' => 0,
'mask' => [
'areas' => [
[
'width' => 1024,
'height' => 1024,
'points' => [
300,
300,
300,
700,
700,
700,
700,
300
]
]
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}{
"id": "<job_id>",
"status": 1,
"urls": [],
"comment": "执行中"
}{
"error": {
"code": 2004,
"message": "unsupported field \"callback\""
}
}{
"error": {
"code": 2002,
"message": "Youchuan submit failed"
}
}{
"error": {
"code": 2007,
"message": "too many active image jobs"
}
}悠船 MJ 图片接口
区域重绘
按蒙版区域重新生成;坐标应与来源图匹配。 所有字段均通过JSON传入;不支持callback。成功提交返回原始任务id,使用GET /v1/tob/job/轮询结果。
POST
/
v1
/
tob
/
inpaint
区域重绘
curl --request POST \
--url https://model-api.skyengine.com.cn/v1/tob/inpaint \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"jobId": "<source_job_id>",
"imageNo": 0,
"mask": {
"areas": [
{
"width": 1024,
"height": 1024,
"points": [
300,
300,
300,
700,
700,
700,
700,
300
]
}
]
}
}
'import requests
url = "https://model-api.skyengine.com.cn/v1/tob/inpaint"
payload = {
"jobId": "<source_job_id>",
"imageNo": 0,
"mask": { "areas": [
{
"width": 1024,
"height": 1024,
"points": [300, 300, 300, 700, 700, 700, 700, 300]
}
] }
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
jobId: '<source_job_id>',
imageNo: 0,
mask: {
areas: [{width: 1024, height: 1024, points: [300, 300, 300, 700, 700, 700, 700, 300]}]
}
})
};
fetch('https://model-api.skyengine.com.cn/v1/tob/inpaint', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://model-api.skyengine.com.cn/v1/tob/inpaint"
payload := strings.NewReader("{\n \"jobId\": \"<source_job_id>\",\n \"imageNo\": 0,\n \"mask\": {\n \"areas\": [\n {\n \"width\": 1024,\n \"height\": 1024,\n \"points\": [\n 300,\n 300,\n 300,\n 700,\n 700,\n 700,\n 700,\n 300\n ]\n }\n ]\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://model-api.skyengine.com.cn/v1/tob/inpaint")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"jobId\": \"<source_job_id>\",\n \"imageNo\": 0,\n \"mask\": {\n \"areas\": [\n {\n \"width\": 1024,\n \"height\": 1024,\n \"points\": [\n 300,\n 300,\n 300,\n 700,\n 700,\n 700,\n 700,\n 300\n ]\n }\n ]\n }\n}")
.asString();<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://model-api.skyengine.com.cn/v1/tob/inpaint",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'jobId' => '<source_job_id>',
'imageNo' => 0,
'mask' => [
'areas' => [
[
'width' => 1024,
'height' => 1024,
'points' => [
300,
300,
300,
700,
700,
700,
700,
300
]
]
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}{
"id": "<job_id>",
"status": 1,
"urls": [],
"comment": "执行中"
}{
"error": {
"code": 2004,
"message": "unsupported field \"callback\""
}
}{
"error": {
"code": 2002,
"message": "Youchuan submit failed"
}
}{
"error": {
"code": 2007,
"message": "too many active image jobs"
}
}完整流程、参数组合与轮询示例见 Midjourney 图片生成与编辑示例。
Authorizations
在 Authorization 请求头中传入 Bearer 。
Body
application/json
来源任务 id;使用与提交来源任务相同的平台 API Key。
Minimum string length:
1Example:
"<source_job_id>"
来源 urls 的图片下标,当前允许0~3。
Required range:
0 <= x <= 3Example:
0
使用坐标区域 areas 或蒙版 URL。
- Option 1
- Option 2
Show child attributes
Show child attributes
新的提示词。
Minimum string length:
1Example:
"A blue ceramic mug on a white table"
Response
任务已受理;也可能直接返回终态。
原始任务ID。后续编辑作为jobId,查询作为路径参数。
0等待;1执行中;2成功;3失败。
Available options:
0, 1, 2, 3 成功后的图片地址;等待中通常为空。
状态说明或任务失败原因。
上游任务消耗信息;完成前可能变化,不等同于平台钱包流水或最终实付账单。
Show child attributes
Show child attributes

