绘图变化(UPSCALE; VARIATION; REROLL)
方法: POST路径: /mj/submit/change
即将废弃,请使用 执行动作 接口;功能更多,对接更简单
请求参数
Header 参数
text
Authorization
string
可选
默认值:
Bearer {{YOUR_API_KEY}}Body 参数 application/json
text
action
enum<string>
必需
UPSCALE(放大); VARIATION(变换); REROLL(重新生成)
枚举值:
UPSCALE
VARIATION
REROLL
示例:
UPSCALE
index
integer
<int32>
可选
序号(1~4), action为UPSCALE,VARIATION时必传
>= 1
<= 4
示例:
1
notifyHook
string
可选
回调地址, 为空时使用全局notifyHook
taskId
string
任务ID
必需
示例:
1320098173412546
示例
{
"action"
:
"UPSCALE"
,
"index"
:
1
,
"notifyHook"
:
"string"
,
"taskId"
:
"1320098173412546"
}请求示例代码
Shell
bash
curl --location --request POST '/mj/submit/change' \
--header 'Authorization: Bearer {{YOUR_API_KEY}}' \
--header 'Content-Type: application/json' \
--data-raw '{
"action": "UPSCALE",
"index": 1,
"notifyHook": "string",
"taskId": "1320098173412546"
}'返回响应
🟢 200 OK
内容类型: application/json
响应结构
text
code
integer
<int32>
必需
状态码: 1(提交成功), 21(已存在), 22(排队中), other(错误)
示例:
1
description
string
描述
必需
示例:
提交成功
properties
object
扩展字段
可选
result
string
任务ID
可选
示例:
1320098173412546示例
json
{
"code": 1,
"description": "提交成功",
"properties": {},
"result": 1320098173412546
}