trueai-org/midjourney-proxy

🦄 The world's most complete open-source Midjourney API — Discord, YouChuan and the official site behind one HTTP interface, 1M+ images per day.

What it is

midjourney‑proxy is an open‑source server that lets you use the Midjourney image‑generation bot (which normally lives on Discord) through a regular HTTP API. It acts as a bridge between your code and Midjourney’s Discord channel, handling the Discord login, command formatting, result collection and optional post‑processing (face‑swap, video, etc.).

Core features (as described in the README)

  • Discord‑based drawing – send /imagine, /blend, /describe, /shorten and all the usual Midjourney button actions via API calls.
  • Multiple back‑ends – can proxy the official Midjourney Discord, the “悠船” service, and the Midjourney web UI.
  • Distributed / scalable deployment – supports load‑balancing, Consul config, multiple accounts with per‑account queues, and various database back‑ends (SQLite, MySQL, PostgreSQL, SQL Server, MongoDB).
  • Real‑time progress – query task status, get seed values, zoom, region‑vary, pan, etc.
  • Prompt utilities – automatic Chinese‑to‑English translation (Baidu/GPT), banned‑prompt detection, prompt analysis (Shorten).
  • Account management – add/remove accounts, persist pools, auto‑login (2FA, YesCaptcha), per‑account speed modes (RELAX/FAST/TURBO), vertical‑category routing.
  • Media support – one‑click face‑swap for images and videos (via Replicate models), video generation, image blending.
  • Storage options – local disk, Alibaba OSS, Tencent COS, S3/MinIO, Cloudflare R2, with CDN acceleration.
  • Safety & rate limits – IP/IP‑range throttling, black/white lists, daily draw caps, work‑hour windows, “咸鱼” low‑frequency mode.
  • Admin UI – a built‑in web dashboard (see midjourney-proxy-webui) with multilingual support.
  • Swagger docs – full OpenAPI spec for programmatic use.
  • Docker & native binaries – provides ready‑to‑run Docker images (full and lite), Windows/Linux/macOS zip releases, and scripts for quick upgrade.

Who might use it

  • Developers building chat‑bots, web front‑ends, or other services that need Midjourney images without dealing with Discord manually.
  • Enterprises that want a private, controllable Midjourney gateway with account pooling, rate‑limiting, and custom storage.
  • Researchers / hobbyists who want to experiment with prompt engineering, face‑swap pipelines, or batch image generation.

Getting started (quick outline)

  1. Deploy – pull the Docker image (registry.cn‑guangzhou.aliyuncs.com/trueai‑org/midjourney‑proxy) or download the platform‑specific zip, then run the container or executable.
  2. Configure – mount /app/data for mj.json (account list) and set required environment variables (Redis connection, DB connection, optional Cloudflare captcha keys, etc.).
  3. Add accounts – use the admin UI or API to register Discord/Midjourney accounts; the system can auto‑login with 2FA support.
  4. Call the API – send a POST to /mj/submit/imagine (or /mj‑fast, /mj‑relax, /mj‑turbo) with a JSON payload containing prompt, optional base64 image, and any extra flags.
  5. Monitor – poll the task ID for progress, retrieve the final image URL, or use the web UI to view the queue.

License & community

The project is released under the GPL license, allowing both personal and commercial use as long as the original copyright notice is kept. A public‑welfare (免费) API is offered at https://ai.trueai.org/mj for low‑volume testing, and a QQ group (ID 565908696) provides community support.


All details above are taken directly from the repository’s README; no additional features have been inferred.

Related

  • Project
  • Project
  • Project
  • Project
  • Project