Tickd.ai
API errors

Fix Unofficial Midjourney API Errors (401, 403, 429, 500)

Updated 10/8/2026

Because Midjourney does not offer an official, public-facing developer API, integrations rely on third-party API providers, custom Discord automation scripts, or proxy services. When these tools fail, they return standard HTTP status codes like 401, 403, 429, or 500.

If your automated pipeline has stopped generating images, use this step-by-step troubleshooting guide to isolate the issue, fix your request payloads, and bypass automation blocks.

1. Identify and decode the HTTP error status Your first step is to log the exact HTTP response code returned by your integration endpoint. Different status codes point to entirely different failure points: * **401 Unauthorized:** The API key issued by your third-party provider is invalid or expired. If you are self-hosting a wrapper, your Discord user token has likely expired or been invalidated because you changed your password. * **403 Forbidden:** Your request authenticated, but you do not have permission to access the resource. This happens if your bot is pointed to a private Discord channel it cannot view, or if your Midjourney subscription has expired. * **429 Too Many Requests:** You have hit a rate limit. This can be your third-party provider’s limit, or Discord's global rate limit for automated interactions. * **500 Internal Server Error / 502 Bad Gateway:** The API provider's server or Midjourney's Discord bot interface is experiencing an outage.

2. Check for Midjourney TOS and Captcha prompts If your API uses a Discord wrapper (self-bot) to send slash commands, Midjourney may have temporarily blocked your account with a Terms of Service (ToS) update or a captcha verification challenge. 1. Open the Discord account associated with the API token in a standard web browser or desktop client. 2. Navigate to any channel where you have the Midjourney bot installed. 3. Type a simple prompt manually (e.g., `/imagine prompt test`). 4. Look for a popup window or a direct message from the Midjourney bot. If you see an "Accept ToS" button or a Captcha challenge, complete it manually. 5. Once cleared, run another test prompt in Discord. If it generates successfully, restart your API script.

3. Verify Discord channel IDs and permissions Many API errors (especially 403 Forbidden) are caused by incorrect Discord configuration payloads. The Discord bot or user token must have absolute write permissions in the target channel. 1. Inspect your API request body and verify that the `channel_id` and `guild_id` (server ID) match the active Discord channel you intend to use. 2. Log into Discord and verify that the account associated with the API token can manually post messages and use slash commands in that specific channel. 3. Make sure the channel is not archived, locked, or restricted to certain roles that exclude your automated account.

4. Resolve rate limit (429) errors If your script is receiving 429 errors, Discord or your API broker is throttling your requests. 1. **Implement Exponential Backoff:** Adjust your API integration script to catch 429 status codes. When detected, pause execution for a baseline period (e.g., 2 seconds) and retry. Double the wait time on consecutive failures. 2. **Check Your Generation Mode:** If your account is in "Fast" mode, you can run up to three concurrent jobs (or up to 12 in Relax mode, depending on your plan). Sending dozens of concurrent requests will trigger strict rate-limiting. Queue your jobs sequentially within your code rather than firing them concurrently. 3. **Switch to Relax Mode:** If your API broker supports it, pass the `--relax` parameter in your prompts to avoid exhausting your Fast hours, which can cause rate limits to tighten.

5. Re-authenticate your third-party API keys If you use a hosted third-party API platform, credentials can lose synchronization with Discord's backend. 1. Log into your third-party API provider dashboard (e.g., ImagineAPI, Userby, GoAPI). 2. Check the status of your connected Discord accounts. If any account shows "Disconnected" or "Re-auth Required," remove the account and reconnect it. 3. Generate a new API key from your provider dashboard, update your environment variables (`.env` file) with the new key, and restart your server.

When to escalate If you have verified that your Discord token is active, your Midjourney subscription is billed, and your code is configured correctly, check the status page of your third-party API provider. Because Midjourney frequently updates its backend and Discord parameters, unofficial APIs require frequent updates to stay functional. If the provider's status page shows an outage, you must wait for their engineering team to deploy a patch. Do not contact Midjourney official support regarding unofficial API integrations, as automated self-bots violate Discord's terms of service and can result in account bans.

While you're here

Tickd is more than troubleshooting — these three are free and take seconds.

Agent BuilderDesign your own AI agent and export it to ChatGPT, Claude, Gemini or Grok.Build one free