- 序言
- OpenAI接口
- Suno音乐接口
- 绘画接口
- Midjourney
- Flux(暂不可用)
- Ideogram(绘画)
- 视频接口
- 文本生成(通用)
- 可灵AI
提交Shorten任务
POST
https://api.openai-hub.com/mj/submit/shorten
请求参数
Header 参数
Authorization
string
必需
示例
Authorization: Bearer 2f68dbbf-519d-4f01-9636-e2421b68f379
默认值:
Bearer {{YOUR_API_KEY}}
Content-Type
string
可选
默认值:
application/json
Body 参数application/json
botType
enum<string>
可选
枚举值:
MID_JOURNEYNIJI_JOURNEY
示例值:
MID_JOURNEY
prompt
string
提示词
示例值:
Cat
accountFilter
object
可选
channelId
string
频道ID
示例值:
string
instanceId
string
账号实例ID
示例值:
string
modes
array[string]
账号模式
枚举值:
RELAXFASTTURBO
示例值:
["RELAX"]
remark
string
备注包含
示例值:
string
remix
boolean
账号是否remix
示例值:
true
remixAutoConsidered
boolean
可选
示例值:
true
notifyHook
string
可选
示例值:
string
state
string
自定义参数
示例值:
string
示例
{
"botType": "MID_JOURNEY",
"prompt": "Cat",
"accountFilter": {
"channelId": "string",
"instanceId": "string",
"modes": [
"RELAX"
],
"remark": "string",
"remix": true,
"remixAutoConsidered": true
},
"notifyHook": "string",
"state": "string"
}
示例代码
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://api.openai-hub.com/mj/submit/shorten' \
--header 'Authorization;' \
--header 'Content-Type: application/json' \
--data-raw '{
"botType": "MID_JOURNEY",
"prompt": "Cat",
"accountFilter": {
"channelId": "string",
"instanceId": "string",
"modes": [
"RELAX"
],
"remark": "string",
"remix": true,
"remixAutoConsidered": true
},
"notifyHook": "string",
"state": "string"
}'
返回响应
🟢200OK
application/json
Body
code
integer <int32>
必需
示例值:
1
description
string
描述
示例值:
提交成功
properties
object
扩展字段
示例值:
{}
result
string
任务ID
示例值:
1320098173412546
示例
{
"code": 1,
"description": "提交成功",
"properties": {},
"result": "1320098173412546"
}
🟢201Created
🟠401Unauthorized
🟠403Forbidden
🟠404Not Found