Midjourney画像フォーマット(Midjourney Proxy/Plus)
Midjourney 画像フォーマット(Midjourney Proxy/ Plus)
Section titled “Midjourney 画像フォーマット(Midjourney Proxy/ Plus)”本ページの概要
ご注意ください
このインターフェースは Midjourney 公式のものではなく、作者 novicezk のオープンソースプロジェクト midjourney-proxy をベースにした Midjourney 代理インターフェースです。
このプロジェクトには 2 つのバージョンがあり、4All API API はどちらにも対応済みです。
- オープンソース版 midjourney-proxy
- 有料版 midjourney-proxy-plus
Midjourney の強力な機能を手軽に使えるようにしてくださった作者に、心より感謝します。時間があればぜひ Star をお願いします。余力がある方は、さらに多機能な有料版のサポートもご検討ください。
| 機能カテゴリ | オープンソース版 | 有料版 |
|---|---|---|
| 基本機能 | | |
| Imagine コマンドおよび関連アクション | ✓ | ✓ |
| 参照画像の利用 | ✓ | ✓ |
| Blend(画像の合成) | ✓ | ✓ |
| Describe(画像からテキスト生成) | ✓ | ✓ |
| タスクのリアルタイム進捗 | ✓ | ✓ |
| 中国語 prompt の翻訳 | ✓ | ✓ |
| prompt の敏感語検出 | ✓ | ✓ |
| user-token の wss 接続 | ✓ | ✓ |
| 複数アカウント設定 | ✓ | ✓ |
| 高度な機能 | | |
| Shorten(prompt 分析) | ✗ | ✓ |
| フォーカス移動(Pan) | ✗ | ✓ |
| 画像のズーム(Zoom) | ✗ | ✓ |
| 部分再描画(Vary Region) | ✗ | ✓ |
| ボタン操作と Remix モードの連携 | ✗ | ✓ |
| 画像 seed 値の取得 | ✗ | ✓ |
| アカウント管理 | | |
| アカウントプールの永続化 | ✗ | ✓ |
| Redis/MySQL など複数の保存先をサポート | ✗ | ✓ |
| アカウント情報の取得と設定 | ✗ | ✓ |
| タスクキャンセル機能 | ✗ | ✓ |
| 内蔵管理画面 | ✗ | ✓ |
| スマート機能 | | |
| MJ V6.0 対応 | ✗ | ✓ |
| アカウント状態の自動監視 | ✗ | ✓ |
| モードの自動切り替え | ✗ | ✓ |
| niji・journey Bot 対応 | ✗ | ✓ |
| InsightFace 顔認識サービス | ✗ | ✓ |
| セキュリティ性能 | | |
| 動的設定対応 | ✗ | ✓ |
| token 切断問題の修正 | ✗ | ✓ |
| 自動検証機能 | ✗ | ✓ |
| 禁止語の自動異議申し立て | ✗ | ✓ |
Midjourney は、自然言語による説明をもとに画像を生成・編集・加工できる強力な画像生成モデルです。さまざまなインターフェースを通じて、多様な画像生成・処理タスクを実現できます。
🔄 フロー図
Section titled “🔄 フロー図”フローの説明
Section titled “フローの説明”- 初期タスク
- Imagine: テキストから画像を生成
- Blend: 複数画像の合成
- Describe: 画像の説明文生成
- Swap Face: 顔の入れ替え
- 画像処理
- U1-U4: 拡大操作
- V1-V4: バリエーション生成
- Pan: 画像の平行移動
- Zoom: 画像の拡大縮小
- 特殊フロー
- Action + Modal: ダイアログで確認が必要な操作
- Action 直接実行: ダイアログ不要で実行する操作
- タスク管理
- タスク詳細の取得
- 画像 Seed の取得
- Discord へのアップロード
💡 リクエスト例
Section titled “💡 リクエスト例”Imagine タスクの送信 ✅
Section titled “Imagine タスクの送信 ✅”curl --location --request POST 'https://4All API地址/mj/submit/imagine' \--header 'Authorization: Bearer $4All API_API_KEY' \--header 'Accept: application/json' \--header 'Content-Type: application/json' \--data-raw '{ "botType": "MID_JOURNEY", "prompt": "Cat", "base64Array": [], "accountFilter": { "channelId": "", "instanceId": "", "modes": [], "remark": "", "remix": true, "remixAutoConsidered": true }, "notifyHook": "", "state": ""}'レスポンス例:
{ "code": 1, "description": "提交成功", "properties": {}, "result": 1320098173412546}Blend タスクの送信 ✅
Section titled “Blend タスクの送信 ✅”curl --location --request POST 'https://4All API地址/mj/submit/blend' \--header 'Authorization: Bearer $4All API_API_KEY' \--header 'Accept: application/json' \--header 'Content-Type: application/json' \--data-raw '{ "botType": "MID_JOURNEY", "base64Array": [ "data:image/png;base64,xxx1", "data:image/png;base64,xxx2" ], "dimensions": "SQUARE", "accountFilter": { "channelId": "", "instanceId": "", "modes": [], "remark": "", "remix": true, "remixAutoConsidered": true }, "notifyHook": "", "state": ""}'レスポンス例:
{ "code": 1, "description": "提交成功", "properties": {}, "result": 1320098173412546}Describe タスクの送信 ✅
Section titled “Describe タスクの送信 ✅”curl --location --request POST 'https://4All API地址/mj/submit/describe' \--header 'Authorization: Bearer $4All API_API_KEY' \--header 'Accept: application/json' \--header 'Content-Type: application/json' \--data-raw '{ "botType": "MID_JOURNEY", "base64": "data:image/png;base64,xxx", "accountFilter": { "channelId": "", "instanceId": "", "modes": [], "remark": "", "remix": true, "remixAutoConsidered": true }, "notifyHook": "", "state": ""}'レスポンス例:
{ "code": 1, "description": "提交成功", "properties": {}, "result": 1320098173412546}Modal の送信 ✅
Section titled “Modal の送信 ✅”curl --location --request POST 'https://4All API地址/mj/submit/modal' \--header 'Authorization: Bearer $4All API_API_KEY' \--header 'Accept: application/json' \--header 'Content-Type: application/json' \--data-raw '{ "maskBase64": "", "prompt": "", "taskId": "14001934816969359"}'レスポンス例:
{ "code": 1, "description": "提交成功", "properties": {}, "result": 1320098173412546}swap_face タスクの送信 ✅
Section titled “swap_face タスクの送信 ✅”curl --location --request POST 'https://4All API地址/mj/insight-face/swap' \--header 'Authorization: Bearer $4All API_API_KEY' \--header 'Accept: application/json' \--header 'Content-Type: application/json' \--data-raw '{ "sourceBase64": "data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD/2wCEAAkGBwgHBgkIBwgKCgkLDRYPDQwMDRsUFRAWIB0iIiAdHx8kKDQsJCYxJx8fLT0tMTU3Ojo6Iys/RDnYdriP1wsS81kwU8OVs/R3xu8s6bX7+zYnOH8coSqpmRSBjqerjcBlr2OB/lbAf/2Q==", "targetBase64": "data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD/2wCEAAkGBwgHBgkIBwgKCgkLDRYPDQwMDRsUFRAWIB0iIiAdHx8kKDQsJCYxJx8fLT0tMTU3Ojo6Iys/RD849k="}'レスポンス例:
{ "code": 0, "description": "string", "result": "string"}Action 動作の実行 ✅
Section titled “Action 動作の実行 ✅”curl --location --request POST 'https://4All API地址/mj/submit/action' \--header 'Authorization: Bearer $4All API_API_KEY' \--header 'Accept: application/json' \--header 'Content-Type: application/json' \--data-raw '{ "chooseSameChannel": true, "customId": "MJ::JOB::upsample::1::82c51c9d-bc33-4c07-a471-36c3dcb1a6f0", "taskId": "1728781324658687", "accountFilter": { "channelId": "", "instanceId": "", "modes": [], "remark": "", "remix": true, "remixAutoConsidered": true }, "notifyHook": "", "state": ""}'レスポンス例:
{ "code": 1, "description": "提交成功", "properties": {}, "result": 1320098173412546}ファイルを discord にアップロード ✅
Section titled “ファイルを discord にアップロード ✅”curl --location --request POST 'https://4All API地址/mj/submit/upload-discord-images' \--header 'Authorization: Bearer $4All API_API_KEY' \--header 'Accept: application/json' \--header 'Content-Type: application/json' \--data-raw '{ "base64Array": [], "filter": { "channelId": "", "instanceId": "", "remark": "" }}'レスポンス例:
{ "code": 0, "description": "string", "result": [ "string" ]}ID リストに基づくタスク検索 ✅
Section titled “ID リストに基づくタスク検索 ✅”curl --location --request POST 'https://4All API地址/mj/task/list-by-condition' \--header 'Accept: application/json' \--header 'Authorization: Bearer $4All API_API_KEY' \--header 'Content-Type: application/json' \--data-raw '{ "ids": []}'レスポンス例:
[ { "action": "IMAGINE", "buttons": [ { "customId": "string", "emoji": "string", "label": "string", "style": 0, "type": 0 } ], "description": "string", "failReason": "string", "finishTime": 0, "id": "string", "imageUrl": "string", "progress": "string", "prompt": "string", "promptEn": "string", "properties": {}, "startTime": 0, "state": "string", "status": "NOT_START", "submitTime": 0 }]指定 ID でタスクを取得 ✅
Section titled “指定 ID でタスクを取得 ✅”curl --location --request GET 'https://4All API地址/mj/task/{id}/fetch' \--header 'Accept: application/json' \--header 'Authorization: Bearer $4All API_API_KEY' \--header 'Content-Type: application/json'レスポンス例:
{ "action": "IMAGINE", "buttons": [ { "customId": "string", "emoji": "string", "label": "string", "style": 0, "type": 0 } ], "description": "string", "failReason": "string", "finishTime": 0, "id": "string", "imageUrl": "string", "progress": "string", "prompt": "string", "promptEn": "string", "properties": {}, "startTime": 0, "state": "string", "status": "NOT_START", "submitTime": 0}タスク画像の seed を取得 ✅
Section titled “タスク画像の seed を取得 ✅”curl --location --request GET 'https://4All API地址/mj/task/{id}/image-seed' \--header 'Accept: application/json' \--header 'Authorization: Bearer $4All API_API_KEY' \--header 'Content-Type: application/json'レスポンス例:
{ "code": 0, "description": "string", "result": "string"}📮 リクエスト
Section titled “📮 リクエスト”エンドポイント
Section titled “エンドポイント”Imagine タスクの送信
Section titled “Imagine タスクの送信”POST /mj/submit/imagineテキストプロンプトから画像を生成します。
Blend タスクの送信
Section titled “Blend タスクの送信”POST /mj/submit/blend複数の入力画像をもとに、新しい画像を合成生成します。
Describe タスクの送信
Section titled “Describe タスクの送信”POST /mj/submit/describe入力画像からテキスト説明を生成します。
Modal の送信
Section titled “Modal の送信”POST /mj/submit/modal画像生成の詳細を調整するためのモーダル情報を送信します。
swap_face タスクの送信
Section titled “swap_face タスクの送信”POST /mj/insight-face/swap元画像と対象画像を使って顔を入れ替えます。
Action 動作の実行
Section titled “Action 動作の実行”POST /mj/submit/action生成済み画像に対して、拡大や調整などの後続操作を行います。
ファイルを discord にアップロード
Section titled “ファイルを discord にアップロード”POST /mj/submit/upload-discord-images画像を discord プラットフォームへアップロードします。
ID リストに基づくタスク検索
Section titled “ID リストに基づくタスク検索”POST /mj/task/list-by-condition指定したタスク ID の一覧に基づいてタスク詳細を検索します。
指定 ID でタスクを取得
Section titled “指定 ID でタスクを取得”GET /mj/task/{id}/fetchタスク ID に基づいてタスク詳細を取得します。
タスク画像の seed を取得
Section titled “タスク画像の seed を取得”GET /mj/task/{id}/image-seed指定タスクで生成された画像の seed 値を取得します。
リクエストヘッダーに以下を含めて API キー認証を行います。
Authorization: Bearer $4All API_API_KEY$OPENAI_API_KEYここで $OPENAI_API_KEY は API キーです。
リクエストボディのパラメータ
Section titled “リクエストボディのパラメータ”Imagine タスクの送信
Section titled “Imagine タスクの送信”botType
Section titled “botType”- 型: 列挙文字列
- 必須: いいえ
- デフォルト値: MID_JOURNEY
- 選択可能な値:
- MID_JOURNEY : Midjourney モデル
- NIJI_JOURNEY : Niji Journey モデル
- 説明: 使用する bot の種類を選択します
prompt
Section titled “prompt”- 型: 文字列
- 必須: はい
- 説明: 画像生成用のテキストプロンプト
- ヒント:
- 明確で具体的な描写を使ってください
- 画風や構図などの詳細を含めることができます
- 英語と中国語の入力に対応しています
base64Array
Section titled “base64Array”- 型: 文字列配列
- 必須: いいえ
- 説明: 参照画像の base64 エンコード配列
- 形式: 各要素は MIME タイプのプレフィックスを含む完全な base64 画像文字列である必要があります
accountFilter
Section titled “accountFilter”- 型: オブジェクト
- 必須: いいえ
- 属性:
- channelId : チャンネル ID
- instanceId : アカウントインスタンス ID
- modes : アカウントモード配列。選択可能な値: RELAX、FAST、TURBO
- remark : 備考に含まれる内容
- remix : アカウントが remix をサポートしているか
- remixAutoConsidered : remix の自動送信設定
notifyHook
Section titled “notifyHook”- 型: 文字列
- 必須: いいえ
- 説明: タスク完了後のコールバック URL。空の場合はグローバルな notifyHook を使用します
- 型: 文字列
- 必須: いいえ
- 説明: カスタム状態パラメータ。リクエストの追跡に利用できます
Blend タスクの送信
Section titled “Blend タスクの送信”base64Array
Section titled “base64Array”- 型: 文字列配列
- 必須: はい
- 説明: 合成対象の画像 base64 エンコード配列
- 形式: 2〜5 枚の画像の base64 文字列を含める必要があります
dimensions
Section titled “dimensions”- 型: 列挙文字列
- 必須: いいえ
- 選択可能な値:
- PORTRAIT : 2:3 比率
- SQUARE : 1:1 比率
- LANDSCAPE : 3:2 比率
- 説明: 出力画像の縦横比設定
Describe タスクの送信
Section titled “Describe タスクの送信”base64
Section titled “base64”- 型: 文字列
- 必須: はい
- 説明: 説明対象の画像の base64 エンコード
- 形式: MIME タイプのプレフィックスを含む完全な base64 文字列
Modal タスクの送信
Section titled “Modal タスクの送信”maskBase64
Section titled “maskBase64”- 型: 文字列
- 必須: いいえ
- 説明: 部分再描画用のマスク画像の base64 エンコード
prompt
Section titled “prompt”- 型: 文字列
- 必須: いいえ
- 説明: 再描画対象領域のテキストプロンプト
taskId
Section titled “taskId”- 型: 文字列
- 必須: はい
- 説明: 元のタスク ID
Swap Face タスクの送信
Section titled “Swap Face タスクの送信”sourceBase64
Section titled “sourceBase64”- 型: 文字列
- 必須: はい
- 説明: 顔の元画像の base64 エンコード
- 要件: 画像には鮮明な顔が含まれている必要があります
targetBase64
Section titled “targetBase64”- 型: 文字列
- 必須: はい
- 説明: 対象画像の base64 エンコード
- 要件: 画像には置き換え対象の顔が含まれている必要があります
Action 動作の実行
Section titled “Action 動作の実行”chooseSameChannel
Section titled “chooseSameChannel”- 型: 真偽値
- 必須: いいえ
- デフォルト値: false
- 説明: 同じチャンネル内のアカウントを選択するかどうか
customId
Section titled “customId”- 型: 文字列
- 必須: はい
- 説明: 動作識別子
- 形式: “MJ::JOB::upsample::1::xxx” のような特定形式の文字列
taskId
Section titled “taskId”- 型: 文字列
- 必須: はい
- 説明: 動作を実行する対象のタスク ID
Discord へのファイルアップロード
Section titled “Discord へのファイルアップロード”base64Array
Section titled “base64Array”- 型: 文字列配列
- 必須: はい
- 説明: アップロードする画像の base64 エンコード配列
filter
Section titled “filter”- 型: オブジェクト
- 必須: いいえ
- 属性:
- channelId : 対象チャンネル ID
- instanceId : アカウントインスタンス ID
- remark : 備考情報
ID リストに基づくタスク検索
Section titled “ID リストに基づくタスク検索”- 型: 文字列配列
- 必須: はい
- 説明: 検索対象のタスク ID 一覧
共通レスポンス形式
Section titled “共通レスポンス形式”すべての API は、ほぼ共通のレスポンス構造を返します。
- 型: 整数
- 説明: ステータスコード
| ステータスコード | 説明 |
|---|---|
| 1 | 送信成功 |
| 22 | タスクはキュー待ち中 |
| 21 | パラメータエラー |
| 23 | システムエラー |
| 24 | アカウント利用不可 |
| 25 | 残高不足 |
description
Section titled “description”- 型: 文字列
- 説明: レスポンスの説明情報
properties
Section titled “properties”- 型: オブジェクト
- 説明: 拡張属性
result
Section titled “result”- 型: 文字列または配列
- 説明: 返却結果。タスク ID などのデータが入ります
📥 レスポンス
Section titled “📥 レスポンス”成功レスポンス
Section titled “成功レスポンス”action
Section titled “action”- 型: 列挙文字列
- 説明: タスク種別
| 文字列値 | 説明 |
|---|---|
| IMAGINE | 画像作成 |
| UPSCALE | 画像の拡大 |
| VARIATION | バリエーション生成 |
| ZOOM | 画像のズーム |
| PAN | 画像の平行移動 |
| DESCRIBE | 画像の説明生成 |
| BLEND | 画像の合成 |
| SHORTEN | プロンプトの短縮 |
| SWAP_FACE | 顔の置き換え |
buttons
Section titled “buttons”- 型: オブジェクト配列
- 説明: 実行可能な操作ボタン
| 配列要素の属性 | 説明 |
|---|---|
| customId | 動作識別子 |
| emoji | ボタンアイコン |
| label | ボタンテキスト |
| style | スタイル(2=Primary, 3=Green) |
| type | システム内部で使用する型 |
description
Section titled “description”- 型: 文字列
- 説明: タスクの説明情報
failReason
Section titled “failReason”- 型: 文字列
- 説明: タスク失敗の理由
finishTime
Section titled “finishTime”- 型: 整数
- 説明: タスク完了時刻のタイムスタンプ
- 型: 文字列
- 説明: タスクの一意識別子
imageUrl
Section titled “imageUrl”- 型: 文字列
- 説明: 生成画像の URL
progress
Section titled “progress”- 型: 文字列
- 説明: タスクの進捗情報
prompt
Section titled “prompt”- 型: 文字列
- 説明: 元のプロンプト
promptEn
Section titled “promptEn”- 型: 文字列
- 説明: 英語プロンプト
status
Section titled “status”- 型: 列挙文字列
- 説明: タスク状態
| 文字列値 | 説明 |
|---|---|
| NOT_START | 未開始 |
| SUBMITTED | 提出済み |
| MODAL | モーダル操作中 |
| IN_PROGRESS | 進行中 |
| FAILURE | 失敗 |
| SUCCESS | 成功 |
| CANCEL | キャンセル済み |
submitTime
Section titled “submitTime”- 型: 整数
- 説明: タスク送信時刻のタイムスタンプ
startTime
Section titled “startTime”- 型: 整数
- 説明: タスク開始時刻のタイムスタンプ
エラーレスポンス
Section titled “エラーレスポンス”リクエストに問題がある場合、API はエラーレスポンスを返します。
HTTP ステータスコード
Section titled “HTTP ステータスコード”- 400 Bad Request : リクエストパラメータが無効です
- 401 Unauthorized : API キーが無効、または未指定です
- 403 Forbidden : 権限が不足しています
- 404 Not Found : リソースが存在しません
- 429 Too Many Requests : リクエスト頻度が上限を超えています
- 500 Internal Server Error :