1. Midjourney
梧柏API使用文档
WHBAI · Midjourney
  • WHBAI · Google Gemini 原生 (v1alpha)
  • WHBAI · Google Gemini 原生
  • WHBAI · Ideogram
  • WHBAI · Ideogram V3
  • WHBAI · Midjourney
  • WHBAI · Jimeng
  • WHBAI · Kling
  • WHBAI · Luma
  • WHBAI · Luma V1
  • WHBAI · Omni 视频
  • WHBAI · Pixverse
  • WHBAI · Runway
  • WHBAI · Sora2
  • WHBAI · 统一视频 VEO
  • WHBAI · Vidu
  • WHBAI · 豆包 Volc
  • WHBAI · Suno
  • WHBAI · Playground
  • WHBAI · 账号与令牌
  • WHBAI · 阿里 Pix
  • WHBAI · 阿里百炼
  • WHBAI · 私域人像
  • WHBAI · Fal.ai
  • WHBAI · Replicate
  • WHBAI · 腾讯云 VOD
  • WHBAI · MiniMax
  • WHBAI · 支持模型列表
  • WHBAI · Grok Imagine
  • WHBAI · Seedance 2.0
  • WHBAI · TypeSafe
  • WHBAI · OpenAI 兼容
  • Midjourney
    • 执行Action动作
      POST
    • 上传图片
      POST
    • 提交Imagine任务
      POST
    • 根据任务ID 查询任务状态
      GET
    • 根据ID列表查询任务
      POST
    • 获取任务图片的seed
      GET
    • 提交Blend任务
      POST
    • 提交Describe任务
      POST
    • 提交Modal
      POST
    • 提交 Shorten 任务
      POST
    • 提交 Change(Pan / Zoom)任务
      POST
    • 图像局部编辑(Edits)
      POST
    • 人脸替换(InsightFace Swap)
      POST
  • mj
    • 提交shorten 任务
      GET
    • 图生视频(增强版功能)
      POST
    • 文本指令变换(content)
      POST
  • 数据模型
    • MjSampleRequest
    • MjSampleResponse
    • PostMjSubmitImagineRequest
    • GetMjTaskFetchResponse
    • GetMjTaskIdImageSeedResponse
    • PostMjSubmitBlendRequest
    • PostMjSubmitBlendResponse
    • PostMjSubmitDescribeRequest
    • PostMjSubmitDescribeResponse
    • PostMjSubmitModalRequest
    • PostMjSubmitModalResponse
    • MjSubmitResponse
    • MjTask
    • PostMjTaskListByConditionResponse
    • PostMjSubmitShortenRequest
    • PostMjSubmitChangeRequest
    • PostMjSubmitEditsRequest
    • PostMjInsightFaceSwapRequest
    • NewApiError
  1. Midjourney

提交Blend任务

POST
/mj/submit/blend
官方文档:https://docs.midjourney.com/hc/en-us/articles/32635189884557-Blend-Images-on-Discord
将多张图像混合生成新图像,需提供 2–5 张图片的 Base64 数据。

网站中的模型与调用示例#

图片混合#

请求参数#

{
  "contentType": "application/json",
  "properties": {
    "base64Array": {
      "description": "待融合的图片 base64 数组,元素为带前缀的 base64:data:image/png;base64,...。张数限制 2~5:此为上游 Midjourney /blend 的官方限制(后端 new-yunwu-api 不校验张数;本项目前端 UI 允许加到 6 张,但超过 5 张上游可能失败)",
      "examples": [
        [
          "data:image/png;base64,AAA...",
          "data:image/png;base64,BBB..."
        ]
      ],
      "items": {
        "type": "string"
      },
      "maxItems": 5,
      "minItems": 2,
      "type": "array",
      "x-i18n": {
        "en-US": {
          "description": "Images to blend as a base64 array with data URL prefix. Official Midjourney /blend limit is 2–5 images."
        }
      }
    },
    "botType": {
      "description": "bot 类型,mj(默认)或 niji",
      "enum": [
        "MID_JOURNEY",
        "NIJI_JOURNEY"
      ],
      "examples": [
        "MID_JOURNEY"
      ],
      "type": "string",
      "x-apifox-enum": [
        {
          "description": "",
          "name": "",
          "value": "MID_JOURNEY"
        },
        {
          "description": "",
          "name": "",
          "value": "NIJI_JOURNEY"
        }
      ],
      "x-i18n": {
        "en-US": {
          "description": "bot type: mj (default) or niji"
        }
      }
    },
    "dimensions": {
      "description": "出图比例(透传给上游)。SQUARE 正方形(默认)/PORTRAIT 竖/LANDSCAPE 横",
      "enum": [
        "SQUARE",
        "PORTRAIT",
        "LANDSCAPE"
      ],
      "examples": [
        "SQUARE"
      ],
      "type": "string",
      "x-apifox-enum": [
        {
          "description": "正方形(默认)",
          "name": "",
          "value": "SQUARE"
        },
        {
          "description": "竖图",
          "name": "",
          "value": "PORTRAIT"
        },
        {
          "description": "横图",
          "name": "",
          "value": "LANDSCAPE"
        }
      ],
      "x-i18n": {
        "en-US": {
          "description": "Aspect ratio (passed through). SQUARE (default) / PORTRAIT / LANDSCAPE."
        }
      }
    },
    "notifyHook": {
      "description": "回调地址, 为空时使用全局notifyHook",
      "type": "string",
      "x-i18n": {
        "en-US": {
          "description": "Callback URL; falls back to the global notifyHook when empty"
        }
      }
    },
    "state": {
      "description": "自定义参数",
      "type": "string",
      "x-i18n": {
        "en-US": {
          "description": "The quality of the image that will be generated. `hd` creates images with finer detail and greater consistency. This parameter only supports `dall-e-3`."
        }
      }
    }
  },
  "required": [
    "base64Array"
  ]
}

提交Blend任务#

官方文档:https://docs.midjourney.com/hc/en-us/articles/32635189884557-Blend-Images-on-Discord

请求参数#

{
  "contentType": "application/json",
  "properties": {
    "base64Array": {
      "description": "待融合的图片 base64 数组,元素为带前缀的 base64:data:image/png;base64,...。张数限制 2~5:此为上游 Midjourney /blend 的官方限制(后端 new-yunwu-api 不校验张数;本项目前端 UI 允许加到 6 张,但超过 5 张上游可能失败)",
      "examples": [
        [
          "data:image/png;base64,AAA...",
          "data:image/png;base64,BBB..."
        ]
      ],
      "items": {
        "type": "string"
      },
      "maxItems": 5,
      "minItems": 2,
      "type": "array",
      "x-i18n": {
        "en-US": {
          "description": "Images to blend as a base64 array with data URL prefix. Official Midjourney /blend limit is 2–5 images."
        }
      }
    },
    "botType": {
      "description": "bot 类型,mj(默认)或 niji",
      "enum": [
        "MID_JOURNEY",
        "NIJI_JOURNEY"
      ],
      "examples": [
        "MID_JOURNEY"
      ],
      "type": "string",
      "x-apifox-enum": [
        {
          "description": "",
          "name": "",
          "value": "MID_JOURNEY"
        },
        {
          "description": "",
          "name": "",
          "value": "NIJI_JOURNEY"
        }
      ],
      "x-i18n": {
        "en-US": {
          "description": "bot type: mj (default) or niji"
        }
      }
    },
    "dimensions": {
      "description": "出图比例(透传给上游)。SQUARE 正方形(默认)/PORTRAIT 竖/LANDSCAPE 横",
      "enum": [
        "SQUARE",
        "PORTRAIT",
        "LANDSCAPE"
      ],
      "examples": [
        "SQUARE"
      ],
      "type": "string",
      "x-apifox-enum": [
        {
          "description": "正方形(默认)",
          "name": "",
          "value": "SQUARE"
        },
        {
          "description": "竖图",
          "name": "",
          "value": "PORTRAIT"
        },
        {
          "description": "横图",
          "name": "",
          "value": "LANDSCAPE"
        }
      ],
      "x-i18n": {
        "en-US": {
          "description": "Aspect ratio (passed through). SQUARE (default) / PORTRAIT / LANDSCAPE."
        }
      }
    },
    "notifyHook": {
      "description": "回调地址, 为空时使用全局notifyHook",
      "type": "string",
      "x-i18n": {
        "en-US": {
          "description": "Callback URL; falls back to the global notifyHook when empty"
        }
      }
    },
    "state": {
      "description": "自定义参数",
      "type": "string",
      "x-i18n": {
        "en-US": {
          "description": "The quality of the image that will be generated. `hd` creates images with finer detail and greater consistency. This parameter only supports `dall-e-3`."
        }
      }
    }
  },
  "required": [
    "base64Array"
  ]
}

请求示例 · 示例 1#

{
  "base64Array": [
    "data:image/png;base64,AAA...",
    "data:image/png;base64,BBB..."
  ],
  "botType": "MID_JOURNEY",
  "dimensions": "SQUARE",
  "notifyHook": "cillum adipisicing laborum nostrud",
  "state": "青海省"
}

响应示例 · Create image#

{
  "created": 1589478378,
  "data": [
    {
      "url": "https://..."
    },
    {
      "url": "https://..."
    }
  ]
}

请求参数

Authorization
Bearer Token
在 Header 添加参数
Authorization
,其值为在 Bearer 之后拼接 Token
示例:
Authorization: Bearer ********************
or
Header 参数

Body 参数application/json

示例
{
    "botType": "MID_JOURNEY",
    "base64Array": [
        "data:image/png;base64,xxx1",
        "data:image/png;base64,xxx2"
    ],
    "dimensions": "SQUARE",
    "notifyHook": "",
    "state": ""
}

请求示例代码

Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
请求示例请求示例
Shell
JavaScript
Java
Swift
cURL
curl --location '/mj/submit/blend' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
    "botType": "MID_JOURNEY",
    "base64Array": [
        "data:image/png;base64,xxx1",
        "data:image/png;base64,xxx2"
    ],
    "dimensions": "SQUARE",
    "notifyHook": "",
    "state": ""
}'

返回响应

🟢200Create image
application/json
Bodyapplication/json

示例
{
    "created": 1589478378,
    "data": [
        {
            "url": "https://..."
        },
        {
            "url": "https://..."
        }
    ]
}
🟠400请求有误
🟠401没有权限
修改于 2026-10-24 18:33:12
上一页
获取任务图片的seed
下一页
提交Describe任务
Built with