Midjourney 分页批量查询任务
POST
/api/v1/ai/draw/mj/query-mj-tasks通过分页的形式批量查询您账号下的所有Mj任务
注:
分页一种常见的数据查询方式,指的是在查询数据时,将查询结果分成多个页面显示,每个页面包含一定数量的数据。
即假设现在有10000条数据,如果一次性查询并返回所有的话不符合最佳实践,此时我们可以请求服务端按照每页12个+请求第一页来实现拿到最新一页的数据,然后服务端会返回第一页的数据并告知总数据量有多少。
请求参数
Query 参数
page
number
页标 [1,+∞]
示例值:
1
pageSize
number
可选
页面大小 [5~20]
示例值:
12
Body 参数application/x-www-form-urlencoded
model
string
必需
模型名称,目前只能填写midjourney
,用于密钥权限控制
示例值:
midjourney
示例代码
返回响应
成功(200)
HTTP 状态码: 200
内容格式: JSONapplication/json
数据结构
statusCode
integer
必需
message
string
必需
data
object
必需
total
integer
Mj任务总数目
tasks
array [object {15}]
分页查询结果
示例
成功示例
{
"statusCode": 200,
"message": "Success",
"data": {
"taskId": 20,
"taskType": "NORMAL",
"status": "SUCCESS",
"action": "IMAGINE",
"progress": "100%",
"description": "/imagine chibi manga legend of vader anime vh1, in the style of miho hirano, dynamic and action-packed scenes, gaston bussière, chinese new year festivities, ross tran, charming character illustrations, light red and bronze --ar 73:88 --s 750 --niji 5",
"prompt": "chibi manga legend of vader anime vh1, in the style of miho hirano, dynamic and action-packed scenes, gaston bussière, chinese new year festivities, ross tran, charming character illustrations, light red and bronze --ar 73:88 --s 750 --niji 5",
"failReason": null,
"submitTime": "2023-08-31T13:59:14.000Z",
"startTime": "2023-08-31T13:59:14.000Z",
"finishTime": "2023-08-31T13:59:50.000Z",
"webhookUrl": "https://webhook.site/9adf49d8-14c3-4270-b83e-25a9e93bcb40",
"imageDcUrl": "https://cdn.discordapp.com/attachments/1136958712796430388/1146806560803262575/gpg4win_45703_chibi_manga_legend_of_vader_anime_vh1_in_the_styl_0b33153d-f3c4-486b-9b4a-2f0f0ae6a355.png",
"imageS3Url": null,
"actions": [
{
"customId": "MJ::JOB::upsample::1::0b33153d-f3c4-486b-9b4a-2f0f0ae6a355",
"emoji": "",
"label": "U1"
},
{
"customId": "MJ::JOB::upsample::2::0b33153d-f3c4-486b-9b4a-2f0f0ae6a355",
"emoji": "",
"label": "U2"
},
{
"customId": "MJ::JOB::upsample::3::0b33153d-f3c4-486b-9b4a-2f0f0ae6a355",
"emoji": "",
"label": "U3"
},
{
"customId": "MJ::JOB::upsample::4::0b33153d-f3c4-486b-9b4a-2f0f0ae6a355",
"emoji": "",
"label": "U4"
},
{
"customId": "MJ::JOB::reroll::0::0b33153d-f3c4-486b-9b4a-2f0f0ae6a355::SOLO",
"emoji": "🔄",
"label": ""
},
{
"customId": "MJ::JOB::variation::1::0b33153d-f3c4-486b-9b4a-2f0f0ae6a355",
"emoji": "",
"label": "V1"
},
{
"customId": "MJ::JOB::variation::2::0b33153d-f3c4-486b-9b4a-2f0f0ae6a355",
"emoji": "",
"label": "V2"
},
{
"customId": "MJ::JOB::variation::3::0b33153d-f3c4-486b-9b4a-2f0f0ae6a355",
"emoji": "",
"label": "V3"
},
{
"customId": "MJ::JOB::variation::4::0b33153d-f3c4-486b-9b4a-2f0f0ae6a355",
"emoji": "",
"label": "V4"
}
]
}
}
最后修改时间: 1 年前