- OpenAI通用接口
- 聊天接口(Chat)
- 图像接口(Images)
- 帮助中心
- gemini
- Midjourney API文档
- Flux(文生图)
- Replicate格式
- OpenAI DallE3格式POST
- Runway视频接口
- Luma视频接口
- 可灵API(官方接口)
- 工作流接口
- suno
- ideogram
指定id查询任务
GET
/mj/task/{id}/fetch
id
,查询任务信息。(可以通过轮询调用该接口,实现任务进行的查询。也可以通过回调接口获取)请求参数
Path 参数
id
string
任务ID
Header 参数
Authorization
string
必需
默认值:
{{Authorization}}
示例代码
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//fetch' \
--header 'Authorization;'
返回响应
🟢200成功
application/json
Body
id
string
ID 编号
action
string
必需
IMAGINE
,UPSCALE
,VARIATION
,ZOOM
,PAN
,DESCRIBE
,BLEND
,SHORTEN
,SWAP_FACE
prompt
string
提示词
promptEn
string
提示词-英文
description
string
任务描述
submitTime
integer
提交时间
startTime
integer
开始执行时间
finishTime
integer
结束时间
imageUrl
string
图片url
status
string
必需
NOT_START
,SUBMITTED
,MODAL
,IN_PROGRESS
,FAILURE
,SUCCESS
,CANCEL
progress
string
任务进度
failReason
string
失败原因
buttons
array[object (MjButton) {5}] | null
可选
customId
string
动作标识
emoji
string
图标
label
string
文本
type
integer
可选
style
integer
类型,系统内部使用
state
string
自定义参数
示例
{
"id": "1712205491372224",
"action": "DESCRIBE",
"prompt": "",
"promptEn": "1️⃣ White haired anime boy with blue eyes and black sweatshirt, small white dog in the background, anime style, aesthetic \n\n2️⃣ A cute anime boy with white hair and blue eyes, wearing black , is standing next to his small dog in the sunlight. The background features soft lighting and a simple composition. He has an adorable expression on his face, exuding cuteness., Anime style,Cute hairstyle \n\n3️⃣ A cute anime boy with white hair and blue eyes, wearing black sweatshirt vest, standing next to his small dog. The background is blurred and sunny, creating an atmosphere of calmness and happiness. \n\n4️⃣ White haired anime boy with blue eyes and small white dog, anime style, aesthetic, cute",
"description": "Submit success",
"submitTime": 1712205491372,
"startTime": 1712205494313,
"finishTime": 1712205499534,
"imageUrl": "https://cdn.discordapp.com/ephemeral-attachments/1092492867185950852/1225303391505485904/1712205491372224.jpg?ex=6620a3b5&is=660e2eb5&hm=14ed57f41dce6178c65757ee58a84e8314fde1bf294da32fac2d8ea991dd3e52&",
"status": "SUCCESS",
"progress": "100%",
"failReason": "",
"buttons": [
{
"customId": "MJ::Job::PicReader::1",
"emoji": "1️⃣",
"label": "",
"type": 2,
"style": 2
},
{
"customId": "MJ::Job::PicReader::2",
"emoji": "2️⃣",
"label": "",
"type": 2,
"style": 2
},
{
"customId": "MJ::Job::PicReader::3",
"emoji": "3️⃣",
"label": "",
"type": 2,
"style": 2
},
{
"customId": "MJ::Job::PicReader::4",
"emoji": "4️⃣",
"label": "",
"type": 2,
"style": 2
},
{
"customId": "MJ::Picread::Retry",
"emoji": "🔄",
"label": "",
"type": 2,
"style": 2
},
{
"customId": "MJ::Job::PicReader::all",
"emoji": "🎉",
"label": "Imagine all",
"type": 2,
"style": 2
}
],
"state": ""
}
修改于 2024-12-15 07:08:37