Midjourney Task Query
Query Midjourney single tasks, batch tasks, and task image seed, and download results through the image proxy.
https://zx1.deepwl.net/mj/task/{id}/fetchcurl https://zx1.deepwl.net/mj/task/1712158011464906/fetch \
-H "Authorization: Bearer YOUR_API_KEY"{
"id": "1712158011464906",
"action": "IMAGINE",
"prompt": "Cat",
"promptEn": "Cat",
"description": "Submit success",
"submitTime": 1735689600000,
"startTime": 1735689610000,
"finishTime": 0,
"imageUrl": "",
"status": "IN_PROGRESS",
"progress": "65%",
"failReason": "",
"buttons": null,
"state": "",
"VideoUrl": "",
"imageWidth": 0,
"imageHeight": 0,
"imageUrls": []
}The Midjourney query endpoints are used to poll task progress, read the final image info, and fetch task buttons and seed.
Endpoints
| Method | Path | Purpose |
|---|---|---|
GET | /mj/task/{id}/fetch | Query a single task |
POST | /mj/task/list-by-condition | Batch query by a list of task IDs |
GET | /mj/task/{id}/image-seed | Query the task image seed |
GET | /mj/image/{id} | Proxy the task image (gateway addition, not covered by the doc) |
Request Headers
Authorizationstring必填Authentication header. Uses a Bearer token, e.g. Bearer YOUR_API_KEY.
Query a Single Task
GET /mj/task/{id}/fetch
task_idstring必填Task ID, the same as the result returned by the submission endpoints.
Response Fields
The doc marks almost all fields except progress as required response fields.
idstringTask ID.
actionstringTask type. Allowed values: IMAGINE, UPSCALE, VARIATION, ZOOM, PAN, DESCRIBE, BLEND, SHORTEN, SWAP_FACE.
promptstringPrompt.
promptEnstringEnglish prompt.
descriptionstringTask description.
submitTimeintegerSubmission time.
startTimeintegerExecution start time.
finishTimeintegerFinish time.
imageUrlstringImage URL.
statusstringTask status. Allowed values: NOT_START, SUBMITTED, MODAL, IN_PROGRESS, FAILURE, SUCCESS, CANCEL.
progressstringTask progress, e.g. 0%, 65%, 100%.
failReasonstringFailure reason.
buttonsarray<object> | nullButtons shown below the image. To trigger one, pass its customId to the Submit Action Task endpoint.
customIdstringAction identifier.
emojistringEmoji icon.
typeintegerType; used internally.
styleintegerType; used internally.
statestringCustom parameter.
VideoUrlstringVideo URL (note that the doc field name is VideoUrl, capitalized).
imageWidthintegerImage width.
imageHeightintegerImage height.
imageUrlsarray<string>List of image URLs.
Batch Query Tasks
POST /mj/task/list-by-condition
idsarray<string>必填List of task IDs.
The response is an array of task objects with the same fields as the single-task query, but without VideoUrl, imageWidth, and imageHeight (those three are returned only by the single-task query).
Get Task Image Seed
GET /mj/task/{id}/image-seed
The response result is the image seed.
Get the Public Image
GET /mj/image/{id}
This endpoint proxies the task image and is convenient for downloading the final image. It is a gateway addition and is not covered by the doc.