Image APIConnected models

Text-to-Image API

Generate commercial-grade images through one API. Access GPT Image 2, Midjourney, Nano Banana Pro, and more — unified key, unified billing, no per-model integrations.

GPT Image 2MidjourneyNano Banana ProFlux
Creative preview

One request shape, multiple image engines.

Ship batch generation, edits, and prompt-based visual production without splitting your pipeline across providers.

5+

Image engines

Switch models without rewriting request adapters.

20

Batch jobs

Submit up to twenty prompts in one async request.

4K

Output ceiling

Commercial image workflows from concept through high-res delivery.

Overview

Why one API for image generation

Image generation models are not interchangeable. Midjourney excels at stylized art direction. GPT Image 2 handles instruction-following and text rendering. Nano Banana Pro leads on multi-image composition and realistic edits. The right model depends on the job.

Why one API for image generation

Image generation models are not interchangeable. Midjourney excels at stylized art direction. GPT Image 2 handles instruction-following and text rendering. Nano Banana Pro leads on multi-image composition and realistic edits. The right model depends on the job.

Instead of signing up for each provider separately, managing separate API keys, and writing per-model request adapters, ImaRouter gives you a single integration that reaches all of them. Switch models by changing one parameter — your pipeline stays unchanged.

  • Access multiple top image models with one API key
  • Unified request schema — no per-provider adapter code
  • Output normalization: consistent image URL response across all models
  • Unified cost tracking and billing across all image providers
  • Commercial-use output supported on all integrated models

Supported models and their strengths

Each model in ImaRouter's image catalog has a distinct capability profile. Understanding which model to use for which job lets you produce better outputs at lower cost.

  • GPT Image 2 — Instruction-following, in-image text rendering, product mockups, UI screenshots
  • Midjourney — Stylized art direction, editorial illustration, brand visual identity
  • Nano Banana Pro — Multi-image composition, image editing, relighting, 4K commercial output
  • Stable Diffusion XL — Fast iteration, open-weight flexibility, custom fine-tune support
  • Flux — Photorealistic output, fashion and lifestyle imagery

Capabilities

What you can build

The Text-to-Image API is built for product teams, not just AI experimenters. These are the integration patterns teams use it for in production.

03

What you can build

The Text-to-Image API is built for product teams, not just AI experimenters. These are the integration patterns teams use it for in production.

  • E-commerce product image generation: generate lifestyle shots, background swaps, and model-on-product imagery at scale
  • Ad creative automation: generate dozens of creative variants per campaign in one batch request
  • Social content tools: let users generate on-brand visuals from a text prompt inside your app
  • Design workflow acceleration: generate mood board imagery, layout comps, and icon concepts
  • Content moderation testing: generate edge-case image samples for training content filters
04

Async generation and batch support

High-quality image models can take 5–30 seconds per generation. For product workflows that generate multiple images at once, synchronous blocking requests create a bad user experience.

ImaRouter supports async generation with job polling. Submit a generation request, receive a job ID, and poll for completion — or use a webhook to receive results when the image is ready. Batch endpoints let you submit up to 20 generation jobs in one API call.

  • POST /v1/image/generate — synchronous, returns image URL directly for fast models
  • POST /v1/image/generate/async — returns job ID, poll with GET /v1/jobs/{jobId}
  • Webhook delivery: receive completed images at your endpoint without polling
  • Batch: submit up to 20 prompts in one request, receive all results when complete
05

Getting started

Send a standard POST request to /v1/image/generate with your prompt, model, and output size. Use your ImaRouter API key in the Authorization header. The response contains the image URL and metadata including model used, generation time, and cost.

If you already use the OpenAI images API, the schema is compatible — swap the base URL and key to get immediate access to the full model catalog.

  • Base URL: https://api.imarouter.com/v1/image/generate
  • Required params: prompt (string), model (string), size (string)
  • Response: url (string), model, width, height, cost_usd
  • SDK: compatible with OpenAI image generation client shape

FAQ

FAQ

Are the generated images commercially usable?

All models accessible through ImaRouter produce commercially licensed output. You own the generated images and can use them in products, ads, and publications without additional licensing fees beyond the generation cost.

What image sizes and formats are supported?

Supported sizes vary by model, ranging from 512×512 to 4096×4096. Common aspect ratios (1:1, 4:3, 16:9, 9:16) are supported across all integrated models. Output is delivered as PNG or JPEG via CDN URL.

Can I fine-tune a model on my own images?

Fine-tuning is available for select models including Stable Diffusion XL and Flux. Upload a training dataset through the dashboard and reference your fine-tuned model ID in generation requests.

How is billing handled across multiple models?

All image generation is billed on a per-image basis at the rate listed for each model in the pricing dashboard. You receive a single monthly invoice covering all models and endpoints. There are no platform fees or minimum commitments.