POSTapplication/json*/*| key | value |
|---|---|
| Authorization | sk-xxxx |
| mj-api-secret | sk-xxxx |
| 参数名称 | 参数说明 | 请求类型 | 是否必须 | 数据类型 | schema |
|---|---|---|---|---|---|
| base64Array | 垫图base64数组 | false | array | string | |
| prompt | 提示词 | true | string | ||
| state | 自定义参数 | false | string |
| 状态码 | 说明 | schema |
|---|---|---|
| 200 | OK | |
| 201 | Created | |
| 401 | Unauthorized | |
| 403 | Forbidden | |
| 404 | Not Found |
| 参数名称 | 参数说明 | 类型 | schema |
|---|---|---|---|
| code | 状态码: 1(提交成功), 21(已存在), 22(排队中), other(错误) | integer(int32) | integer(int32) |
| description | 描述 | string | |
| properties | 扩展字段 | object | |
| result | 任务ID | string |
{
"code": 1,
"description": "提交成功",
"result": "1705514776143750",
"properties": {
"discordInstanceId": "1146852997121441885"
}
}POSTapplication/json*/*| key | value |
|---|---|
| Authorization | sk-xxxx |
| mj-api-secret | sk-xxxx |
| 参数名称 | 参数说明 | 请求类型 | 是否必须 | 数据类型 | 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 |
|---|---|---|
| 200 | OK | |
| 201 | Created | |
| 401 | Unauthorized | |
| 403 | Forbidden | |
| 404 | Not Found |
| 参数名称 | 参数说明 | 类型 | schema |
|---|---|---|---|
| code | 状态码: 1(提交成功), 21(已存在), 22(排队中), other(错误) | integer(int32) | integer(int32) |
| description | 描述 | string | |
| properties | 扩展字段 | object | |
| result | 任务ID | string |
GETapplication/x-www-form-urlencoded*/*| key | value |
|---|---|
| Authorization | sk-xxxx |
| mj-api-secret | sk-xxxx |
| 参数名称 | 参数说明 | 请求类型 | 是否必须 | 数据类型 | schema |
|---|---|---|---|---|---|
| id | 任务ID | path | false | string |
| 状态码 | 说明 | schema |
|---|---|---|
| 200 | OK | |
| 401 | Unauthorized | |
| 403 | Forbidden | |
| 404 | Not Found |
| 参数名称 | 参数说明 | 类型 | schema |
|---|---|---|---|
| action | 可用值,UPSCALE,VARIATION,REROLL,DESCRIBE,BLEND | string | |
| description | 任务描述 | string | |
| failReason | 失败原因 | string | |
| finishTime | 结束时间 | integer(int64) | integer(int64) |
| id | 任务ID | string | |
| imageUrl | 图片url | string | |
| progress | 任务进度 | string | |
| prompt | 提示词 | string | |
| promptEn | 提示词-英文 | string | |
| startTime | 开始执行时间 | integer(int64) | integer(int64) |
| state | 自定义参数 | string | |
| status | 任务状态,可用值,SUBMITTED,IN_PROGRESS,FAILURE,SUCCESS | string | |
| submitTime | 提交时间 | integer(int64) | integer(int64) |
POSTapplication/json*/*{
"botType": "MID_JOURNEY",
"base64": "data:image/png;base64,xxx",
"notifyHook": "",
"state": ""
}
| key | value |
|---|---|
| Authorization | sk-xxxx |
| mj-api-secret | sk-xxxx |
| 参数名称 | 参数说明 | 请求类型 | 是否必须 | 数据类型 | schema |
|---|---|---|---|---|---|
| describeDTO | describeDTO | body | true | Describe提交参数 | Describe提交参数 |
| botType | bot类型,mj(默认)或niji,可用值:MID_JOURNEY,NIJI_JOURNEY | false | string | ||
| base64 | 图片base64 | true | string | ||
| notifyHook | 回调地址, 为空时使用全局notifyHook | false | string | ||
| state | 自定义参数 | false | string |
| 状态码 | 说明 | schema |
|---|---|---|
| 200 | OK | 提交结果 |
| 201 | Created | |
| 401 | Unauthorized | |
| 403 | Forbidden | |
| 404 | Not Found |
| 参数名称 | 参数说明 | 类型 | schema |
|---|---|---|---|
| code | 状态码: 1(提交成功), 22(排队中), other(错误) | integer(int32) | integer(int32) |
| description | 描述 | string | |
| properties | 扩展字段 | object | |
| result | 任务ID | string |
{
"code": 1,
"description": "提交成功",
"properties": {},
"result": 1320098173412546
}
POSTapplication/json*/*{
"customId": "MJ::JOB::upsample::2::3dbbd469-36af-4a0f-8f02-df6c579e7011",
"taskId": "14001934816969359",
"notifyHook": "",
"state": ""
}
| key | value |
|---|---|
| Authorization | sk-xxxx |
| mj-api-secret | sk-xxxx |
| 参数名称 | 参数说明 | 请求类型 | 是否必须 | 数据类型 | schema |
|---|---|---|---|---|---|
| customId | 动作标识 | true | string | ||
| taskId | 任务ID | true | string | ||
| notifyHook | 回调地址, 为空时使用全局notifyHook | false | string | ||
| state | 自定义参数 | false | string |
| 状态码 | 说明 | schema |
|---|---|---|
| 200 | OK | 提交结果 |
| 201 | Created | |
| 401 | Unauthorized | |
| 403 | Forbidden | |
| 404 | Not Found |
| 参数名称 | 参数说明 | 类型 | schema |
|---|---|---|---|
| code | 状态码: 1(提交成功), 22(排队中), other(错误) | integer(int32) | integer(int32) |
| description | 描述 | string | |
| properties | 扩展字段 | object | |
| result | 任务ID | string |
{
"code": 1,
"description": "提交成功",
"properties": {},
"result": 1320098173412546
}
POSTapplication/json*/*{
"botType": "MID_JOURNEY",
"base64Array": [
"data:image/png;base64,xxx1",
"data:image/png;base64,xxx2"
],
"dimensions": "SQUARE"
"notifyHook": "",
"state": ""
}
| key | value |
|---|---|
| Authorization | sk-xxxx |
| mj-api-secret | sk-xxxx |
| 参数名称 | 参数说明 | 请求类型 | 是否必须 | 数据类型 | schema |
|---|---|---|---|---|---|
| botType | bot类型,mj(默认)或niji, 可用值:MID_JOURNEY,NIJI_JOURNEY | false | string | ||
| base64Array | 图片base64数组 | true | array | string | |
| dimensions | 比例: PORTRAIT(2:3); SQUARE(1:1); LANDSCAPE(3:2),可用值:PORTRAIT,SQUARE,LANDSCAPE | false | string | ||
| notifyHook | 回调地址, 为空时使用全局notifyHook | false | string | ||
| state | 自定义参数 | false | string |
| 状态码 | 说明 | schema |
|---|---|---|
| 200 | OK | 提交结果 |
| 201 | Created | |
| 401 | Unauthorized | |
| 403 | Forbidden | |
| 404 | Not Found |
| 参数名称 | 参数说明 | 类型 | schema |
|---|---|---|---|
| code | 状态码: 1(提交成功), 22(排队中), other(错误) | integer(int32) | integer(int32) |
| description | 描述 | string | |
| properties | 扩展字段 | object | |
| result | 任务ID | string |
{
"code": 1,
"description": "提交成功",
"properties": {},
"result": 1320098173412546
}
POSTapplication/json*/*{
"maskBase64": "",
"prompt": "",
"taskId": "14001934816969359"
}
| key | value |
|---|---|
| Authorization | sk-xxxx |
| mj-api-secret | sk-xxxx |
| 参数名称 | 参数说明 | 请求类型 | 是否必须 | 数据类型 | schema |
|---|---|---|---|---|---|
| modalDTO | modalDTO | body | true | Modal提交参数 | Modal提交参数 |
| maskBase64 | 局部重绘的蒙版base64 | false | string | ||
| prompt | 提示词 | false | string | ||
| taskId | 任务ID | true | string |
| 状态码 | 说明 | schema |
|---|---|---|
| 200 | OK | 提交结果 |
| 201 | Created | |
| 401 | Unauthorized | |
| 403 | Forbidden | |
| 404 | Not Found |
| 参数名称 | 参数说明 | 类型 | schema |
|---|---|---|---|
| code | 状态码: 1(提交成功), 22(排队中), other(错误) | integer(int32) | integer(int32) |
| description | 描述 | string | |
| properties | 扩展字段 | object | |
| result | 任务ID | string |
{
"code": 1,
"description": "提交成功",
"properties": {},
"result": 1320098173412546
}



MODAL(窗口等待)状态







