Skip to content

Anychnn/py-midjourney-proxy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

py-midjourney-proxy

English | 中文

An unofficial python implementation of the Discord proxy for MidJourney.

Just one command to build your own MidJourney proxy server.

Main Functions

  • Supports Imagine instructions and related actions
  • Supports adding image base64 as a placeholder when using the Imagine command
  • Supports Blend (image blending) and Describe (image to text) commands
  • Supports real-time progress tracking of tasks
  • Prompt sensitive word pre-detection, supports override adjustment
  • User-token connects to WSS (WebSocket Secure), allowing access to error messages and full functionality
  • Supports multi-account configuration, with each account able to set up corresponding task queues

Prerequisites 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, server ID, channel ID: Method of acquisition

Local development

  • Depends on python and fastapi
  • Change configuration items: Edit resources/config/prod_mj_config.yaml
  • Project execution: Start the main.py

Configuration items

  • mj.accounts: Refer to Account pool configuration
  • mj.task-store.type: Task storage method, default is in_memory (in memory, lost after restart), Redis is an alternative option.
  • mj.task-store.timeout: Task storage expiration time, tasks are deleted after expiration, default is 30 days.
  • mj.api-secret: API key, if left empty, authentication is not enabled; when calling the API, you need to add the request header 'mj-api-secret'.
  • mj.translate-way: The method for translating Chinese prompts into English, options include null (default), Baidu, or GPT.
  • For more configuration options, see Configuration items

Related documentation

  1. API Interface Description
  2. Version Update Log

Precautions

  1. Frequent image generation and similar behaviors may trigger warnings on your Midjourney account. Please use with caution.
  2. For common issues and solutions, see Wiki / FAQ
  3. Interested friends are also welcome to join the discussion group. If the group is full from scanning the code, you can add the administrator’s WeChat to be invited into the group. Please remark: mj join group.

微信二维码

Application Project

If you have a project that depends on this one and is open source, feel free to contact the author to be added here for display.

  • wechat-midjourney : A proxy WeChat client that connects to MidJourney, intended only as an example application scenario, will no longer be updated.
  • chatgpt-web-midjourney-proxy : chatgpt web, midjourney, gpts,tts, whisper A complete UI solution
  • chatnio : The next-generation AI one-stop solution for B/C end, an aggregated model platform with exquisite UI and powerful functions
  • new-api : An API interface management and distribution system compatible with the Midjourney Proxy
  • stable-diffusion-mobileui : SDUI, based on this interface and SD (System Design), can be packaged with one click to generate H5 and mini-programs.
  • MidJourney-Web : 🍎 Supercharged Experience For MidJourney On Web UI

Open API

Provides unofficial MJ/SD open API, add administrator WeChat for inquiries, please remark: api

Others

If you find this project helpful, please consider giving it a star.

Star History

Star History Chart

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published