Skip to main content
POST
cURL
このエンドポイントを使用すると、マスクを使って Midjourney 画像を編集したり、prompt と元画像から透過背景の結果を生成したりできます。

一般的な 2 つのモード

  • マスク編集: maskBase64prompt を送信し、必要に応じて元の image も送信します
  • 透過描画: 別のマスクを使わずに透過背景の結果が必要な場合は、imageprompt を送信します

タスクフロー

1

編集タスクを送信する

編集モードを選択し、prompt と元データを送信して、返された task id を保存します。
2

タスクをポーリングする

タスクが終了状態に達するまで 単一タスクを取得 を使用します。
3

結果から続行する

最終アセットをそのまま使用するか、編集結果で次の操作ボタンが表示される場合は Action を実行します。

承認

Authorization
string
header
必須

Bearer token authentication. Use your CometAPI key.

ボディ

application/json
prompt
string
デフォルト:Change to white background
必須

Text prompt describing the desired edit.

image
string
デフォルト:https://your-image-host/source.png
必須

Image to edit. Pass a public URL or a base64-encoded data URI.

state
string

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

notifyHook
string

Webhook URL to receive task status updates. Falls back to your account-level webhook if omitted.

noStorage
boolean

When true, return the original provider image URL instead of a CometAPI-proxied link.

レスポンス

200 - application/json

Success

code
integer

Submission status code. 1 = submitted successfully (result carries the task id). 21 = the action opened a confirmation modal; continue with /mj/submit/modal using the returned task id. 4 = parameter error; description explains the cause.

description
string
result
string