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 agent 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 command and related U, V operations
Support adding image base64 as a placeholder when using Imagine
Support Blend (image blending) command and related U, V operations
Support Describe command to generate prompts based on images
Support progress of generating images using Imagine, V, Blend
Support translation of Chinese prompts, requires configuring Baidu Translate or GPT
Prompt sensitive word judgment, supports overriding adjustment
Task queue, default queue is 10, concurrency is 3. Can refer to MidJourney subscription level to adjust mj.queue
Connect to wss with user-token to get error information and complete functionality
Support reverse proxy of discord domain (server, cdn, wss), 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 behavior may trigger warnings for the midjourney account, please use with caution
To reduce risks, please set mj.discord.user-agent and mj.discord.session-id
By default, use user-wss mode to get error information and image transformation progress of midjourney, 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#

Deployed 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#

Deployed 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) under 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 from the interactions request
mj.discord.user-agent: user-agent when calling discord interface and connecting wss, use the default of the author by default, it is recommended to copy and replace from the browser network
mj.discord.user-wss: whether to use user-token to connect wss, default is true
mj.discord.bot-token: custom robot Token, required when user-wss=false

More configuration details can be found at

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