- 前言(必读)
- OpenAI官方SDK使用教程
- 批量请求示例
- 聊天模型(Chat)
- 内容审查
- 向量嵌入
- 图片处理
- 音频模型(Audio)
- 绘画模型(Painting)
- MidJourney
- Dalle
- Grok
- Flux
- Ideogram
- stable-diffusion
- 视频模型(Video)
- 音乐创作(suno)
- 文档处理
- 3D模型
- 更多接口开发中...
- 查询令牌用量GET
- 查询令牌限额GET
查询:根 据ID查询任务
GET
/mj/task/{id}/fetch
请求参数
Authorization
在 Header 添加参数
Authorization
,其值为在 Bearer 之后拼接 Token示例:
Authorization: Bearer ********************
Path 参数
id
string
必需
示例值:
1725017986212425
示例代码
Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location --request GET '/mj/task/1725017986212425/fetch'
返回响应
🟢200成功
application/json
Body
id
string
任务ID
action
enum<string>
任务类型
枚举值:
IMAGINEUPSCALEVARIATIONREROLLDESCRIBEBLEND
customId
string
可选
botType
string
可选
prompt
string
提示词
promptEn
string
提示词-英文
description
string
任务描述
state
string
自定义参
submitTime
integer
提交时间
startTime
integer
开始时间
finishTime
integer
结束时间
imageUrl
string
图片地址
status
enum<string>
任务状态
枚举值:
NOT_STARTSUBMITTEDIN_PROGRESSFAILURESUCCESS
progress
string
任务进度
failReason
string
失败原因
buttons
array [object {5}]
必需
customId
string
Action 提交时使用
emoji
string
必需
label
string
MJ 显示的图标
type
integer
必需
style
integer
必需
maskBase64
string
可选
properties
object
可选
finalPrompt
string
必需
finalZhPrompt
string
必需
示例
{
"id": "1724963337114767",
"action": "IMAGINE",
"customId": "",
"botType": "",
"prompt": "a black dog flying",
"promptEn": "a black dog flying",
"description": "Submit success",
"state": "",
"submitTime": 1724963337114,
"startTime": 1724963338763,
"finishTime": 1724963365565,
"imageUrl": "http://localhost:3001/mj/image/1724963337114767",
"status": "SUCCESS",
"progress": "100%",
"failReason": "",
"buttons": [
{
"customId": "MJ::JOB::upsample::1::e1a4d7e8-8292-412c-aab0-fce932e90479",
"emoji": "",
"label": "U1",
"type": 2,
"style": 2
},
{
"customId": "MJ::JOB::upsample::2::e1a4d7e8-8292-412c-aab0-fce932e90479",
"emoji": "",
"label": "U2",
"type": 2,
"style": 2
},
{
"customId": "MJ::JOB::upsample::3::e1a4d7e8-8292-412c-aab0-fce932e90479",
"emoji": "",
"label": "U3",
"type": 2,
"style": 2
},
{
"customId": "MJ::JOB::upsample::4::e1a4d7e8-8292-412c-aab0-fce932e90479",
"emoji": "",
"label": "U4",
"type": 2,
"style": 2
},
{
"customId": "MJ::JOB::reroll::0::e1a4d7e8-8292-412c-aab0-fce932e90479::SOLO",
"emoji": "🔄",
"label": "",
"type": 2,
"style": 2
},
{
"customId": "MJ::JOB::variation::1::e1a4d7e8-8292-412c-aab0-fce932e90479",
"emoji": "",
"label": "V1",
"type": 2,
"style": 2
},
{
"customId": "MJ::JOB::variation::2::e1a4d7e8-8292-412c-aab0-fce932e90479",
"emoji": "",
"label": "V2",
"type": 2,
"style": 2
},
{
"customId": "MJ::JOB::variation::3::e1a4d7e8-8292-412c-aab0-fce932e90479",
"emoji": "",
"label": "V3",
"type": 2,
"style": 2
},
{
"customId": "MJ::JOB::variation::4::e1a4d7e8-8292-412c-aab0-fce932e90479",
"emoji": "",
"label": "V4",
"type": 2,
"style": 2
}
],
"maskBase64": "",
"properties": {
"finalPrompt": "a black dog flying",
"finalZhPrompt": ""
}
}