Skip to content

提交Imagine任务

POST https://az.gptplus5.com/mj/submit/imagine

官方文档:https://docs.midjourney.com/hc/en-us/articles/32023408776205-Prompt-Basics

请求参数

Authorization

在 Header 添加参数Authorization,其值为在 Bearer 之后拼接 Token

示例:Authorization: Bearer ********************

Header 参数

参数名类型必需说明示例
Authorizationstring可选Bearer {{YOUR_API_KEY}}

Body 参数 (application/json)

参数名类型必需说明
botTypeenum<string>必需bot类型,mj(默认)或niji
promptstring必需
base64Arrayarray[string]可选垫图base64数组
notifyHookstring可选回调地址, 为空时使用全局notifyHook
statestring可选

请求示例

json
{
  "base64Array": [],
  "notifyHook": "",
  "prompt": "cat",
  "state": "",
  "botType": "MID_JOURNEY"
}

cURL 示例

bash
curl --location --request POST 'https://az.gptplus5.com/mj/submit/imagine' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data-raw '{
  "base64Array": [],
  "notifyHook": "",
  "prompt": "cat",
  "state": "",
  "botType": "MID_JOURNEY"
}'

返回响应

🟢200成功

响应示例

json
{
    "code": 1,
    "description": "Submit success",
    "result": "1730621718151844",//任务id
    "properties": {
        "discordChannelId": "1300842676874379336",
        "discordInstanceId": "1572398367386955776"
    }
}