Skip to content
  • Models
  • Rankings
  • Ori
Sign Up
Sign Up
OpenRouterOpenRouter
© 2026 OpenRouter, Inc

Product

  • Chat
  • Rankings
  • Benchmarks
  • Apps
  • Discover
  • Models
  • Collections
  • Providers
  • Tools
  • Pricing
  • Business
  • Enterprise
  • Labs

Company

  • About
  • Blog
  • Careers
    Hiring
  • Privacy
  • Terms of Service
  • Trust Center
  • Support
  • Works With OR
  • Data
  • Brand

Developer

  • Documentation
  • API Reference
  • Developer Platform
  • Status

Connect

  • Discord
  • GitHub
  • LinkedIn
  • X
  • YouTube
All server tools

Image generation

openrouter:image_generation

DocsTry this tool

Lets any text model produce images. The model writes an image prompt, OpenRouter generates the image with the configured image model (openai/gpt-5-image by default), and the image is returned alongside the response.

DocsTry this tool

How it works

For adding images to any model’s responses, including text-only models.

  1. 1

    Your model decides an image would help and writes a prompt for it.

  2. 2

    OpenRouter generates it with the configured image model and returns the URL.

  3. 3

    Your model includes the image in its response, and can create several.

Providers and pricing

  • Favicon for https://openrouter.ai

    OpenRouter

    Image model pricing

    Priced by the image model the tool calls; any model with image output can be selected.

Standard model token costs apply to every request.

Using this tool

OpenRouter runs the tool during the request and returns the result to the model, so no client-side tool loop is needed.

Supported APIs: Chat Completions, Responses, and Anthropic Messages.

shell
curl https://openrouter.ai/api/v1/chat/completions \
  -H "Authorization: Bearer $OPENROUTER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "model": "openai/gpt-5.2",
  "tools": [
    {
      "type": "openrouter:image_generation"
    }
  ],
  "messages": [
    {
      "role": "user",
      "content": "Draw a watercolor painting of a lighthouse at dusk."
    }
  ]
}'

Setup, parameters, and examples in the docs.

Read the integration guide