ChatPlus API
  1. ChatPlus API
ChatPlus API
  • 发送测试请求
  • HTTP状态码含义
  • ChatPlus API
    • 文字对话聊天
      POST
    • 文字转换语音
      POST
    • 语音转换文字
      POST
    • 语音翻译英文
      POST
    • 文字转换图片
      POST
    • 图片内容识别
      POST
    • gpt-4逆向画图
      POST
    • 谷歌gemini-pro
      POST
    • SunoAI音乐生成
      POST
    • Midjourney绘图
      POST
    • Midjourney查询
      POST
  1. ChatPlus API

Midjourney绘图

POST
/mj/submit/imagine
给定提示和/或输入图像,模型将生成新图像。
支持的模型:midjourney

请求参数

Header 参数
Content-Type
string 
必需
在HTTP的请求Header中添加参数Content-Type POST请求主体类型为application/json
示例值:
application/json
Authorization
string 
必需
在HTTP的请求Header中添加参数Authorization,其值为以sk-开头的令牌API KEY的值。
示例值:
Bearer {{API_KEY}}
Body 参数application/json
base64Array
array[string]
必需
notifyHook
string 
必需
prompt
string 
必需
state
string 
必需
botType
string 
必需
示例
{
  "base64Array": [],
  "notifyHook": "",
  "prompt": "A pair of twin sisters are studying their lessons. --v 6.0",
  "state": "",
  "botType": "MID_JOURNEY"
}

示例代码

Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://chatplusapi.cn/mj/submit/imagine' \
--header 'Authorization: Bearer ' \
--header 'Content-Type: application/json' \
--data-raw '{
    "base64Array": [],
    "notifyHook": "",
    "prompt": "A pair of twin sisters are studying their lessons. --v 6.0",
    "state": "",
    "botType": "MID_JOURNEY"
}'

返回响应

🟢200成功
application/json
Body
code
integer 
必需
description
string 
必需
result
string 
必需
properties
object 
必需
discordInstanceId
string 
必需
示例
{
  "code": 1,
  "description": "提交成功",
  "result": "1715370032818227",
  "properties": {
    "discordInstanceId": "847743217290182667"
  }
}
🟠403失败
上一页
SunoAI音乐生成
下一页
Midjourney查询
Built with