Skip to content

y1466382670/midjourney-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Midjourney-Api

Proxy the Discord channel for MidJourney to enable API-based calls for AI drawing.

English | 中文

Functions

  • Supports Midjourney Imagine instructions
  • Supports Midjourney Upscale instructions
  • Supports Midjourney Variation instructions
  • Supports Midjourney Zoom instructions
  • Supports Midjourney Vary instructions
  • Supports Midjourney Pan instructions
  • Supports Blend (image blending) commands
  • Supports Describe (image to text) commands
  • Supports translation of Chinese prompts, requires configuration of Baidu Translate or GPT
  • Prompt sensitive word pre-detection, supports override adjustment
  • User-token connects to WSS (WebSocket Secure), allowing access to error messages and full functionality

Prerequisite for use

1. Register and subscribe to MidJourney, create your own server and channel,refer to https://docs.midjourney.com/docs/quick-start

2. Obtain user Token, channel ID

  • Obtain user Token

    Log in to Discord on the web page, press F12 to open the developer tool, refresh the page, find the request for 'messages', and then find the Authorization field in the request body.
    img.png
  • Obtain channel ID

    Click on the official channel of Midjournal to enter.
    image
    Search for 'midjournal' in the upper right corner.
    image
    Click on the midjournal bot to send a private message.
    image
    Retrieve the private message channel ID from the URL of the private message.
    img_1.png

3. Save the token and channelId to the account table in the database.

Local development

  • Depends on Java 17 and Maven.
  • Change configuration items: Edit src/main/resources/application.yml
  • Project execution: Start the main function of MidjourneyApiApplication.

Open Api

Provide unofficial MJ open API, which can be used through the following link or added for administrator WeChat consultation. Note: mjapi

Open API usage methods Reference address

Open API doc Reference address

微信二维码