Midjourney(简称mj)和Niji-journey(简称niji)模式相同,都以mj举例
支持Midjourney官方所有功能
同时支持 Mid journey proxy Plus 以及 Mid journey proxy 接口协议
如果你的项目不支持以上方式,请点击查看API接入文档,实现调用接口
适用性广、支持 Midjourney 所有操作
一、MJ Proxy Plus快捷接入方式:
Midiourney-Proxy主机:https://www.wushuangai.com/mj-fast
Midiourney-Proxy Secret:在令牌页生成的令牌,sk-xxxxxx
mj-fast对应是出图模式,下面我们用fast举例,在实际使用可以自由切换。
relax:慢速 (1-10分钟出图)
fast: 快速(默认)(1-5分钟出图)
turbo:极速(1分钟内出图)
不同的客户端需要填写不同的BASE_URL,请尝试如下地址:
https://www.wushuangai.com/mj-fast
https://www.wushuangai.com/mj-fast/mj
https://www.wushuangai.com/mj-fast/mj/submit/imagine
下面是ChatGPT Web Midjourney Proxy的配置示范:
此文档介绍了绘画任务的数据结构,包括任务和按钮的字段信息,以及 properties 常见字段的描述。
字段 | 类型 | 示例 | 描述 |
---|---|---|---|
id | string | 1689231405853400 | 任务 ID |
action | string | IMAGINE | 任务类型: IMAGINE(绘图)、UPSCALE(放大)、VARIATION(变化)、ZOOM(图片变焦)、PAN(焦点移动)、DESCRIBE(图生文)、BLEND(图片混合)、SHORTEN(prompt 分析)、SWAP_FACE(人脸替换) |
status | string | SUCCESS | 任务状态: NOT_START(未启动)、SUBMITTED(已提交处理)、MODAL(窗口等待)、IN_PROGRESS(执行中)、FAILURE(失败)、SUCCESS(成功)、CANCEL(已取消) |
prompt | string | 猫猫 | 提示词 |
promptEn | string | Cat | 英文提示词 |
description | string | /imagine 猫猫 | 任务描述 |
submitTime | number | 1689231405854 | 提交时间 |
startTime | number | 1689231442755 | 开始执行时间 |
finishTime | number | 1689231544312 | 结束时间 |
progress | string | 100% | 任务进度 |
imageUrl | string | https://cdn.discordapp.com/attachments/xx/ox/xox.png | 生成图片的 url,成功或执行中时有值,可能为 png 或 webp |
failReason | string | [Invalid parameter] Invalid value | 失败原因,失败时有值 |
properties | object | "finalPrompt":"Cat' | 任务的扩展属性,系统内部使用 |
buttons | Button[] | 0 | 任务完成后的可执行按钮 |
字段 | 类型 | 示例 | 描述 |
---|---|---|---|
customld | string | MJ:JOB:upsample:1:85a4b4c1-8835-46c5-a15c-aea34fad1862 | 动作标识 |
emoji | string | 0 | 图标 |
label | string | Make Variations | 文本 |
type | number | 2 | 类型,系统内部使用 |
style | number | 2 | 样式: 2(Primary)、3(Green) |
字段 | 类型 | 示例 | 描述 |
---|---|---|---|
botType | string | NUJI JOURNEY | bot 类型: MID JOURNEY,NUI JOURNEY,INSIGHT FACE |
discordinstanceld | string | 1118138338562560102 | 执行该任务的实例 ID(频道 ID) |
finalPrompt | string | Cat | 消息内容提取出的 prompt |
messageld | string | 1174910863984033903 | 消息 ID |
messageContent | string | Cat -Image #1 <@59042208124912129> | 消息内容 |
结果更新回调
code:1
(成功调用, replaceID)
{ "code": 1,
"description": "成功调用",
"model": "1833348906943496929",
"parameters": { "transactionID": "13183334890634690929" }
}
code:22
(失败调用, 已发送重试)
{ "code": 22,
"description": "服务暂不可用, 重试",
"model": "1833348906943496927",
"parameters": { "transactionID": "13183334890634690927" }
}
code:25
(调用失败, 请重试链接)
{ "code": 25,
"description": "服务暂时不可用, 请重试",
"model": "1833348906943496928",
"parameters": { "transactionID": "13183334890634690928" }
}
code:24
(prompt代码错误)
{ "code": 24,
"description": "传入的prompt有误",
"model": "1833348906943496925",
"parameters": { "transactionID": "13183334890634690925" }
}
请汇报项目的基本状况
通过 /submit/action
, 列出所有button的当前状态,如: 可用/隐藏
{ "action": "submitAction",
"userID": "18208538259999",
"status": { "btn1": "可用", "btn2": "隐藏", "btn3": "可用", "btn4": "可用" }
}
应使用状态命令返回状态信息
/img/submit/describe
图像描述
path
: "assets/image/preview.png", 用于提交图像预览/img/submit/shorten
prompt缩写
prompt
: "example prompt, in the style of user manuals, commission for, stencil, drawable quality, abstract, textured"
{ "action": "shortenPrompt",
"prompt": "example prompt, in the style of user manuals, commission for, stencil, drawable quality, abstract, textured"
}
缩短后的示例, properties里用Prompt内容作为参考, 如zoom的分辨率等
核对数据上传的seed
{ "action": "check",
"result": "incorrect"
}
全球范围的回调
POST /application/json
{ "status": "success",
"prompt": "success",
"action": "finalize",
"senderID": "18208538259999",
"transaction": "instance_finalize",
"parameters": { "status": "success" },
"images": [{ "url": "https://cdn.discordapp.com/attachments/test/xxxx/xxxx.png", "tag": "final" }],
"transactionID": "18208538259999",
"requestment": "cat"
}