cto
  1. midjourney
cto
  • 账户
    • 账户余额查询
      POST
  • 模型调用
    • 会话(chat)
      • chat-message
      • chat-image
    • 嵌入(embedding)
      • 创建嵌入
    • 图像(dall)
      • 生成图片
    • 排序模型
      • 排序模型
  • 图片
    • midjourney
      • 图片生成(Imagine)
        POST
      • 图片操作(Action)
        POST
      • 图片进度查询
        GET
  • 工具
    • 企业
    • 发票
      • 发票查验
      • 发票OCR识别
    • 视频解析
      POST
    • 联网搜索
      POST
    • 热榜
      POST
  1. midjourney

图片生成(Imagine)

POST
https://api.agicto.cn/v1/mj/submit/imagine
文生图,文图生图

请求参数

Header 参数
Content-Type
string 
必需
示例值:
application/json
Authorization
string 
可选
示例值:
Bearer $API_KEY
Body 参数application/json
model
string 
必需
mj-fast或mj-relax,默认mj-fast
botType
string 
必需
bot类型,mj(默认)或niji,可用值:MID_JOURNEY,NIJI_JOURNEY,示例值(MID_JOURNEY)
prompt
string 
提示词
必需
base64Array
array[string]
必需
垫图base64数组(可以在上面的prompt里面 使用图片url+prompt的形式达到图文生图的效果)
示例
{
  "botType": "MID_JOURNEY",
  "prompt": "Cat",
  "base64Array": [],
  "accountFilter": {
    "channelId": "",
    "instanceId": "",
    "modes": [],
    "remark": "",
    "remix": true,
    "remixAutoConsidered": true
  },
  "notifyHook": "",
  "state": ""
}

示例代码

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.agicto.cn/v1/mj/submit/imagine' \
--header 'Authorization: Bearer $API_KEY' \
--header 'Content-Type: application/json' \
--data-raw '{
  "botType": "MID_JOURNEY",
  "prompt": "Cat",
  "base64Array": [],
  "accountFilter": {
    "channelId": "",
    "instanceId": "",
    "modes": [],
    "remark": "",
    "remix": true,
    "remixAutoConsidered": true
  },
  "notifyHook": "",
  "state": ""
}'

返回响应

🟢200成功
application/json
Body
code
integer 
必需
状态码: 1(提交成功), 22(排队中), other(错误)
description
string 
描述
必需
properties
object 
扩展字段
必需
result
integer 
任务id
必需
示例
{
    "code": 1,
    "description": "提交成功",
    "properties": {},
    "result": 12463258
}
上一页
排序模型
下一页
图片操作(Action)
Built with