メインコンテンツへスキップ
POST
/
mj
/
submit
/
imagine
Create a Midjourney imagine task
curl --request POST \
  --url https://api.cometapi.com/mj/submit/imagine \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "prompt": "a paper boat floating on calm water at sunrise --v 6.1"
}
'
{
  "code": 1,
  "description": "提交成功",
  "result": "1773314942177684",
  "properties": {
    "discordChannelId": "5e6ca8e1f40e4de6",
    "discordInstanceId": "5e6ca8e1f40e4de6"
  }
}
このエンドポイントは、Midjourney のメインワークフローを開始するために使用します。以降のすべてのステップ(upscale、variation、custom zoom を含む)は、成功した imagine タスクから始まります。

最初のレスポンスで得られるもの

  • result は次にポーリングする task id です
  • description はラッパーメッセージであり、ローカライズされる場合があります
  • HTTP スタイルの 200 でなくても、code は成功コードである場合があります

コアワークフロー

1

imagine タスクを送信

プロンプトを送信し、返された task id を保存します。
2

タスクが完了するまでポーリング

タスクが SUCCESSMODAL、または FAILURE に到達するまで Fetch Single Task を使用します。
3

後処理を続行

ボタンが表示されたら、upscale、variation、reroll、zoom などの後続操作に Action を使用します。

オプションの動画プロンプトパターン

ソース画像に動きを付けたい場合は、画像 URL と Midjourney の動画フラグ(--video--motion など)をプロンプトに追加します。
2026-03-12 のライブ検証では、FAST imagine リクエストが即座に task id を返し、その後の fetch リクエストは imageUrl と 9 個のアクションボタンを伴って SUCCESS に到達することが確認されました。

承認

Authorization
string
header
必須

Bearer token authentication. Use your CometAPI key.

ボディ

application/json
prompt
string
必須

Text prompt for the generation. Supports standard Midjourney parameters such as --v, --ar, --stylize, etc.

:

"a paper boat floating on calm water at sunrise --v 6.1"

botType
enum<string>
デフォルト:MID_JOURNEY

Bot type to use. MID_JOURNEY for Midjourney (default), NIJI_JOURNEY for Niji.

利用可能なオプション:
MID_JOURNEY,
NIJI_JOURNEY
accountFilter
object

Filter which Midjourney account modes may be used for this task.

base64Array
string[]

Base64-encoded reference images. Each item should be a data URI such as data:image/png;base64,xxx.

state
string

Custom state string. Returned as-is in the task result and webhook callback for your own tracking.

レスポンス

200 - application/json

Task accepted.

code
integer
必須
description
string
必須
result
string
必須

Task id returned after submission.

properties
object