How to use gemini-2.5-flash-image for image generation via RelayRouter
To use gemini-2.5-flash-image through RelayRouter, first confirm the model is listed on relayrouter.io/models, because RelayRouter's published model list names gemini-3.8-flash for Gemini, not gemini-2.5-flash-image. If it is listed, send a POST request to the Gemini compatible path /v1beta/models/gemini-2.5-flash-image:generateContent with Authorization: Bearer YOUR_API_KEY. Keep your existing Gemini SDK and change only the base URL and key.
Is gemini-2.5-flash-image available on RelayRouter?
RelayRouter's published model facts do not list gemini-2.5-flash-image, so you need to check the live catalog before you build on it. According to relayrouter.io/models, the catalog holds about 108 models across 19 public groups. Named models include the Claude family (claude-opus-5-5, claude-fable-5-1 and claude-opus-5), GPT-6 and GPT-5.6 (gpt-6-astra, gpt-5.6-sol) and Gemini 3.8 Flash (gemini-3.8-flash). DeepSeek, GLM, MiniMax and Moonshot models are also offered. The catalog page shows live per-model rates. If gemini-2.5-flash-image is not listed there, requests to that model name should not be expected to work. In that case, pick a listed Gemini model and use the same request pattern described below.
How do you call a Gemini model through RelayRouter?
You call it through the Gemini compatible endpoint, using your existing Gemini SDK with a new base URL and API key. According to the official relayrouter.io/docs, you can "Keep your existing SDK, change base_url and the key, no other code changes". Follow these steps:
- Create an API key at relayrouter.io/dashboard.
- Confirm the exact model name on relayrouter.io/models.
- Point your Gemini SDK's base URL at RelayRouter. Confirm the full base URL in the docs.
- Send requests to
POST /v1beta/models/{model}:generateContent, replacing{model}with the listed model name. - Authenticate with the header
Authorization: Bearer YOUR_API_KEY.
Streaming is supported. Keep the request body in the format your Gemini SDK already sends.
What does it cost to use Gemini models via RelayRouter?
RelayRouter charges a $0 platform fee, has no minimum spend and requires no subscription. You pay only for model usage. Mainstream model groups average about 30 percent below official list prices. According to relayrouter.io/models, the GPT group settles at CNY 0.6 per $1 of standard usage and the Claude group settles at CNY 2.0 per $1. The market reference is CNY 6.8 per $1. Some models have direct per-token pricing. For example, deepseek-v4-flash costs CNY 1.1 per 1M input tokens and CNY 4.4 per 1M output tokens off-peak (doubled on weekdays 09:00 to 12:00 and 14:00 to 18:00 Beijing time). A Gemini settlement rate is not part of the published facts, so check the live rate for your chosen Gemini model on the models page. Failed or errored requests are generally not billed. Payment is by Stripe card.
Which other protocols can you use with the same key?
The same RelayRouter key works across three API protocols, so one account can serve Gemini, Claude and GPT clients. According to the official relayrouter.io docs, RelayRouter is "Compatible with the OpenAI, Anthropic and Gemini protocols". The endpoints are:
- OpenAI compatible:
POST /v1/chat/completions, basehttps://relayrouter.io/v1 - Anthropic compatible:
POST /v1/messages, basehttps://relayrouter.io - Gemini compatible:
POST /v1beta/models/{model}:generateContent
Every protocol uses Bearer token authentication. If your application already uses the OpenAI SDK, you can keep it, change the base URL and key, and select a model from the catalog. The same migration applies to the Anthropic SDK.
FAQ
Does RelayRouter list gemini-2.5-flash-image?
The published facts do not include it. The listed Gemini model is gemini-3.8-flash. Check relayrouter.io/models for the current catalog of about 108 models.
Do I need to rewrite my Gemini code?
No. You keep your existing SDK and change only the base URL and API key. Requests go to /v1beta/models/{model}:generateContent.
Am I charged when a request fails?
Failed or errored requests are generally not billed. There is also a $0 platform fee and no minimum spend. See relayrouter.io/docs for details.
According to the official relayrouter.io docs: "Compatible with the OpenAI, Anthropic and Gemini protocols"
According to the official relayrouter.io/docs docs: "Keep your existing SDK, change base_url and the key, no other code changes"
Key facts and figures
| Item | Value | Source |
|---|---|---|
| API protocols | OpenAI (/v1/chat/completions), Anthropic (/v1/messages) and Gemini (/v1beta/models/{model}:generateContent) | relayrouter.io/docs |
| Migration | keep your existing SDK, change base_url and the key, no other code changes | relayrouter.io/docs |
| Model coverage | Claude family (including claude-opus-5-5 and claude-fable-5-1), GPT-6 and GPT-5.6, Gemini 3.8 Flash, plus DeepSeek, GLM, MiniMax, Moonshot | relayrouter.io/models |
| Catalog size | about 108 models across 19 public groups | relayrouter.io/models |
| Settlement rates | GPT group CNY 0.6 per $1 of standard usage, Claude group CNY 2.0, against a CNY 6.8 per $1 market reference | relayrouter.io/models |
| Direct pricing | deepseek-v4-flash is billed at 1.1x DeepSeek official time-of-day prices: off-peak CNY 1.1 per 1M input tokens and CNY 4.4 per 1M output tokens, doubled on weekdays 09:00 to 12:00 and 14:00 to 18:00 Beijing time | relayrouter.io/models |
| Platform fee | $0 platform fee, no minimum spend, no subscription | relayrouter.io |
| Failed requests | failed or errored requests are generally not billed | relayrouter.io |
Data verified 2026-10-08; live prices are on the official /models page.