Open-source project
trueai-org/midjourney-proxy avatar
trueai-org/midjourney-proxy

midjourney-proxy: A Self-Hosted API Layer for Midjourney on Discord

🦄 The world's largest Midjourney drawing API, generating over 1 million drawings daily, supporting Discord Youchuan Midjourney 🐂!

813 stars130 forksC#GPL-3.0

At a glance

What is it?
A GPL-3.0 C# service that turns Midjourney's Discord channel into an HTTP API, with account pooling, queueing and an admin UI. It is aimed at teams that already have Discord accounts and want to control their own drawing endpoint.
Who is it for?
Adopt midjourney-proxy if you already hold Midjourney Discord accounts and need an HTTP endpoint, account pooling and a queue you control, and if you are willing to run a 2GB-plus container on port 8086 and keep the account pool healthy. Do not adopt it if you want a hosted drawing service with no Discord account management, since account bans, CloudFlare checks and 2FA are part of the operating cost.
Can I use it commercially?
Yes, with conditions. GPL-3.0 is a copyleft licence: if you distribute software that includes it, you must release that software's source code under the same licence. Running it internally without distributing it does not trigger that obligation.
Is it still maintained?
Yes. The repository last received commits 6 days ago.
What is it written in?
Mainly C#, according to GitHub's language statistics.

Answers come from the project's GitHub data, last synced on September 15, 2026, and from our analysis. They are not legal advice.

DEEP OPEN-SOURCE ANALYSIS

What midjourney-proxy actually solves

Midjourney does not expose a public REST API. Its interface is a Discord bot: you send a slash command in a channel, and the bot replies with images and buttons. That is fine for a person typing, and awkward for anything programmatic. midjourney-proxy is a C# service that sits between your application and Discord, listens to the Midjourney bot over the Discord gateway, and re-exposes the same operations as HTTP endpoints.

The target user is not someone who wants to draw occasionally. It is a team that has one or more Midjourney subscriptions, wants a single internal endpoint that many clients can call, and needs the account pool, queueing and rate control that a raw Discord connection does not give you. The README also points at a free public instance at https://ai.trueai.org/mj with no API key, described as slow mode, for people who want to try before deploying.

The feature list is unusually wide: Imagine, Blend, Describe, Shorten, V1 to V4 and U1 to U4 actions, Reroll, Pan, Zoom, Vary (Region), seed retrieval, Remix mode, Niji and Midjourney bots, Chinese prompt translation, sensitive word pre-checks, and image and video face swapping. The breadth is the point. It is a compatibility layer, and it is trying to cover every button in the Discord UI.

How the proxy talks to Discord and to your clients

The architecture is a long-running service with a persistent Discord gateway connection per account. The README states that user-token connections use wss and zlib-stream compression, which matters because Discord's gateway can be chatty and uncompressed frames waste bandwidth. Each configured Midjourney account holds its own connection and its own task queue.

When a client posts to an endpoint such as /mj/submit/imagine, the service picks an account according to a selection mode. The README lists BestWaitIdle, Random, Weight and Polling. The task is submitted as a Discord interaction, and the service tracks the resulting job through the gateway events, including progress, until the bot posts the finished image. Clients can then query the task, and the service can also reverse-engineer a task record from a job id or an image.

Mode routing is done by URL prefix rather than by a parameter. The README gives the pattern https://{BASE_URL}/mj/submit/imagine, with /mj-turbo/mj for turbo mode, /mj-relax/mj for relax mode, /mj-fast/mj for fast mode, and /mj for no specified mode. That is a pragmatic choice: existing clients that already know how to call a Midjourney-compatible API can switch modes by changing the base path.

Persistence is configurable. The README says a local database is the default and that MongoDB is recommended once task data exceeds 100,000 records, with a default retention of one million records and automatic data migration. It also lists Sqlite, MySQL/MariaDB, SqlServer and PostgreSQL support. Account pools are persisted and maintained dynamically, so a restart does not lose the pool.

Installing midjourney-proxy with the Docker upgrade script

The README's quick start points at a shell script rather than a docker run line. The script downloads the official image, installs and starts the service, and is also the upgrade path. The README warns that the official image needs at least 2GB of memory and that the default port is 8086. It also warns to check that mapped files and paths are correct.

For the first install, the documented command downloads the script and runs it:

bash
wget -O docker-upgrade.sh https://raw.githubusercontent.com/trueai-org/midjourney-proxy/main/scripts/docker-upgrade.sh && bash docker-upgrade.sh

The README notes you can edit the script before running it to change the path, port and memory settings. After the container starts, the admin UI is served on the same host and port, and the README says the public instance exposes its Swagger documentation at /swagger.

The README also states that Windows users can download and start directly, and links video walkthroughs for Docker deployment on Bilibili and Douyin. If you are deploying privately, the README gives an explicit instruction: turn off demo mode, registration and guest access so the API is not abused. That is the first configuration step, not an afterthought.

The README documents the client-facing path as https://{BASE_URL}/mj/submit/imagine, so the first call after startup targets that path on your own host and port. If you have not configured an account yet, the request has nothing to route to. The admin UI at the same address is where accounts are added, which the README lists as account create, read, update and delete plus account synchronization.

For upgrades, the README says re-running the script is all that is needed, and abbreviates that step as:

bash
sh docker-u

Where midjourney-proxy breaks down

The hardest constraint is that this is a proxy over a consumer product's unofficial interface. Discord accounts get banned, and CloudFlare challenges appear. The README acknowledges both: it describes manual CloudFlare human verification that locks the account until you verify through the GUI or by email, an automatic verifier that only works on Windows deployments, and a workaround where a banned account's channel is reused as a sub-channel of a healthy account so previous drawings remain accessible.

There is also a throughput ceiling that is not a software bug. The README recommends a work window and says drawing continuously for 24 hours may trigger a warning, suggesting 8 to 10 hours of rest, with a sample schedule of 09:10-23:55, 13:00-08:10. It offers a fish-time configuration and an idle or relax account mode to avoid high-frequency activity. If your workload assumes a stable, always-on drawing endpoint, this project will make that assumption visible.

One feature is explicitly not implemented: automatic channel joining and automatic channel switching. The README marks it as unchecked. If your workflow depends on the proxy moving accounts between channels on its own, you will be doing that manually.

The face swap features deserve a separate warning. The README lists image and video face swapping and states you must comply with applicable laws and not use them for illegal purposes. That is not a technical caveat; it is a scope statement. If your organization cannot accept that responsibility, do not enable those endpoints.

How it differs from calling a hosted Midjourney API

The obvious alternative is a hosted Midjourney API service, and the README itself links several under a service provider recommendation section, including goapi.gptnb.ai and api.ephone.ai. The difference is where the accounts and the risk live. With a hosted provider you pay per call and someone else maintains the Discord accounts, the CloudFlare verifier and the ban recovery. With midjourney-proxy you own the accounts, the container and the failure modes, and you pay Midjourney directly for the subscriptions.

That trade-off shows up in the feature list. The proxy exposes account-level controls that a hosted API would never give you: per-account queues, concurrency, execution intervals, account sorting, vertical classification so one account only draws landscapes or only draws people, account validity periods, and a daily drawing cap after which new drawings stop but variations and redraws continue. These are controls for an operator managing a pool, not for a single application.

The other comparison point is the client ecosystem. The README recommends ChatAny, GoAmzAI, ChatGPT Web Midjourney Proxy, GoMaxAI and SparkAI, and says the project is compatible with mainstream drawing clients. Those clients already speak a Midjourney-compatible HTTP shape. If you are already using one of them against a hosted endpoint, switching to your own proxy is mostly a base URL change, which is the strongest argument for this project: it is designed to be dropped in behind tools that already exist.

Maintenance, upgrades and the GPL-3.0 question

The repository is not archived, and the last push was on 2026-09-10, the same day as release v11.11.1. Releases are frequent: v11.11.0 on 2026-09-01 and v11.10.4 on 2026-08-10. The README advertises online upgrade and online restart features, and the install section says future upgrades only require re-running the upgrade script, which the README abbreviates as sh docker-u. That is a low-friction upgrade path, but it also means the service is expected to move.

The licence is GPL-3.0. If you deploy this as a network service, the copyleft obligations that apply to GPL software are worth understanding before you embed it in a product, and that is a question for your own legal review rather than something this article can settle. The repository ships a LICENSE file at the top level, so the terms are available to read directly.

The operational cost is not the container. It is the account pool. Every account needs a working Discord session, may hit a CloudFlare challenge, may be banned, and may need 2FA. The README's own note that the public automatic login service is paused because of attacks is a useful signal: the convenience features around account login are the ones most likely to be unavailable or need self-hosting.

Editorial conclusion

Adopt midjourney-proxy if you already hold Midjourney Discord accounts and need an HTTP endpoint, account pooling and a queue you control, and if you are willing to run a 2GB-plus container on port 8086 and keep the account pool healthy. Do not adopt it if you want a hosted drawing service with no Discord account management, since account bans, CloudFlare checks and 2FA are part of the operating cost. Before committing, verify three things: that your Midjourney accounts can hold the Discord gateway connection described in the README, that your storage choice (local, MongoDB, OSS, S3 or R2) matches your task volume, and that your use of the face swap features complies with the laws that apply to you.

Frequently asked questions

What is midjourney-proxy used for?

It proxies Midjourney's Discord channel and exposes it as an HTTP API, so applications can submit Imagine, Blend, Describe and Shorten commands and the related V, U and R actions without talking to Discord directly. The README describes it as a public welfare project offering a free drawing API.

How do I deploy midjourney-proxy with Docker?

The README's quick start downloads scripts/docker-upgrade.sh from the main branch and runs it with bash, which installs and starts the official image. The README states the default port is 8086 and the official image needs at least 2GB of memory.

Does midjourney-proxy need a Discord account?

Yes for the Discord path. Accounts are added through the embedded admin UI, and the README says the bot token is optional and the service works without configuring a bot. It also supports Midjourney's official site and Youchuan as separate drawing backends.

How does midjourney-proxy handle multiple Midjourney accounts?

Each account gets its own task queue and can be assigned a selection mode, with the README listing BestWaitIdle, Random, Weight and Polling. Account pools are persisted and maintained dynamically, and the README says accounts can be sorted, rate-limited and classified by subject.

What are the limits of running midjourney-proxy continuously?

The README warns that drawing non-stop for 24 hours may trigger a warning and suggests resting 8 to 10 hours, giving 09:10-23:55 as an example window. It also provides a daily drawing cap after which new drawings stop while variations and redraws still work.

Which database should midjourney-proxy use for task storage?

The README says a local database is the default and recommends MongoDB once task data exceeds 100,000 records, with a default retention of one million records and automatic migration. It also lists Sqlite, MySQL/MariaDB, SqlServer and PostgreSQL support.

Official sources

  1. License: GPL-3.0
  2. Project website
  3. README
  4. Releases
  5. trueai-org/midjourney-proxy on GitHub
Community notes

Community notes