Midjourney

Midjourney Task Query

Query Midjourney single tasks, batch tasks, and task image seed, and download results through the image proxy.

GEThttps://zx1.deepwl.net/mj/task/{id}/fetch
Request
curl https://zx1.deepwl.net/mj/task/1712158011464906/fetch \
  -H "Authorization: Bearer YOUR_API_KEY"
Response
{
  "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

MethodPathPurpose
GET/mj/task/{id}/fetchQuery a single task
POST/mj/task/list-by-conditionBatch query by a list of task IDs
GET/mj/task/{id}/image-seedQuery 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.

idstring

Task ID.

actionstring

Task type. Allowed values: IMAGINE, UPSCALE, VARIATION, ZOOM, PAN, DESCRIBE, BLEND, SHORTEN, SWAP_FACE.

promptstring

Prompt.

promptEnstring

English prompt.

descriptionstring

Task description.

submitTimeinteger

Submission time.

startTimeinteger

Execution start time.

finishTimeinteger

Finish time.

imageUrlstring

Image URL.

statusstring

Task status. Allowed values: NOT_START, SUBMITTED, MODAL, IN_PROGRESS, FAILURE, SUCCESS, CANCEL.

progressstring

Task progress, e.g. 0%, 65%, 100%.

failReasonstring

Failure reason.

buttonsarray<object> | null

Buttons shown below the image. To trigger one, pass its customId to the Submit Action Task endpoint.

customIdstring

Action identifier.

emojistring

Emoji icon.

typeinteger

Type; used internally.

styleinteger

Type; used internally.

statestring

Custom parameter.

VideoUrlstring

Video URL (note that the doc field name is VideoUrl, capitalized).

imageWidthinteger

Image width.

imageHeightinteger

Image 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.

Request Examples

Response Examples