メインコンテンツへスキップ
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": "Submission successful",
  "result": "1773314942177684",
  "properties": {
    "discordChannelId": "5e6ca8e1f40e4de6",
    "discordInstanceId": "5e6ca8e1f40e4de6"
  }
}

Documentation Index

Fetch the complete documentation index at: https://apidoc.cometapi.com/llms.txt

Use this file to discover all available pages before exploring further.

このエンドポイントを使用して、Midjourney のメインワークフローを開始します。アップスケール、バリエーション、カスタムズームを含む後続のすべてのステップは、成功した imagine タスクから始まります。

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

  • result は次にポーリングするタスク id です
  • HTTP スタイルの 200 でない場合でも、code は成功コードであることがあります

基本ワークフロー

1

imagine タスクを送信

プロンプト(Prompt)を送信し、返されたタスク id を保存します。
2

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

タスクが SUCCESSMODAL、または FAILURE に達するまで、単一タスクを取得 を使用します。
3

後処理を続行

ボタンが表示されたら、アップスケール、バリエーション、reroll、ズームなどの後続操作に Action を使用します。

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

ソース画像からモーションを付けたい場合は、--video--motion などの Midjourney の動画フラグと一緒に、画像 URL をプロンプトに追加します。

承認

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