メインコンテンツへスキップ
GET
/
mj
/
task
/
{id}
/
fetch
Fetch a Midjourney task
curl --request GET \
  --url https://api.cometapi.com/mj/task/{id}/fetch \
  --header 'Authorization: Bearer <token>'
{
  "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
    }
  ]
}
このエンドポイントは、Midjourney の submit 呼び出しを行うたびに使用してください。これは imagine、action、modal、blend、editor ワークフローにおける主要なポーリング用エンドポイントです。

まず確認すべきフィールド

  • 全体のタスク状態を示す status
  • 現在の完了状況を示す progress
  • アセットの準備完了時の imageUrl または videoUrl
  • 次に利用可能な customId の値を示す buttons

ポーリングのルール

  • タスクが SUCCESSMODAL、または FAILURE に到達するまでポーリングを続けます
  • 後続アクションの基準として buttons 配列を信頼します
  • 完成したグリッドまたは upscale 結果が必要な場合は imageUrl を使用します
2026-03-12 の実環境での検証では、FAST imagine タスクに対して SUCCESSprogress: 100%imageUrl、および 9 個のアクションボタンが返されました。

承認

Authorization
string
header
必須

Bearer token authentication. Use your CometAPI key.

パスパラメータ

id
string
必須

Midjourney task id.

レスポンス

200 - application/json

Current task state.

id
string
必須
imageUrl
string
必須
status
string
必須
progress
string
必須
buttons
object[]
必須
action
string
customId
string
botType
string
prompt
string
promptEn
string
description
string
state
string
submitTime
integer
startTime
integer
finishTime
integer
videoUrl
string
failReason
string
maskBase64
string
properties
object