主题
提交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 参数
| 参数名 | 类型 | 必需 | 说明 | 示例 |
|---|---|---|---|---|
Authorization | string | 可选 | Bearer {{YOUR_API_KEY}} |
Body 参数 (application/json)
| 参数名 | 类型 | 必需 | 说明 |
|---|---|---|---|
botType | enum<string> | 必需 | bot类型,mj(默认)或niji |
prompt | string | 必需 | |
base64Array | array[string] | 可选 | 垫图base64数组 |
notifyHook | string | 可选 | 回调地址, 为空时使用全局notifyHook |
state | string | 可选 |
请求示例
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"
}
}