DuckAGI中文对接文档
  1. Midjourney
DuckAGI中文对接文档
  • 发出请求
  • 模型接口
    • 完成对象
    • 模型(Models)
      • 列出模型
    • 聊天接口(Chat)
      • 聊天接口
      • Anthropic Claude(全系列,已更新支持第三代)
      • gpts
      • gemini-pro
      • gpt-4-all(分析图片)
      • gpt-4-all(生成图片)
      • gpt-4-vision-preview
    • 自动补全接口(Completions)
      • 内容补全接口
    • 图像接口(Images)
      • DALL·E 3
      • Stable-Diffusion
    • 向量生成接口(Embeddings)
      • 创建嵌入
    • 音频接口(Audio)
      • 创建转录
      • 创建翻译
      • TTS文本转语音
  • 帮助中心
    • 常见问题及解决办法
  • Midjourney
    • 提交Imagine(绘图)任务
      POST
    • 绘图变化
      POST
    • 指定ID获取任务
      GET
  1. Midjourney

绘图变化

POST
https://api.duckagi.comhttps://api.duckagi.com/mj/submit/change
请求参数:
参数名称
参数说明
请求类型
是否必须
数据类型
schema
  action
UPSCALE(放大); VARIATION(变换); REROLL(重新生成),可用值,VARIATION,REROLL
​​
true
string
​​
  index
序号(1~4), action为UPSCALE,VARIATION时必传
​​
false
integer(int32)
​​
  notifyHook
回调地址, 为空时使用全局notifyHook
​​
false
string
​​
  state
自定义参数
​​
false
string
​​
  taskId
任务ID
​​
true
string
​​
响应参数:
参数名称
参数说明
类型
schema
code
状态码: 1(提交成功), 21(已存在), 22(排队中), other(错误)
integer(int32)
integer(int32)
description
描述
string
​​
properties
扩展字段
object
​​
result
任务ID
string
​​

请求参数

Authorization
在 Header 添加参数
Authorization
,其值为在 Bearer 之后拼接 Token
示例:
Authorization: Bearer ********************
Header 参数
Authorization
string 
必需
示例值:
Bearer {{YOUR_API_KEY}}
Body 参数application/json
action
string 
必需
index
integer 
可选
notifyHook
string 
可选
state
string 
可选
taskId
string 
必需
示例
{
  "action": "UPSCALE",
  "index": 1,
  "notifyHook": "",
  "state": "",
  "taskId": "1320098173412546"
}

示例代码

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.duckagi.com/mj/submit/change' \
--header 'Authorization: Bearer {{YOUR_API_KEY}}' \
--header 'Content-Type: application/json' \
--data-raw '{
  "action": "UPSCALE",
  "index": 1,
  "notifyHook": "",
  "state": "",
  "taskId": "1320098173412546"
}'

返回响应

🟢200成功
application/json
Body
code
integer 
可选
description
string 
可选
properties
object 
可选
result
integer 
可选
示例
{
	"code": 1,
	"description": "提交成功",
	"properties": {},
	"result": 1320098173412546
}
上一页
提交Imagine(绘图)任务
下一页
指定ID获取任务
Built with