OmwAIOmwAI
API GuideAPI ReferenceProgramming Tools
Midjourney

Query Task Result

Midjourney task result query endpoint

Queries the progress and result of a Midjourney task by task ID (jobId). After every submit endpoint (IMAGINE / DESCRIBE / BLEND / CHANGE) succeeds, poll this endpoint until the task finishes.

Task status

  • IN_PROGRESS: running; progress holds the percentage;
  • SUCCESS: done; progress is 100%; images / cdnImage contain the result image URLs;
  • FAILURE: failed; failReason describes why.

Images are kept for 2 hours

Result image URLs are temporary signed URLs (assetsExpireAt is the expiry time in Unix seconds). Images are retained for 2 hours and then deleted automatically — download them in time if you need to keep them.

GET
/mj/task/{id}/fetch

Authorization

BearerAuth

AuthorizationBearer <token>

使用你在 OmwAI 中创建的 API 令牌认证。 格式: Authorization: Bearer sk-xxxxxx 只能查询当前令牌所属账号下的任务。

In: header

Path Parameters

id*string

提交任务时返回的任务 ID(jobId)

Response Body

application/json

application/json

curl -X GET "https://www.omwai.xyz/mj/task/24e93809-e443-46c5-9ecc-06fdadd8c09b/fetch"
{
  "id": "24e93809-e443-46c5-9ecc-06fdadd8c09b",
  "action": "IMAGINE",
  "prompt": "a cute cat --ar 1:1 --fast",
  "status": "SUCCESS",
  "progress": "100%",
  "failReason": "prompt is blocked",
  "imageUrl": "https://your-bucket.cos.ap-hongkong.myqcloud.com/1/image/2026/09/main.png?sign=...",
  "cdnImage": "https://your-bucket.cos.ap-hongkong.myqcloud.com/1/image/2026/09/main.png?sign=...",
  "images": [
    "string"
  ],
  "components": [
    "string"
  ],
  "width": 2048,
  "height": 2048,
  "seed": 1234567890,
  "quota": "5",
  "assetsExpireAt": 1788256630,
  "assetRetentionNotice": "Generated assets are retained for 2 hours and deleted after expiration.",
  "submitTime": 1788249365068,
  "startTime": 1788249370000,
  "finishTime": 1788249512000,
  "state": "order-123",
  "description": "string"
}
{
  "code": 4,
  "description": "task_no_found"
}

Note

Only tasks belonging to the current token's account can be queried. If the task does not exist or you lack access, an error object with code of 4 is returned. After expiry images is empty and the image URLs are no longer accessible.

How is this guide?

Last updated on