<aside> 🖼️ Generate images with DALL-E 3, Google Imagen 4, Flux, Stable Diffusion, and Midjourney — all through one API.

</aside>

The Problem

Want to use DALL-E 3? Sign up for OpenAI. Imagen 4? Google Cloud. Midjourney? Discord bot. Flux? Replicate. Each has different APIs, pricing, and authentication.

The Solution

Crazyrouter provides a single OpenAI-compatible endpoint for ALL image generation models. Same API format, one key.

Supported Models

Quick Start

import openai

client = openai.OpenAI(
    base_url="<https://crazyrouter.com/v1>",
    api_key="sk-your-key"
)

# Generate with DALL-E 3
response = client.images.generate(
    model="dall-e-3",
    prompt="A futuristic Tokyo skyline at sunset, cyberpunk style",
    size="1024x1024",
    quality="hd"
)
print(response.data[0].url)

# Switch to Imagen 4 — same API!
response = client.images.generate(
    model="imagen-4",
    prompt="A photorealistic portrait of a robot barista",
    size="1024x1024"
)
print(response.data[0].url)

cURL Example

curl -X POST <https://crazyrouter.com/v1/images/generations> \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer sk-your-key" \
  -d '{
    "model": "dall-e-3",
    "prompt": "A cute robot reading a book in a library",
    "size": "1024x1024"
  }'

Pricing