查询任务
curl --request GET \
--url https://model-api.skyengine.com.cn/v1/tob/job/{jobId} \
--header 'Authorization: Bearer <token>'import requests
url = "https://model-api.skyengine.com.cn/v1/tob/job/{jobId}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://model-api.skyengine.com.cn/v1/tob/job/{jobId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://model-api.skyengine.com.cn/v1/tob/job/{jobId}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://model-api.skyengine.com.cn/v1/tob/job/{jobId}")
.header("Authorization", "Bearer <token>")
.asString();<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://model-api.skyengine.com.cn/v1/tob/job/{jobId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}{
"id": "<job_id>",
"status": 0,
"urls": [],
"comment": "JobStatusQueued"
}悠船 MJ 图片接口
查询任务
使用原始id查询任务,必须使用提交任务时的同一个平台API Key。任务状态为数字0/1/2/3,图片在urls中;查询不会再次生成图片。
GET
/
v1
/
tob
/
job
/
{jobId}
查询任务
curl --request GET \
--url https://model-api.skyengine.com.cn/v1/tob/job/{jobId} \
--header 'Authorization: Bearer <token>'import requests
url = "https://model-api.skyengine.com.cn/v1/tob/job/{jobId}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://model-api.skyengine.com.cn/v1/tob/job/{jobId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://model-api.skyengine.com.cn/v1/tob/job/{jobId}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://model-api.skyengine.com.cn/v1/tob/job/{jobId}")
.header("Authorization", "Bearer <token>")
.asString();<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://model-api.skyengine.com.cn/v1/tob/job/{jobId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}{
"id": "<job_id>",
"status": 0,
"urls": [],
"comment": "JobStatusQueued"
}状态含义、轮询代码与错误处理见 Midjourney 图片生成与编辑示例。
Authorizations
在 Authorization 请求头中传入 Bearer 。
Path Parameters
任务响应中的id。
Minimum string length:
1Response
返回当前任务状态;失败任务也通过status=3表达。
原始任务ID。后续编辑作为jobId,查询作为路径参数。
0等待;1执行中;2成功;3失败。
Available options:
0, 1, 2, 3 成功后的图片地址;等待中通常为空。
状态说明或任务失败原因。
上游任务消耗信息;完成前可能变化,不等同于平台钱包流水或最终实付账单。
Show child attributes
Show child attributes

