UniterRouter
API ReferenceOpenAI Compatible

Images

DALL-E API - Generate images from text prompts through UniterRouter. Access DALL-E 3, Stable Diffusion, Midjourney-style image generation with unified API.

Images

Create images from text descriptions using various image generation models.

Endpoint

POST https://api.uniterouter.ai/v1/images/generations

Request Body

ParameterTypeRequiredDescription
modelstringYesID of the image model to use
promptstringYesText description of the desired image
nintegerNoNumber of images to generate (default: 1)
sizestringNoImage dimensions (e.g., 1024x1024)
qualitystringNoImage quality: standard or hd
stylestringNoStyle: natural or vivid
response_formatstringNourl (default) or b64_json

Supported Models

ModelProviderSizesFeatures
dall-e-3OpenAI1024x1024, 1792x1024, 1024x1792HD quality, styles
dall-e-2OpenAI256x256, 512x512, 1024x1024Multiple images
flux-proBlack Forest LabsVariousHigh quality
flux-schnellBlack Forest LabsVariousFast generation

Example Request

curl https://api.uniterouter.ai/v1/images/generations \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer $UNITEROUTER_API_KEY" \
  -d '{
    "model": "dall-e-3",
    "prompt": "A serene Japanese garden with cherry blossoms",
    "size": "1024x1024",
    "quality": "hd"
  }'
from openai import OpenAI

client = OpenAI(
    base_url="https://api.uniterouter.ai/v1",
    api_key="your_api_key",
)

response = client.images.generate(
    model="dall-e-3",
    prompt="A serene Japanese garden with cherry blossoms",
    size="1024x1024",
    quality="hd",
    n=1
)

image_url = response.data[0].url
print(f"Generated image: {image_url}")
import OpenAI from "openai";

const client = new OpenAI({
  baseURL: "https://api.uniterouter.ai/v1",
  apiKey: process.env.UNITEROUTER_API_KEY,
});

const response = await client.images.generate({
  model: "dall-e-3",
  prompt: "A serene Japanese garden with cherry blossoms",
  size: "1024x1024",
  quality: "hd",
  n: 1,
});

console.log(`Generated image: ${response.data[0].url}`);

Response

{
  "created": 1706123456,
  "data": [
    {
      "url": "https://...",
      "revised_prompt": "A tranquil Japanese garden featuring delicate pink cherry blossoms..."
    }
  ]
}

Size Options

DALL-E 3

SizeAspect RatioUse Case
1024x10241:1Square, general purpose
1792x102416:9Landscape, headers
1024x17929:16Portrait, mobile

Quality & Style

  • Quality: standard (faster) or hd (more detail)
  • Style: natural (realistic) or vivid (dramatic)

Note: Image URLs from DALL-E are temporary and expire after ~1 hour. Download images promptly or use b64_json format.

How is this guide?