banner
andrewji8

Being towards death

Heed not to the tree-rustling and leaf-lashing rain, Why not stroll along, whistle and sing under its rein. Lighter and better suited than horses are straw sandals and a bamboo staff, Who's afraid? A palm-leaf plaited cape provides enough to misty weather in life sustain. A thorny spring breeze sobers up the spirit, I feel a slight chill, The setting sun over the mountain offers greetings still. Looking back over the bleak passage survived, The return in time Shall not be affected by windswept rain or shine.
telegram
twitter
github

Midjourney Proxy Artifact is here!

Project Introduction#

Implement the discord channel of the proxy MidJourney to call AI drawing in API form, more convenient and flexible!

Existing Features#

Support Imagine commands and related U, V operations
Support adding base64 images as placeholders when using Imagine
Support Blend (image blending) commands and related U, V operations
Support Describe commands to generate prompts based on images
Support progress generation for Imagine, V, Blend images
Support Chinese prompt translation, need to configure Baidu translation or GPT
Prompt sensitive word judgment, support override adjustment
Task queue, default queue 10, concurrency 3. Can refer to MidJourney subscription level to adjust mj.queue
User-token connects to wss, can get error information and complete functions
Support discord domain name (server, cdn, wss) reverse proxy, configure mj.ng-discord

Prerequisites#

Register MidJourney, create your own channel, refer to
https://docs.midjourney.com/docs/quick-start
Get user Token, server ID, channel ID

Risk Notice#

Frequent drawing and other behaviors may trigger warnings on the midjourney account, please use with caution
To reduce risks, please set mj.discord.user-agent and mj.discord.session-id
By default, use the user-wss method, which can get midjourney's error information, image transformation progress, etc., but it may increase account risks
Support setting mj.discord.user-wss to false, use bot-token to connect wss, and add custom robots: process description

Railway Deployment#

Deploy based on the Railway platform, no need for your own server: deployment method; if Railway cannot be used, you can use the Zeabur deployment below

Zeabur Deployment#

Deploy based on the Zeabur platform, no need for your own server: deployment method

Docker Deployment#

  1. Create application.yml (mj configuration item) and banned-words.txt (optional, override the default sensitive word file) in the /xxx/xxx/config directory; refer to the files under src/main/resources

  2. Start the container and map the config directory

docker run -d --name midjourney-proxy \
 -p 8080:8080 \
 -v /xxx/xxx/config:/home/spring/config \
 --restart=always \
 novicezk/midjourney-proxy:2.3.5
  1. Access http://ip:port/mj to view the API documentation

Attachment: Directly set parameters in the startup command without mapping the config directory

docker run -d --name midjourney-proxy \
 -p 8080:8080 \
 -e mj.discord.guild-id=xxx \
 -e mj.discord.channel-id=xxx \
 -e mj.discord.user-token=xxx \
 --restart=always \
 novicezk/midjourney-proxy:2.3.5

Configuration Items#

mj.discord.guild-id: discord server ID
mj.discord.channel-id: discord channel ID
mj.discord.user-token: discord user Token
mj.discord.session-id: discord user's sessionId, use the default when not set, it is recommended to copy and replace it from the interactions request
mj.discord.user-agent: user-agent when calling discord interface and connecting wss, use the author's default, it is recommended to copy and replace it from the browser network
mj.discord.user-wss: whether to use user-token to connect wss, default true
mj.discord.bot-token: custom robot Token, required when user-wss=false
More configurations can be viewed at

Loading...
Ownership of this post data is guaranteed by blockchain and smart contracts to the creator alone.