Image Models

Generate and edit images through the OpenAI-compatible `/v1/images/generations` route, or via multimodal chat output on supported models.

Example image models

Pass the model ID in the model field. The examples below may change; confirm availability with GET /v1/models. Sizes, quality tiers, and editing support vary by model.

ParameterTypeRequiredDescription
google/gemini-3-pro-image-previewGoogleoptionalNano Banana Pro — quality-focused generation and editing.
google/gemini-3.1-flash-image-previewGoogleoptionalNano Banana 2 — fast, high-quality generation.
google/gemini-2.5-flash-imageGoogleoptionalNano Banana — efficient generation and edits.
openai/gpt-5.4-image-2OpenAIoptionalGPT image model with strong prompt adherence.
openai/gpt-5-imageOpenAIoptionalGeneral-purpose image generation.
openai/gpt-5-image-miniOpenAIoptionalCompact image-generation tier.

Generate an image

curl https://onerouter.com/v1/images/generations \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "google/gemini-3-pro-image-preview",
    "prompt": "A studio product photo of a ceramic mug on linen, soft light",
    "n": 1,
    "size": "1024x1024"
  }'

Editing & references

Image-to-image and edit workflows pass one or more reference images (model-dependent field, often image or image_url). Nano Banana models support mask-free editing — describe the change in the prompt. See the Image Generation API page for the full parameter list.

Model-dependent features

OneRouter keeps protocol compatibility and forwards model-specific parameters where supported. Features such as tool calling, structured output, reasoning, prompt caching, web search, image input, audio input, video generation, and provider-specific options depend on the selected model and upstream provider. Check the model detail page before relying on a feature in production.