- 本站介绍
- 更新日志
- 新版网站介绍
- 自助开票系统使用文档
- Telegram Bot使用文档
- 自建Cloudflare Worker反代教程
- Files文件存储服务 开放API
- OAuth开放API
- Midjourney、SD图像生成 API
- Midjourney开放API接口
- Midjourney服务说明文档
- Midjourney 文生图 任务创建POST
- Midjourney 执行动作 任务创建POST
- Midjourney Blend 混合图生图 任务创建POST
- Midjourney Describe prompt提取 任务创建POST
- Midjourney 查询指定任务ID 的执行状态POST
- Midjourney 分页批量查询任务POST
- 从对象存储获取Midjourney生成的图片GET
- 通过WSRV反代Discord图片GET
- 通过WSRV反代并压缩Discord图片GET
- 从对象存储+WSRV获取Midjourney生成的图片GET
- 从对象存储+WSRV获取Midjourney生成的图片(压缩)GET
- 其它图像生成API
- Flux图像生成
- 管理API列表
- Claude
- OpenAI
- 其它开放API
Midjourney 分页批量查询任务
line1
line1
POST
/api/v1/ai/draw/mj/query-mj-tasks
分页一种常见的数据查询方式,指的是在查询数据时,将查询结果分成多个页面显示,每个页面包含一定数量的数据。
即假设现在有10000条数据,如果一次性查询并返回所有的话不符合最佳实践,此时我们可以请求服务端按照每页12个+请求第一页来实现拿到最新一页的数据,然后服务端会返回第一页的数据并告知总数据量有多少。
请求参数
Authorization
在 Header 添加参数
Authorization
,其值为在 Bearer 之后拼接 Token示例:
Authorization: Bearer ********************
Query 参数
page
number
页标 [1,+∞]
示例值:
1
pageSize
number
可选
示例值:
12
Body 参数application/x-www-form-urlencoded
model
string
必需
midjourney
,用于密钥权限控制示例值:
midjourney
示例代码
Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://cn2us02.opapi.win/api/v1/ai/draw/mj/query-mj-tasks?page=1&pageSize=12' \
--data-urlencode 'model=midjourney'
返回响应
🟢200成功
application/json
Body
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"
}
]
}
}
修改于 2023-09-18 08:54:16