能用AI API文档
  1. 任务提交
能用AI API文档
  • 模型接口
    • Midjourney API文档
      • InsightFace任务提交
        • 提交swap_face任务
      • 任务提交
        • 提交Imagine任务
          POST
        • 执行动作
          POST
        • 提交Blend任务
          POST
        • 提交Describe任务
          POST
        • 提交Modal
          POST
        • 提交Shorten任务
          POST
        • 上传文件到discord
          POST
      • 任务查询
        • 根据ID列表查询任务
        • 根据ID列表查询任务-字段displays
        • 指定ID获取任务
        • 获取任务图片的seed(需设置mj或niji的私信ID)
    • Suno音乐接口
      • 生成音乐
      • 查询任务
    • Flux调用文档
      POST
  1. 任务提交

提交Imagine任务

POST
https://gnomic.nengyongai.cn/mj/submit/imagine
任务提交
提交任务后,获取到任务id(task_id),使用查询接口查询任务状态。

请求参数

Authorization
在 Header 添加参数
Authorization
,其值为在 Bearer 之后拼接 Token
示例:
Authorization: Bearer ********************
Body 参数application/json
botType
enum<string> 
可选
bot类型,mj(默认)或niji
枚举值:
MID_JOURNEYNIJI_JOURNEY
示例值:
MID_JOURNEY
prompt
string 
提示词
必需
示例值:
Cat
base64Array
array[string]
可选
垫图base64数组
notifyHook
string 
可选
回调地址, 为空时使用全局notifyHook
示例
{
    "botType": "MID_JOURNEY",
    "prompt": "Cat",
    "base64Array": [
        "string"
    ],
    "notifyHook": "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://gnomic.nengyongai.cn/mj/submit/imagine' \
--header 'Content-Type: application/json' \
--data-raw '{
    "botType": "MID_JOURNEY",
    "prompt": "Cat",
    "base64Array": [
        "string"
    ],
    "notifyHook": "string"
}'

返回响应

🟢200OK
application/json
Body
code
integer <int32>
必需
状态码: 1(提交成功), 22(排队中), other(错误)
示例值:
1
description
string 
描述
必需
示例值:
提交成功
properties
object 
扩展字段
可选
result
string 
任务ID
可选
示例值:
1320098173412546
示例
{
    "code": 1,
    "description": "提交成功",
    "properties": {},
    "result": 1320098173412546
}
🟢201Created
🟠401Unauthorized
🟠403Forbidden
🟠404Not Found
修改于 2024-08-20 20:19:27
上一页
提交swap_face任务
下一页
执行动作
Built with