Skip to main content
GET
https://www.geeknow.top
/
mj
/
task
/
{id}
/
fetch
Midjourney 任务查询
curl --request GET \
  --url https://www.geeknow.top/mj/task/{id}/fetch \
  --header 'Authorization: Bearer <token>'
{
  "id": "1712158011464906",
  "action": "IMAGINE",
  "prompt": "Cat",
  "promptEn": "Cat",
  "description": "Submit success",
  "submitTime": 1735689600000,
  "startTime": 1735689610000,
  "finishTime": 0,
  "imageUrl": "",
  "videoUrl": "",
  "status": "IN_PROGRESS",
  "progress": "65%",
  "failReason": "",
  "buttons": null,
  "state": "",
  "imageUrls": []
}

Documentation Index

Fetch the complete documentation index at: https://docs.geeknow.top/llms.txt

Use this file to discover all available pages before exploring further.

Midjourney 任务查询

Midjourney 查询接口用于轮询任务进度、获取最终图片信息,以及读取任务按钮和 seed。
  • 单任务查询走 GET /mj/task/{id}/fetch
  • 批量查询走 POST /mj/task/list-by-condition
  • 图片 seed 查询走 GET /mj/task/{id}/image-seed

查询单个任务

GET /mj/task/{id}/fetch
curl https://www.geeknow.top/mj/task/1712158011464906/fetch \
  -H "Authorization: Bearer YOUR_API_KEY"

响应字段

id
string
任务 ID。
action
string
任务动作,常见值包括 IMAGINEUPSCALEVARIATIONZOOMPANDESCRIBEBLENDSHORTENSWAP_FACE
prompt
string
原始提示词。
promptEn
string
英文提示词。
description
string
任务描述。
submitTime
integer
提交时间。
startTime
integer
开始执行时间。
finishTime
integer
结束时间。
imageUrl
string
主图片地址。
videoUrl
string
视频地址。
status
string
任务状态,常见值为 NOT_STARTSUBMITTEDMODALIN_PROGRESSFAILURESUCCESSCANCEL
progress
string
任务进度,例如 0%65%100%
failReason
string
失败原因。
buttons
array<object> | null
图片下方可继续触发的操作按钮数组。
state
string
自定义参数。
imageUrls
array<object> | array<string>
图片列表。

响应示例

{
  "id": "1712158011464906",
  "action": "IMAGINE",
  "prompt": "Cat",
  "promptEn": "Cat",
  "description": "Submit success",
  "submitTime": 1735689600000,
  "startTime": 1735689610000,
  "finishTime": 0,
  "imageUrl": "",
  "videoUrl": "",
  "status": "IN_PROGRESS",
  "progress": "65%",
  "failReason": "",
  "buttons": null,
  "state": "",
  "imageUrls": []
}

批量查询任务

POST /mj/task/list-by-condition
{
  "ids": [
    "1712158011464906"
  ]
}
返回值是任务对象数组,字段与单任务查询基本一致。

获取任务图片 seed

GET /mj/task/{id}/image-seed
{
  "code": 1,
  "description": "",
  "result": "1234567890"
}

获取公开图片

GET /mj/image/{id}
这个接口会代理任务图片,适合直接下载最终图片:
curl -L https://www.geeknow.top/mj/image/1712158011464906 --output output.png

相关接口