Midjourney Seed 检索查询端点 - TimRouter API 中转端点
▼
Authorization
在 Header 新增配置项 Authorization,其值为 Bearer 之后拼接组合 Token
代码示例:
Authorization: Bearer ********************
请求配置项
Header 配置项
Authorization
string
按需传入
示例: Bearer {{YOUR_API_KEY}}
Body 配置项 application/json
multipart/form-data
按需传入
ids
array[string]
按需传入
示例: ["1231234123","456456456"] 请求
示例
{
"id": "1730621826053455",
"action": "IMAGINE",
"customId": "",
"botType": "",
"prompt": "pig --v 6.1",
"promptEn": "pig --v 6.1",
"description": "Submit success",
"state": "",
"submitTime": 1730621826053,
"startTime": 1730621828024,
"finishTime": 1730621855817,
"imageUrl": "https://cdnmjp.oneabc.org/attachments/1300842274347028520/1302547211321741343/kennedyhernandez46715_74108_pig_3785da15-4f70-4034-9128-f3ff1ac634fa.png?ex=6728831f&is=6727319f&hm=f6d701914d608e4da9298d2290b3616317264a70635fbf08a37ca6c1bb671b50&",
"status": "SUCCESS",
"progress": "100%",
"failReason": "",
"buttons": [
{
"customId": "MJ::JOB::upsample::1::3785da15-4f70-4034-9128-f3ff1ac634fa",
"emoji": "",
"label": "U1",
"type": 2,
"style": 2
},
{
"customId": "MJ::JOB::upsample::2::3785da15-4f70-4034-9128-f3ff1ac634fa",
"emoji": "",
"label": "U2",
"type": 2,
"style": 2
},
{
"customId": "MJ::JOB::upsample::3::3785da15-4f70-4034-9128-f3ff1ac634fa",
"emoji": "",
"label": "U3",
"type": 2,
"style": 2
},
{
"customId": "MJ::JOB::upsample::4::3785da15-4f70-4034-9128-f3ff1ac634fa",
"emoji": "",
"label": "U4",
"type": 2,
"style": 2
},
{
"customId": "MJ::JOB::reroll::0::3785da15-4f70-4034-9128-f3ff1ac634fa::SOLO",
"emoji": "🔄",
"label": "",
"type": 2,
"style": 2
},
{
"customId": "MJ::JOB::variation::1::3785da15-4f70-4034-9128-f3ff1ac634fa",
"emoji": "",
"label": "V1",
"type": 2,
"style": 2
},
{
"customId": "MJ::JOB::variation::2::3785da15-4f70-4034-9128-f3ff1ac634fa",
"emoji": "",
"label": "V2",
"type": 2,
"style": 2
},
{
"customId": "MJ::JOB::variation::3::3785da15-4f70-4034-9128-f3ff1ac634fa",
"emoji": "",
"label": "V3",
"type": 2,
"style": 2
},
{
"customId": "MJ::JOB::variation::4::3785da15-4f70-4034-9128-f3ff1ac634fa",
"emoji": "",
"label": "V4",
"type": 2,
"style": 2
}
],
"maskBase64": "",
"properties": {
"finalPrompt": "pig --v 6.1",
"finalZhPrompt": ""
}
}
请求代码示例
var myHeaders = new Headers();
myHeaders.append("Authorization", "Bearer YOUR_API_KEY");
var formdata = new FormData();
formdata.append("ids", "1231234123");
formdata.append("ids", "456456456");
var requestOptions = {
method: 'GET',
headers: myHeaders,
body: formdata,
redirect: 'follow'
};
fetch("https://api.timrouter.com/mj/task//image-seed", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));
import http.client
import mimetypes
from codecs import encode
conn = http.client.HTTPSConnection("api.timrouter.com")
dataList = []
boundary = 'wL36Yn8afVp8Ag7AmP8qZ0SA4n1v9T'
dataList.append(encode('--' + boundary))
dataList.append(encode('Content-Disposition: form-data; name=ids;'))
dataList.append(encode('Content-Type: {}'.format('text/plain')))
dataList.append(encode(''))
dataList.append(encode("1231234123"))
dataList.append(encode('--' + boundary))
dataList.append(encode('Content-Disposition: form-data; name=ids;'))
dataList.append(encode('Content-Type: {}'.format('text/plain')))
dataList.append(encode(''))
dataList.append(encode("456456456"))
dataList.append(encode('--'+boundary+'--'))
dataList.append(encode(''))
body = b'\r\n'.join(dataList)
payload = body
headers = {
'Authorization': 'Bearer YOUR_API_KEY',
'Content-type': 'multipart/form-data; boundary={}'.format(boundary)
}
conn.request("GET", "/mj/task//image-seed", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
输出返回响应
返回响应配置项 🟢 200 OK · application/json
id
string
必须传入
action
string
必须传入
customId
string
必须传入
botType
string
必须传入
prompt
string
必须传入
promptEn
string
必须传入
description
string
必须传入
state
string
必须传入
submitTime
integer
必须传入
startTime
integer
必须传入
finishTime
integer
必须传入
imageUrl
string
必须传入
status
string
必须传入
progress
string
必须传入
failReason
string
必须传入
buttons
array [object]
必须传入
customId
string
必须传入
emoji
string
必须传入
label
string
必须传入
type
integer
必须传入
style
integer
必须传入
maskBase64
string
必须传入
properties
object
必须传入
finalPrompt
string
必须传入
finalZhPrompt
string
必须传入
{ "id": "1730621826053455", "action": "IMAGINE", "customId": "", "botType": "", "prompt": "pig --v 6.1", "promptEn": "pig --v 6.1", "description": "Submit success", "state": "", "submitTime": 1730621826053, "startTime": 1730621828024, "finishTime": 1730621855817, "imageUrl": "https://cdnmjp.oneabc.org/attachments/1300842274347028520/1302547211321741343/kennedyhernandez46715_74108_pig_3785da15-4f70-4034-9128-f3ff1ac634fa.png?ex=6728831f&is=6727319f&hm=f6d701914d608e4da9298d2290b3616317264a70635fbf08a37ca6c1bb671b50&", "status": "SUCCESS", "progress": "100%", "failReason": "", "buttons": [ { "customId": "MJ::JOB::upsample::1::3785da15-4f70-4034-9128-f3ff1ac634fa", "emoji": "", "label": "U1", "type": 2, "style": 2 }, { "customId": "MJ::JOB::upsample::2::3785da15-4f70-4034-9128-f3ff1ac634fa", "emoji": "", "label": "U2", "type": 2, "style": 2 }, { "customId": "MJ::JOB::upsample::3::3785da15-4f70-4034-9128-f3ff1ac634fa", "emoji": "", "label": "U3", "type": 2, "style": 2 }, { "customId": "MJ::JOB::upsample::4::3785da15-4f70-4034-9128-f3ff1ac634fa", "emoji": "", "label": "U4", "type": 2, "style": 2 }, { "customId": "MJ::JOB::reroll::0::3785da15-4f70-4034-9128-f3ff1ac634fa::SOLO", "emoji": "🔄", "label": "", "type": 2, "style": 2 }, { "customId": "MJ::JOB::variation::1::3785da15-4f70-4034-9128-f3ff1ac634fa", "emoji": "", "label": "V1", "type": 2, "style": 2 }, { "customId": "MJ::JOB::variation::2::3785da15-4f70-4034-9128-f3ff1ac634fa", "emoji": "", "label": "V2", "type": 2, "style": 2 }, { "customId": "MJ::JOB::variation::3::3785da15-4f70-4034-9128-f3ff1ac634fa", "emoji": "", "label": "V3", "type": 2, "style": 2 }, { "customId": "MJ::JOB::variation::4::3785da15-4f70-4034-9128-f3ff1ac634fa", "emoji": "", "label": "V4", "type": 2, "style": 2 } ], "maskBase64": "", "properties": { "finalPrompt": "pig --v 6.1", "finalZhPrompt": "" } }