
"Midjourney API Without Discord: How to Generate AI Images Programmatically"
Why Midjourney API Without Discord?#
Midjourney remains one of the most popular AI image generators, known for its distinctive artistic style and high-quality outputs. But for developers, the Discord-only interface has always been a pain point. You can't build a product on top of Discord slash commands.
The good news: in 2026, there are reliable ways to access Midjourney's image generation through a proper REST API — no Discord bot, no slash commands, no channel management.
This guide covers how to integrate Midjourney into your applications programmatically.
How to Access Midjourney via API#
Using Crazyrouter's Midjourney API#
Crazyrouter provides a REST API endpoint for Midjourney that handles all the Discord complexity behind the scenes. You get a clean, standard API interface.
import requests
import time
API_KEY = "your-crazyrouter-key"
BASE_URL = "https://api.crazyrouter.com"
# Step 1: Submit an image generation request
response = requests.post(
f"{BASE_URL}/mj/submit/imagine",
headers={
"Authorization": f"Bearer {API_KEY}",
"Content-Type": "application/json"
},
json={
"prompt": "a futuristic Tokyo street at night, neon signs reflecting in rain puddles, cyberpunk aesthetic, cinematic lighting --ar 16:9 --v 6.1"
}
)
task_id = response.json()["data"]["task_id"]
print(f"Task submitted: {task_id}")
# Step 2: Poll for the result
while True:
result = requests.get(
f"{BASE_URL}/mj/fetch/{task_id}",
headers={"Authorization": f"Bearer {API_KEY}"}
).json()
status = result["data"]["status"]
if status == "completed":
print(f"Image URL: {result['data']['image_url']}")
break
elif status == "failed":
print(f"Error: {result['data']['error']}")
break
else:
print(f"Status: {status} ({result['data'].get('progress', 'processing')})")
time.sleep(5)
Upscale a Specific Image#
After getting the initial 4-image grid, upscale your preferred image:
# Upscale image #2 from the grid
upscale_response = requests.post(
f"{BASE_URL}/mj/submit/action",
headers={
"Authorization": f"Bearer {API_KEY}",
"Content-Type": "application/json"
},
json={
"task_id": task_id,
"action": "UPSCALE",
"index": 2 # 1-4 for each quadrant
}
)
upscale_task_id = upscale_response.json()["data"]["task_id"]
Variations#
Generate variations of a specific image:
# Create variations of image #3
variation_response = requests.post(
f"{BASE_URL}/mj/submit/action",
headers={
"Authorization": f"Bearer {API_KEY}",
"Content-Type": "application/json"
},
json={
"task_id": task_id,
"action": "VARIATION",
"index": 3
}
)
Image-to-Image (Describe + Blend)#
# Describe an existing image
describe_response = requests.post(
f"{BASE_URL}/mj/submit/describe",
headers={
"Authorization": f"Bearer {API_KEY}",
"Content-Type": "application/json"
},
json={
"image_url": "https://example.com/reference-image.jpg"
}
)
# Blend multiple images
blend_response = requests.post(
f"{BASE_URL}/mj/submit/blend",
headers={
"Authorization": f"Bearer {API_KEY}",
"Content-Type": "application/json"
},
json={
"image_urls": [
"https://example.com/image1.jpg",
"https://example.com/image2.jpg"
]
}
)
cURL Example#
# Submit imagine request
curl -X POST https://api.crazyrouter.com/mj/submit/imagine \
-H "Authorization: Bearer your-crazyrouter-key" \
-H "Content-Type: application/json" \
-d '{
"prompt": "minimalist logo design for a tech startup, clean lines, blue and white --v 6.1"
}'
# Fetch result
curl https://api.crazyrouter.com/mj/fetch/TASK_ID \
-H "Authorization: Bearer your-crazyrouter-key"
Midjourney Prompt Tips for API Users#
Aspect Ratios#
--ar 1:1 # Square (default)
--ar 16:9 # Widescreen
--ar 9:16 # Portrait/mobile
--ar 3:2 # Classic photo
--ar 4:3 # Standard
Quality and Style Parameters#
--v 6.1 # Latest Midjourney version
--q 2 # Higher quality (slower)
--s 750 # Stylize level (0-1000)
--c 50 # Chaos level for variety (0-100)
--no text # Negative prompt (exclude elements)
Effective Prompt Structure#
[Subject] + [Environment] + [Style] + [Lighting] + [Parameters]
Example:
"a samurai warrior standing on a cliff, overlooking a misty valley,
traditional Japanese ink painting style, dramatic side lighting,
highly detailed --ar 16:9 --v 6.1 --s 800"
Pricing Comparison#
| Provider | Cost per Image | Grid (4 images) | Upscale |
|---|---|---|---|
| Midjourney Basic ($10/mo) | ~$0.04 | ~$0.04 | Included |
| Midjourney Standard ($30/mo) | ~$0.02 | ~$0.02 | Included |
| Crazyrouter API | ~$0.03 | ~$0.03 | ~$0.03 |
| DALL-E 3 (1024x1024) | $0.04 | N/A | N/A |
| Stable Diffusion API | $0.002-0.01 | N/A | N/A |
Crazyrouter advantage: Pay-as-you-go with no monthly subscription. You only pay for what you generate, making it ideal for variable workloads.
Midjourney vs Other Image APIs#
| Feature | Midjourney | DALL-E 3 | Stable Diffusion | Ideogram |
|---|---|---|---|---|
| Art Quality | ⭐ Best | Very Good | Good | Very Good |
| Text in Images | Good | ⭐ Best | Poor | ⭐ Best |
| Photorealism | ⭐ Excellent | Good | Good | Good |
| API Access | Via proxy | ⭐ Native | ⭐ Native | ⭐ Native |
| Speed | 30-60s | 10-20s | 5-15s | 10-20s |
| Customization | Moderate | Limited | ⭐ Full control | Moderate |
| Price | $$ | $$ | $ | $$ |
Building a Production Image Pipeline#
Here's a complete example of a production-ready image generation service:
import requests
import time
from typing import Optional
class MidjourneyClient:
def __init__(self, api_key: str, base_url: str = "https://api.crazyrouter.com"):
self.api_key = api_key
self.base_url = base_url
self.headers = {
"Authorization": f"Bearer {api_key}",
"Content-Type": "application/json"
}
def imagine(self, prompt: str, timeout: int = 300) -> dict:
"""Generate images from a text prompt."""
response = requests.post(
f"{self.base_url}/mj/submit/imagine",
headers=self.headers,
json={"prompt": prompt}
)
response.raise_for_status()
task_id = response.json()["data"]["task_id"]
return self._wait_for_result(task_id, timeout)
def upscale(self, task_id: str, index: int, timeout: int = 120) -> dict:
"""Upscale a specific image from the grid."""
response = requests.post(
f"{self.base_url}/mj/submit/action",
headers=self.headers,
json={"task_id": task_id, "action": "UPSCALE", "index": index}
)
response.raise_for_status()
new_task_id = response.json()["data"]["task_id"]
return self._wait_for_result(new_task_id, timeout)
def _wait_for_result(self, task_id: str, timeout: int) -> dict:
"""Poll until task completes or times out."""
start = time.time()
while time.time() - start < timeout:
result = requests.get(
f"{self.base_url}/mj/fetch/{task_id}",
headers=self.headers
).json()
status = result["data"]["status"]
if status == "completed":
return result["data"]
elif status == "failed":
raise Exception(f"Generation failed: {result['data'].get('error')}")
time.sleep(5)
raise TimeoutError(f"Task {task_id} timed out after {timeout}s")
# Usage
mj = MidjourneyClient("your-crazyrouter-key")
# Generate
result = mj.imagine("a cozy coffee shop interior, warm lighting, watercolor style --ar 3:2 --v 6.1")
print(f"Grid image: {result['image_url']}")
# Upscale the best one
upscaled = mj.upscale(result["task_id"], index=1)
print(f"Upscaled image: {upscaled['image_url']}")
FAQ#
Can I use Midjourney API without a Discord account?#
Yes. Through API providers like Crazyrouter, the Discord interaction is handled server-side. You interact with a standard REST API — no Discord account needed on your end.
Is using a Midjourney API proxy against their terms of service?#
Midjourney's terms are evolving. API proxy services operate in a gray area. For production use, consider also integrating DALL-E 3 or Stable Diffusion as alternatives. Crazyrouter supports all of these through the same API.
How fast is Midjourney via API?#
Typical generation time is 30-90 seconds for a 4-image grid, plus 15-30 seconds for upscaling. This is comparable to using Midjourney directly through Discord.
What Midjourney version does the API support?#
The API supports the latest Midjourney versions including V6.1. You can specify the version using the --v parameter in your prompt.
Can I use Midjourney API for batch generation?#
Yes. Submit multiple requests concurrently and poll for results. The API handles queuing automatically. For high-volume use cases, consider implementing a job queue on your side.
Summary#
Accessing Midjourney through a proper API removes the Discord bottleneck and opens up programmatic image generation for production applications. Through Crazyrouter, you get Midjourney alongside DALL-E, Stable Diffusion, Ideogram, and 300+ other AI models — all through one API key with pay-as-you-go pricing.
Start building with Midjourney API today at crazyrouter.com.


