How to Fix Midjourney API Error 429
Updated 10/28/2026
The Midjourney API Error 429 (Too Many Requests) is a rate-limiting issue. Because Midjourney does not offer an official, publicly accessible direct REST API, developers must utilize the Discord API, unofficial wrappers, or automated SDKs to programmatically generate images. When these integrations send commands or poll for results too quickly, either Discord's gateway or the wrapper's proxy server triggers a 429 HTTP status code.
Follow these practical troubleshooting steps to configure your integration, handle rates dynamically, and resolve the 429 error.
1. Implement Exponential Backoff with Jitter When your script or application receives a 429 status code, sending another request immediately will prolong the rate-limit block. You must implement a retry mechanism using exponential backoff.
- Set up exponential delays: Instead of retrying at a fixed interval (e.g., every 2 seconds), multiply the wait time after each failed attempt (e.g., 2s, 4s, 8s, 16s).
- Add jitter: Introduce a small amount of random delay (plus or minus a few hundred milliseconds) to your backoff algorithm. This prevents multiple queued worker threads from retrying at the exact same millisecond, which causes secondary rate-limit spikes.
Agent Builder turns a task you repeat into a reusable assistant with setup text for each app.
Tickd is independent and not affiliated with any AI company.
2. Parse and Respect the Retry-After Header Most APIs and Discord gateway responses include a header specifying exactly how long your client must wait before sending another request.
- Locate the header: Look for the Retry-After header in the HTTP response object.
- Pause execution: Extract the value (usually in seconds or milliseconds) and programmatically halt your queue runner for that exact duration before sending the next payload.
3. Limit Your Request Concurrency Locally Midjourney restricts how many concurrent generation jobs an account can run simultaneously based on your subscription tier (typically 3 active Fast jobs and a set number of queued jobs).
- Implement a local queue: Do not pass user requests directly to the API as they arrive. Feed them into a queue database (like Redis or RabbitMQ).
- Restrict active workers: Limit your worker processes so that your application only sends a maximum of 2 or 3 active /imagine commands concurrently per Discord token. Keep remaining tasks in a "pending" status locally until active generations complete.
4. Optimize Polling Intervals If your integration relies on polling a channel or status endpoint to check if an image is finished, high-frequency polling will trigger a 429 error.
- Increase polling intervals: Instead of checking every second, check every 5 to 10 seconds. Midjourney generations rarely complete in under 20 seconds.
- Switch to Webhooks: If your API wrapper or SDK supports it, configure webhook callbacks. Webhooks push the finished image URL to your server automatically, eliminating the need for polling requests entirely.
5. Audit Unofficial Wrapper and Proxy Limits If you are using a third-party Midjourney API service (such as ImagineAPI, SlashApi, or similar middleware), the 429 limit is likely enforced by their infrastructure rather than Discord.
- Check your subscription tier: Verify if you have exceeded the requests-per-minute (RPM) or requests-per-day (RPD) limit allowed by your API provider.
- Distribute loads: If your application requires high throughput, configure your backend to rotate requests across multiple accounts, Discord tokens, and proxy servers.