Appearance
开始
重要约定
- 提交任务时,必须携带 header
Authorization: Bearer hk-替换为你的key
或者Mj-Api-Secret: hk-替换为你的key
- Midjourney 接口地址
https://api.openai-hk.com
- 以提交
Imagine任务
为 DEMO 点击查看快速接入
任务提交
模式接入点
- 混合模式(将去除)
https://api.openai-hk.com
- fast 模式
https://api.openai-hk.com/fast
- relax 模式
https://api.openai-hk.com/relax
- 各种模式价格不一致,请 控制台->购买 KEY 查看价格
执行动作
接口地址:/mj/submit/action
请求方式:POST
请求数据类型:application/json
响应数据类型:*/*
接口描述:
请求示例:
json
{
"customId": "MJ::JOB::upsample::2::3dbbd469-36af-4a0f-8f02-df6c579e7011",
"notifyHook": "",
"state": "",
"taskId": "14001934816969359"
}
{
"customId": "MJ::JOB::upsample::2::3dbbd469-36af-4a0f-8f02-df6c579e7011",
"notifyHook": "",
"state": "",
"taskId": "14001934816969359"
}
请求参数:
参数名称 | 参数说明 | 请求类型 | 是否必须 | 数据类型 | schema |
---|---|---|---|---|---|
actionDTO | actionDTO | body | true | 执行动作参数 | 执行动作参数 |
customId | 动作标识 | true | string | ||
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(提交成功), 22(排队中), other(错误) | integer(int32) | integer(int32) |
description | 描述 | string | |
properties | 扩展字段 | object | |
result | 任务 ID | string |
响应示例:
json
{
"code": 1,
"description": "提交成功",
"properties": {},
"result": 1320098173412546
}
{
"code": 1,
"description": "提交成功",
"properties": {},
"result": 1320098173412546
}
提交 Blend 任务
接口地址:/mj/submit/blend
请求方式:POST
请求数据类型:application/json
响应数据类型:*/*
接口描述:
请求示例:
json
{
"base64Array": ["data:image/png;base64,xxx1", "data:image/png;base64,xxx2"],
"dimensions": "SQUARE",
"instanceId": "",
"modes": [],
"notifyHook": "",
"remix": true,
"state": ""
}
{
"base64Array": ["data:image/png;base64,xxx1", "data:image/png;base64,xxx2"],
"dimensions": "SQUARE",
"instanceId": "",
"modes": [],
"notifyHook": "",
"remix": true,
"state": ""
}
请求参数:
参数名称 | 参数说明 | 请求类型 | 是否必须 | 数据类型 | schema |
---|---|---|---|---|---|
blendDTO | blendDTO | body | true | Blend 提交参数 | Blend 提交参数 |
base64Array | 图片 base64 数组 | true | array | string | |
dimensions | 比例: PORTRAIT(2:3); SQUARE(1:1); LANDSCAPE(3:2),可用值:PORTRAIT,SQUARE,LANDSCAPE | false | string | ||
instanceId | 账号实例 ID,指定账号执行任务 | false | string | ||
modes | 账号模式,筛选账号执行任务 | false | array | string | |
notifyHook | 回调地址, 为空时使用全局 notifyHook | false | string | ||
remix | 账号 remix,筛选账号执行任务 | false | boolean | ||
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 |
响应示例:
json
{
"code": 1,
"description": "提交成功",
"properties": {},
"result": 1320098173412546
}
{
"code": 1,
"description": "提交成功",
"properties": {},
"result": 1320098173412546
}
提交图生文任务
接口地址:/mj/submit/describe
请求方式:POST
请求数据类型:application/json
响应数据类型:*/*
接口描述:
请求示例:
json
{
"base64": "data:image/png;base64,xxx",
"instanceId": "",
"modes": [],
"notifyHook": "",
"remix": true,
"state": ""
}
{
"base64": "data:image/png;base64,xxx",
"instanceId": "",
"modes": [],
"notifyHook": "",
"remix": true,
"state": ""
}
请求参数:
参数名称 | 参数说明 | 请求类型 | 是否必须 | 数据类型 | schema |
---|---|---|---|---|---|
describeDTO | describeDTO | body | true | Describe 提交参数 | Describe 提交参数 |
base64 | 图片 base64 | true | string | ||
instanceId | 账号实例 ID,指定账号执行任务 | false | string | ||
modes | 账号模式,筛选账号执行任务 | false | array | string | |
notifyHook | 回调地址, 为空时使用全局 notifyHook | false | string | ||
remix | 账号 remix,筛选账号执行任务 | false | boolean | ||
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 |
响应示例:
json
{
"code": 1,
"description": "提交成功",
"properties": {},
"result": 1320098173412546
}
{
"code": 1,
"description": "提交成功",
"properties": {},
"result": 1320098173412546
}
提交 Imagine 任务
接口地址:/mj/submit/imagine
请求方式:POST
请求数据类型:application/json
响应数据类型:*/*
接口描述:
请求示例:
json
{
"base64Array": [],
"instanceId": "",
"modes": [],
"notifyHook": "",
"prompt": "Cat",
"remix": true,
"state": ""
}
{
"base64Array": [],
"instanceId": "",
"modes": [],
"notifyHook": "",
"prompt": "Cat",
"remix": true,
"state": ""
}
请求参数:
参数名称 | 参数说明 | 请求类型 | 是否必须 | 数据类型 | schema |
---|---|---|---|---|---|
imagineDTO | imagineDTO | body | true | Imagine 提交参数 | Imagine 提交参数 |
base64Array | 垫图 base64 数组 | false | array | string | |
instanceId | 账号实例 ID,指定账号执行任务 | false | string | ||
modes | 账号模式,筛选账号执行任务 | false | array | string | |
notifyHook | 回调地址, 为空时使用全局 notifyHook | false | string | ||
prompt | 提示词 | true | string | ||
remix | 账号 remix,筛选账号执行任务 | false | boolean | ||
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 |
响应示例:
json
{
"code": 1,
"description": "提交成功",
"properties": {},
"result": 1320098173412546
}
{
"code": 1,
"description": "提交成功",
"properties": {},
"result": 1320098173412546
}
提交 Modal
接口地址:/mj/submit/modal
请求方式:POST
请求数据类型:application/json
响应数据类型:*/*
接口描述:
请求示例:
json
{
"maskBase64": "",
"prompt": "",
"taskId": "14001934816969359"
}
{
"maskBase64": "",
"prompt": "",
"taskId": "14001934816969359"
}
请求参数:
参数名称 | 参数说明 | 请求类型 | 是否必须 | 数据类型 | 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 |
响应示例:
json
{
"code": 1,
"description": "提交成功",
"properties": {},
"result": 1320098173412546
}
{
"code": 1,
"description": "提交成功",
"properties": {},
"result": 1320098173412546
}
提交 swap_face 变脸任务
接口地址:/mj/insight-face/swap
请求方式:POST
请求数据类型:application/json
响应数据类型:*/*
接口描述:
请求示例:
javascript
{
"sourceBase64": "data:image/png;base64,xxx1",
"targetBase64": "data:image/png;base64,xxx2",
"accountFilter": {
"instanceId": ""
},
"notifyHook": "",
"state": ""
}
{
"sourceBase64": "data:image/png;base64,xxx1",
"targetBase64": "data:image/png;base64,xxx2",
"accountFilter": {
"instanceId": ""
},
"notifyHook": "",
"state": ""
}
请求参数:
请求参数:
参数名称 | 参数说明 | 请求类型 | 是否必须 | 数据类型 | schema |
---|---|---|---|---|---|
swapFaceDTO | swapFaceDTO | body | true | SwapFace 提交参数 | SwapFace 提交参数 |
sourceBase64 | 人脸源图片 base64 | true | string | ||
targetBase64 | 目标图片 base64 | true | string | ||
accountFilter | 筛选账号执行任务,不需要筛选时设置为 null 或移除该参数 | false | Filter | Filter | |
instanceId | 账号实例 ID | false | string | ||
notifyHook | 回调地址, 为空时使用全局 notifyHook | false | string | ||
state | 自定义参数 | false | string |
响应状态:
状态码 | 说明 | schema |
---|---|---|
200 | OK | Message«string» |
201 | Created | |
401 | Unauthorized | |
403 | Forbidden | |
404 | Not Found |
响应参数:
参数名称 | 参数说明 | 类型 | schema |
---|---|---|---|
code | integer(int32) | integer(int32) | |
description | string | ||
result | string |
响应示例:
javascript
{
"code": 0,
"description": "",
"result": ""
}
{
"code": 0,
"description": "",
"result": ""
}
提交 Shorten 任务
接口地址:/mj/submit/shorten
请求方式:POST
请求数据类型:application/json
响应数据类型:*/*
接口描述:
请求示例:
json
{
"instanceId": "",
"modes": [],
"notifyHook": "",
"prompt": "Cat",
"remix": true,
"state": ""
}
{
"instanceId": "",
"modes": [],
"notifyHook": "",
"prompt": "Cat",
"remix": true,
"state": ""
}
请求参数:
参数名称 | 参数说明 | 请求类型 | 是否必须 | 数据类型 | schema |
---|---|---|---|---|---|
shortenDTO | shortenDTO | body | true | Shorten 提交参数 | Shorten 提交参数 |
instanceId | 账号实例 ID,指定账号执行任务 | false | string | ||
modes | 账号模式,筛选账号执行任务 | false | array | string | |
notifyHook | 回调地址, 为空时使用全局 notifyHook | false | string | ||
prompt | 提示词 | true | string | ||
remix | 账号 remix,筛选账号执行任务 | false | boolean | ||
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 |
响应示例:
json
{
"code": 1,
"description": "提交成功",
"properties": {},
"result": 1320098173412546
}
{
"code": 1,
"description": "提交成功",
"properties": {},
"result": 1320098173412546
}
创建视频任务
接口地址:/mj/submit/video
请求方式:POST
请求数据类型:application/json
请求示例:
image
支持base64
或者url
json
{
"prompt": "飞来一只蜜蜂",
"motion": "low",
"image": "https://cdn.discordapp.com/attachments/1372468820912115716/1388566717961338880/hyper_realistic_3d_rendering_pink_tulip_style_686021570d5ec4451c1c120a.jpg?ex=68617307&is=68602187&hm=f939f10d79de24e3ed0f2c4dc1453c902ee6b383d13d9a1787eacfccfadb9488&",
"notifyHook": "https://sse.open-hk.com/openai/mjapi/9-8/",
"state": "9"
}
{
"prompt": "飞来一只蜜蜂",
"motion": "low",
"image": "https://cdn.discordapp.com/attachments/1372468820912115716/1388566717961338880/hyper_realistic_3d_rendering_pink_tulip_style_686021570d5ec4451c1c120a.jpg?ex=68617307&is=68602187&hm=f939f10d79de24e3ed0f2c4dc1453c902ee6b383d13d9a1787eacfccfadb9488&",
"notifyHook": "https://sse.open-hk.com/openai/mjapi/9-8/",
"state": "9"
}
返回体:
json
{
"code": 1,
"description": "Submit Success",
"result": "1751352955547075"
}
{
"code": 1,
"description": "Submit Success",
"result": "1751352955547075"
}
- 通过
result
获取结果1751352955547075
- get
https://api.openai-hk.com/mj/task/1751275590720680/fetch
返回任务结果:
- 结果在
videoUrls
含有 4 个视频链接
json
{
"id": "1751275590720680",
"action": "VIDEO",
"customId": "",
"botType": "",
"prompt": "缠斗",
"promptEn": "",
"description": "Submit Success",
"state": "",
"mode": "",
"proxy": "",
"submitTime": 1751275590720,
"startTime": 1751275590720,
"finishTime": 1751275670864,
"imageUrl": "https://abc.om/upload_1751275589663574690.jpg",
"imageUrls": null,
"imageHeight": 624,
"imageWidth": 624,
"videoUrl": "",
"videoUrls": [
{
"url": "https://cdn.discordapp.com/video/5938067e-b820-4938-b3ad-69d81778cbc4/0_0.mp4"
},
{
"url": "https://cdn.discordapp.com/video/5938067e-b820-4938-b3ad-69d81778cbc4/0_1.mp4"
},
{
"url": "https://cdn.discordapp.com/video/5938067e-b820-4938-b3ad-69d81778cbc4/0_2.mp4"
},
{
"url": "https://cdn.discordapp.com/video/5938067e-b820-4938-b3ad-69d81778cbc4/0_3.mp4"
}
],
"status": "SUCCESS",
"progress": "100%",
"failReason": "",
"buttons": [],
"maskBase64": "",
"properties": {
"notifyHook": "",
"flags": 0,
"messageId": "",
"messageHash": "5938067e-b820-4938-b3ad-69d81778cbc4",
"nonce": "",
"customId": "",
"finalPrompt": "https://cdn.discordapp.com/upload_1751275589663574690.jpg 缠斗 --ar 1:1 --v 7 --stylize 100 --relax",
"progressMessageId": "",
"messageContent": "",
"discordInstanceId": "1372468820912115716",
"discordChannelId": "1372468820912115716"
}
}
{
"id": "1751275590720680",
"action": "VIDEO",
"customId": "",
"botType": "",
"prompt": "缠斗",
"promptEn": "",
"description": "Submit Success",
"state": "",
"mode": "",
"proxy": "",
"submitTime": 1751275590720,
"startTime": 1751275590720,
"finishTime": 1751275670864,
"imageUrl": "https://abc.om/upload_1751275589663574690.jpg",
"imageUrls": null,
"imageHeight": 624,
"imageWidth": 624,
"videoUrl": "",
"videoUrls": [
{
"url": "https://cdn.discordapp.com/video/5938067e-b820-4938-b3ad-69d81778cbc4/0_0.mp4"
},
{
"url": "https://cdn.discordapp.com/video/5938067e-b820-4938-b3ad-69d81778cbc4/0_1.mp4"
},
{
"url": "https://cdn.discordapp.com/video/5938067e-b820-4938-b3ad-69d81778cbc4/0_2.mp4"
},
{
"url": "https://cdn.discordapp.com/video/5938067e-b820-4938-b3ad-69d81778cbc4/0_3.mp4"
}
],
"status": "SUCCESS",
"progress": "100%",
"failReason": "",
"buttons": [],
"maskBase64": "",
"properties": {
"notifyHook": "",
"flags": 0,
"messageId": "",
"messageHash": "5938067e-b820-4938-b3ad-69d81778cbc4",
"nonce": "",
"customId": "",
"finalPrompt": "https://cdn.discordapp.com/upload_1751275589663574690.jpg 缠斗 --ar 1:1 --v 7 --stylize 100 --relax",
"progressMessageId": "",
"messageContent": "",
"discordInstanceId": "1372468820912115716",
"discordChannelId": "1372468820912115716"
}
}
video
设置好服务端
触发入口
输入提示词
结果得到 4 个视频
创建图片编辑任务
接口地址:/mj/submit/edits
请求方式:POST
请求数据类型:application/json
请求示例:
image
支持base64
或者url
json
{
"prompt": "改为白色背景",
"image": "https://cdn.discordapp.com/attachments/1372468820912115716/1388566717961338880/hyper_realistic_3d_rendering_pink_tulip_style_686021570d5ec4451c1c120a.jpg?ex=68617307&is=68602187&hm=f939f10d79de24e3ed0f2c4dc1453c902ee6b383d13d9a1787eacfccfadb9488&",
"notifyHook": "https://yourback.com/",
"state": "abc"
}
{
"prompt": "改为白色背景",
"image": "https://cdn.discordapp.com/attachments/1372468820912115716/1388566717961338880/hyper_realistic_3d_rendering_pink_tulip_style_686021570d5ec4451c1c120a.jpg?ex=68617307&is=68602187&hm=f939f10d79de24e3ed0f2c4dc1453c902ee6b383d13d9a1787eacfccfadb9488&",
"notifyHook": "https://yourback.com/",
"state": "abc"
}
返回体:
json
{
"code": 1,
"description": "Submit Success",
"result": "1751342042863641"
}
{
"code": 1,
"description": "Submit Success",
"result": "1751342042863641"
}
- 通过
result
获取结果1751342042863641
- get
https://api.openai-hk.com/mj/task/1751342042863641/fetch
返回任务结果:
- 结果在
imageUrls
含有 4 个图片链接
json
{
"id": "1751342042863641",
"action": "EDITS",
"customId": "",
"botType": "",
"prompt": "Change to a white background.",
"promptEn": "Change to a white background.",
"description": "Submit Success",
"state": "9",
"submitTime": 1751342042863,
"startTime": 1751342044141,
"finishTime": 1751342065872,
"imageUrl": "https://mjimg.open-hk.com/attachments/1372468820912115716/1389454090576072754/change_white_background_1651da63-85c6-45c7-9679-f42381c73c78.png?ex=6864ad76&is=68635bf6&hm=88ef2edb071faa5821250879489a3ea348b4f5504a73614ff30a81f05b1dee44&",
"status": "SUCCESS",
"progress": "100%",
"failReason": "",
"buttons": [],
"imageUrls": [
{
"url": "https://cdn.midjourney.com/1651da63-85c6-45c7-9679-f42381c73c78/0_0.png"
},
{
"url": "https://cdn.midjourney.com/1651da63-85c6-45c7-9679-f42381c73c78/0_1.png"
},
{
"url": "https://cdn.midjourney.com/1651da63-85c6-45c7-9679-f42381c73c78/0_2.png"
},
{
"url": "https://cdn.midjourney.com/1651da63-85c6-45c7-9679-f42381c73c78/0_3.png"
}
],
"videoUrls": null,
"videoUrl": "",
"maskBase64": "",
"properties": {
"finalPrompt": "Change to a white background. --ar 1:1 --v 7 --stylize 100 --fast --dref https://mjimg.open-hk.com/upload_1751342040607222256.png--fast",
"finalZhPrompt": ""
}
}
{
"id": "1751342042863641",
"action": "EDITS",
"customId": "",
"botType": "",
"prompt": "Change to a white background.",
"promptEn": "Change to a white background.",
"description": "Submit Success",
"state": "9",
"submitTime": 1751342042863,
"startTime": 1751342044141,
"finishTime": 1751342065872,
"imageUrl": "https://mjimg.open-hk.com/attachments/1372468820912115716/1389454090576072754/change_white_background_1651da63-85c6-45c7-9679-f42381c73c78.png?ex=6864ad76&is=68635bf6&hm=88ef2edb071faa5821250879489a3ea348b4f5504a73614ff30a81f05b1dee44&",
"status": "SUCCESS",
"progress": "100%",
"failReason": "",
"buttons": [],
"imageUrls": [
{
"url": "https://cdn.midjourney.com/1651da63-85c6-45c7-9679-f42381c73c78/0_0.png"
},
{
"url": "https://cdn.midjourney.com/1651da63-85c6-45c7-9679-f42381c73c78/0_1.png"
},
{
"url": "https://cdn.midjourney.com/1651da63-85c6-45c7-9679-f42381c73c78/0_2.png"
},
{
"url": "https://cdn.midjourney.com/1651da63-85c6-45c7-9679-f42381c73c78/0_3.png"
}
],
"videoUrls": null,
"videoUrl": "",
"maskBase64": "",
"properties": {
"finalPrompt": "Change to a white background. --ar 1:1 --v 7 --stylize 100 --fast --dref https://mjimg.open-hk.com/upload_1751342040607222256.png--fast",
"finalZhPrompt": ""
}
}
任务查询
指定 ID 获取任务
接口地址:/mj/task/{id}/fetch
请求方式:GET
请求数据类型:application/x-www-form-urlencoded
响应数据类型:*/*
接口描述:
请求参数:
参数名称 | 参数说明 | 请求类型 | 是否必须 | 数据类型 | schema |
---|---|---|---|---|---|
id | 任务 ID | path | false | string |
响应状态:
状态码 | 说明 | schema |
---|---|---|
200 | OK | 任务 |
401 | Unauthorized | |
403 | Forbidden | |
404 | Not Found |
响应参数:
参数名称 | 参数说明 | 类型 | schema |
---|---|---|---|
action | 任务类型,可用值:IMAGINE,UPSCALE,VARIATION,ZOOM,PAN,DESCRIBE,BLEND,SHORTEN | string | |
buttons | array | 可执行按钮 | |
customId | 动作标识 | string | |
emoji | 图标 | string | |
label | 文本 | string | |
style | 样式: 2(Primary)、3(Green) | integer(int32) | |
type | 类型,系统内部使用 | integer(int32) | |
description | 任务描述 | string | |
failReason | 失败原因 | string | |
finishTime | 结束时间 | integer(int64) | integer(int64) |
id | ID | string | |
imageUrl | 图片 url | string | |
progress | 任务进度 | string | |
prompt | 提示词 | string | |
promptEn | 提示词-英文 | string | |
properties | object | ||
startTime | 开始执行时间 | integer(int64) | integer(int64) |
state | 自定义参数 | string | |
status | 任务状态,可用值:NOT_START,SUBMITTED,MODAL,IN_PROGRESS,FAILURE,SUCCESS | string | |
submitTime | 提交时间 | integer(int64) | integer(int64) |
响应示例:
json
{
"action": "",
"buttons": [
{
"customId": "",
"emoji": "",
"label": "",
"style": 0,
"type": 0
}
],
"description": "",
"failReason": "",
"finishTime": 0,
"id": "",
"imageUrl": "",
"progress": "",
"prompt": "",
"promptEn": "",
"properties": {},
"startTime": 0,
"state": "",
"status": "",
"submitTime": 0
}
{
"action": "",
"buttons": [
{
"customId": "",
"emoji": "",
"label": "",
"style": 0,
"type": 0
}
],
"description": "",
"failReason": "",
"finishTime": 0,
"id": "",
"imageUrl": "",
"progress": "",
"prompt": "",
"promptEn": "",
"properties": {},
"startTime": 0,
"state": "",
"status": "",
"submitTime": 0
}
获取任务图片的 seed
接口地址:/mj/task/{id}/image-seed
请求方式:GET
请求数据类型:application/x-www-form-urlencoded
响应数据类型:*/*
接口描述:
请求参数:
参数名称 | 参数说明 | 请求类型 | 是否必须 | 数据类型 | schema |
---|---|---|---|---|---|
id | 任务 ID | path | false | string |
响应状态:
状态码 | 说明 | schema |
---|---|---|
200 | OK | Message«string» |
401 | Unauthorized | |
403 | Forbidden | |
404 | Not Found |
响应参数:
参数名称 | 参数说明 | 类型 | schema |
---|---|---|---|
code | integer(int32) | integer(int32) | |
description | string | ||
result | string |
响应示例:
json
{
"code": 0,
"description": "",
"result": ""
}
{
"code": 0,
"description": "",
"result": ""
}
根据 ID 列表查询任务
接口地址:/mj/task/list-by-condition
请求方式:POST
请求数据类型:application/json
响应数据类型:*/*
接口描述:
请求示例:
json
{
"ids": []
}
{
"ids": []
}
请求参数:
参数名称 | 参数说明 | 请求类型 | 是否必须 | 数据类型 | schema |
---|---|---|---|---|---|
conditionDTO | conditionDTO | body | true | 任务查询参数 | 任务查询参数 |
ids | 任务 ID 数组 | false | array | string |
响应状态:
状态码 | 说明 | schema |
---|---|---|
200 | OK | 任务 |
201 | Created | |
401 | Unauthorized | |
403 | Forbidden | |
404 | Not Found |
响应参数:
参数名称 | 参数说明 | 类型 | schema |
---|---|---|---|
action | 任务类型,可用值:IMAGINE,UPSCALE,VARIATION,ZOOM,PAN,DESCRIBE,BLEND,SHORTEN | string | |
buttons | array | 可执行按钮 | |
customId | 动作标识 | string | |
emoji | 图标 | string | |
label | 文本 | string | |
style | 样式: 2(Primary)、3(Green) | integer(int32) | |
type | 类型,系统内部使用 | integer(int32) | |
description | 任务描述 | string | |
failReason | 失败原因 | string | |
finishTime | 结束时间 | integer(int64) | integer(int64) |
id | ID | string | |
imageUrl | 图片 url | string | |
progress | 任务进度 | string | |
prompt | 提示词 | string | |
promptEn | 提示词-英文 | string | |
properties | object | ||
startTime | 开始执行时间 | integer(int64) | integer(int64) |
state | 自定义参数 | string | |
status | 任务状态,可用值:NOT_START,SUBMITTED,MODAL,IN_PROGRESS,FAILURE,SUCCESS | string | |
submitTime | 提交时间 | integer(int64) | integer(int64) |
响应示例:
json
[
{
"action": "",
"buttons": [
{
"customId": "",
"emoji": "",
"label": "",
"style": 0,
"type": 0
}
],
"description": "",
"failReason": "",
"finishTime": 0,
"id": "",
"imageUrl": "",
"progress": "",
"prompt": "",
"promptEn": "",
"properties": {},
"startTime": 0,
"state": "",
"status": "",
"submitTime": 0
}
]
[
{
"action": "",
"buttons": [
{
"customId": "",
"emoji": "",
"label": "",
"style": 0,
"type": 0
}
],
"description": "",
"failReason": "",
"finishTime": 0,
"id": "",
"imageUrl": "",
"progress": "",
"prompt": "",
"promptEn": "",
"properties": {},
"startTime": 0,
"state": "",
"status": "",
"submitTime": 0
}
]