v1

latestOpenAPI 3.1.02026-07-267724480.0 KB

Fetch a Midjourney task

Use the task id returned by imagine, action, blend, modal, or editor endpoints. This is the main polling endpoint for Midjourney workflows on CometAPI.

get/mj/task/{id}/fetch

Path parameters

idstring required

Midjourney task id.

Response

Current task state.

idstring required

Task id.

actionstring

Task type: IMAGINE, UPSCALE, VARIATION, DESCRIBE, BLEND, VIDEO, or another action name.

customIdstring

Button customId that created this task, when the task came from an action.

botTypestring

Bot that handled the task, MID_JOURNEY or NIJI_JOURNEY, when reported.

promptstring

Original prompt as submitted.

promptEnstring

Prompt after translation to the provider language. For DESCRIBE tasks, the extracted prompt suggestions arrive here.

descriptionstring

Human-readable submission status message.

statestring

Custom state string echoed back from the submission for your own tracking.

submitTimeinteger

Submission time as a Unix timestamp in milliseconds.

startTimeinteger

Processing start time as a Unix timestamp in milliseconds.

finishTimeinteger

Completion time as a Unix timestamp in milliseconds.

imageUrlstring required

Stable CometAPI-proxied image link (https://api.cometapi.com/mj/image/{id}). Prefer this link; entries in image_urls point at provider storage and can expire.

videoUrlstring

Generated video link for VIDEO tasks.

statusstring required

Task lifecycle state: NOT_START, SUBMITTED, IN_PROGRESS, SUCCESS, or FAILURE.

progressstring required

Progress percentage string such as 58% while the task runs and 100% when finished.

failReasonstring

Failure reason when status is FAILURE.

maskBase64string

Mask attached to the task when a region edit created it.

Example response

{
  "id": "1773314942177684",
  "status": "SUCCESS",
  "progress": "100%",
  "imageUrl": "https://api.cometapi.com/mj/image/1773314942177684",
  "videoUrl": "",
  "buttons": [
    {
      "customId": "MJ::JOB::upsample::1::example",
      "emoji": "",
      "label": "U1",
      "type": 2,
      "style": 1
    }
  ]
}