Midjourney Action 操作接口 - QuickRouter API 中转接口
▼
Authorization
在 Header 添加参数 Authorization,其值为 Bearer 之后拼接 Token
示例:
Authorization: Bearer ********************
官方文档:https://docs.midjourney.com/hc/en-us/articles/32804058614669-Upscalers
请求参数
Header 参数
Authorization
string
可选
示例: Bearer {{YOUR_API_KEY}}
Body 参数 application/json
chooseSameChannel
boolean
必需
是否选择同一频道下的账号,默认只使用任务关联的账号
customId
string
可选
动作标识 可选 示例: MJ::JOB::upsample::2::3dbbd469-36af-4a0f-8f02-df6c579e7011
taskId
string
可选
任务ID 可选 示例: 14001934816969359
notifyHook
string
可选
回调地址, 为空时使用全局notifyHook
state
string
可选
自定义参数 可选 { "chooseSameChannel": true, "customId": "MJ::JOB::upsample::2::3dbbd469-36af-4a0f-8f02-df6c579e7011", "taskId": "14001934816969359", "notifyHook": "", "state": "" } 请求
示例
{
"chooseSameChannel": true,
"customId": "MJ::JOB::upsample::2::3dbbd469-36af-4a0f-8f02-df6c579e7011",
"taskId": "14001934816969359",
"notifyHook": "",
"state": ""
}
请求示例代码
var myHeaders = new Headers();
myHeaders.append("Authorization", "Bearer YOUR_API_KEY");
myHeaders.append("Content-Type", "application/json");
var raw = JSON.stringify({
"chooseSameChannel": true,
"customId": "MJ::JOB::upsample::2::3dbbd469-36af-4a0f-8f02-df6c579e7011",
"taskId": "14001934816969359",
"notifyHook": "",
"state": ""
});
var requestOptions = {
method: 'POST',
headers: myHeaders,
body: raw,
redirect: 'follow'
};
fetch("https://api.quickrouter.ai/mj/submit/action", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));
import http.client
import json
conn = http.client.HTTPSConnection("api.quickrouter.ai")
payload = json.dumps({
"chooseSameChannel": True,
"customId": "MJ::JOB::upsample::2::3dbbd469-36af-4a0f-8f02-df6c579e7011",
"taskId": "14001934816969359",
"notifyHook": "",
"state": ""
})
headers = {
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json'
}
conn.request("POST", "/mj/submit/action", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
返回响应
响应参数 🟢 200 OK · application/json
image
可选
application/json
created
integer
必需
data
array [object]
必需
url
string
必需
{ "created": 1589478378, "data": [ { "url": "https://..." }, { "url": "https://..." } ] }
示例
{
"created": 1589478378,
"data": [
{
"url": "https://..."
},
{
"url": "https://..."
}
]
}