GET
https://octopusx.ai
/
mj
/
task
/
{id}
/
fetch
Midjourney Task Query
curl --request GET \
  --url https://octopusx.ai/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": []
}

Midjourney Task Query

The Midjourney query API is used to poll task progress, retrieve final image information, and read task buttons and seed.
  • Single task queries use GET /mj/task/{id}/fetch
  • Batch queries use POST /mj/task/list-by-condition
  • Image seed queries use GET /mj/task/{id}/image-seed

Query a Single Task

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

Response Fields

id
string
Task ID.
action
string
Task action. Common values include IMAGINE, UPSCALE, VARIATION, ZOOM, PAN, DESCRIBE, BLEND, SHORTEN, SWAP_FACE.
prompt
string
Original prompt.
promptEn
string
English prompt.
description
string
Task description.
submitTime
integer
Submission time.
startTime
integer
Start execution time.
finishTime
integer
End time.
imageUrl
string
Primary image URL.
videoUrl
string
Video URL.
status
string
Task status. Common values are NOT_START, SUBMITTED, MODAL, IN_PROGRESS, FAILURE, SUCCESS, CANCEL.
progress
string
Task progress, for example 0%, 65%, 100%.
failReason
string
Reason for failure.
buttons
array<object> | null
Array of action buttons that can still be triggered below the image.
state
string
Custom parameter.
imageUrls
array<object> | array<string>
Image list.

Response Example

{
  "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": []
}

Query Tasks in Batch

POST /mj/task/list-by-condition
{
  "ids": [
    "1712158011464906"
  ]
}
The return value is an array of task objects, and the fields are basically the same as those in the single task query.

Get Task Image Seed

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

Get Public Image

GET /mj/image/{id}
This endpoint proxies the task image and is suitable for directly downloading the final image:
curl -L https://octopusx.ai/mj/image/1712158011464906 --output output.png