API for Midjourney image generation via Discord
Top 41.8% on sourcepulse
This project provides a Discord API wrapper for Midjourney, enabling programmatic access to image generation and manipulation features. It's designed for developers and power users who want to integrate Midjourney's capabilities into their own applications or workflows without direct Discord interaction. The primary benefit is automating complex image generation tasks.
How It Works
The system operates by interacting with Discord's API, specifically targeting the Midjourney bot. It uses a task queue (in-memory) to manage requests, which are then sent to the Discord API to trigger Midjourney bot commands. The bot processes these commands, and the system listens for responses to relay results back to the requesting application. This approach leverages the existing Midjourney bot infrastructure without requiring direct access to Midjourney's internal APIs.
Quick Start & Requirements
pip install -r requirements.txt
.USER_TOKEN
, BOT_TOKEN
, GUILD_ID
, CHANNEL_ID
, CALLBACK_URL
) must be configured in a .env
file.python task_bot.py
and the HTTP service with python server.py
. Docker support is also available via start.sh
and build.sh
.http://127.0.0.1:8062/docs
.Highlighted Details
imagine
, upscale
, variation
, zoomout
, expand
, describe
, and image-to-image generation.CALLBACK_URL
for receiving real-time progress and results.Maintenance & Community
The project is maintained by yokonsan. There are no explicit mentions of community channels (like Discord/Slack) or a public roadmap in the README.
Licensing & Compatibility
The README does not explicitly state a license. Given the nature of interacting with Discord and Midjourney, users should be aware of potential terms of service violations for both platforms. Commercial use is not explicitly addressed.
Limitations & Caveats
The task queue is in-memory, meaning it will not persist across restarts. The project relies on reverse-engineering Discord interactions, which could be subject to change or breakage if Discord or Midjourney updates their APIs or bot behavior. There are no automated tests included.
11 months ago
Inactive