Quick setup
Open the kRouter dashboard at http://localhost:20128
Go to Providers → click Gemini
Paste your API key, click Save
Test the connection
Use in your IDE
Point any OpenAI-compatible client at kRouter using your local API key.
# Endpoint
http://localhost:20128/v1
# API key (from Dashboard → API Keys)
sk-krouter-XXXX
# Model
gemini/gemini-2.5-proHow Gemini billing works with kRouter
Gemini gives you free starting credits, then bills per token. kRouter tracks the remaining quota and fails over to another provider before you hit a wall. kRouter authenticates it via apikey. 20 models are routable as gemini/<model>.
Through kRouter, Gemini serves chat and code completion, embeddings, exposed on /v1/embeddings, image generation, exposed on /v1/images/generations, image understanding (OCR / vision-to-text), web search, exposed on /v1/search so an agent can look things up mid-conversation, text-to-speech, exposed on /v1/audio/speech, speech-to-text, exposed on /v1/audio/transcriptions. Requests reach it through the same local OpenAI-compatible endpoint as every other provider, so switching to or from Gemini is a one-line model change in your client rather than a rewrite.
Gemini models & pricing
Prices are USD per 1M tokens, cheapest first. kRouter bills nothing on top; this is the provider's own rate.
| Model | Route as | Input /1M | Output /1M |
|---|---|---|---|
| Gemini 2.5 Flash Lite | gemini/gemini-2.5-flash-lite | $0.15 | $1.25 |
| Gemini 2.0 Flash Lite | gemini/gemini-2.0-flash-lite | $0.15 | $1.25 |
| Gemini 2.5 Flash Lite (Cheapest) | gemini/gemini-2.5-flash-lite | $0.15 | $1.25 |
| Gemini 2.5 Flash | gemini/gemini-2.5-flash | $0.30 | $2.50 |
| Gemini 2.0 Flash | gemini/gemini-2.0-flash | $0.30 | $2.50 |
| Gemini 2.5 Flash Image (Nano Banana) | gemini/gemini-2.5-flash-image | $0.30 | $2.50 |
| Gemini 2.5 Flash | gemini/gemini-2.5-flash | $0.30 | $2.50 |
| Gemini 2.0 Flash | gemini/gemini-2.0-flash | $0.30 | $2.50 |
| Gemini 3.1 Pro Preview | gemini/gemini-3.1-pro-preview | $0.50 | $3.00 |
| Gemini 3.1 Flash Lite Preview | gemini/gemini-3.1-flash-lite-preview | $0.50 | $3.00 |
| Gemini 3 Flash Preview | gemini/gemini-3-flash-preview | $0.50 | $3.00 |
| Gemini Embedding 2 Preview | gemini/gemini-embedding-2-preview | $0.50 | $3.00 |
| Gemini Embedding 001 | gemini/gemini-embedding-001 | $0.50 | $3.00 |
| Gemini 3.1 Flash Image (Nano Banana 2) | gemini/gemini-3.1-flash-image-preview | $0.50 | $3.00 |
| Gemini 3 Pro Image (Nano Banana Pro) | gemini/gemini-3-pro-image-preview | $0.50 | $3.00 |
| Gemini 2.5 Pro | gemini/gemini-2.5-pro | $2.00 | $12.00 |
| Gemini 2.5 Pro (Best) | gemini/gemini-2.5-pro | $2.00 | $12.00 |
| Gemma 4 31B IT | gemini/gemma-4-31b-it | — | — |
| Text Embedding 005 | gemini/text-embedding-005 | — | — |
| Text Embedding 004 (Legacy) | gemini/text-embedding-004 | — | — |
Gemini links
Gemini FAQ
Is Gemini free through kRouter?
Gemini is pay-per-token: you bring your own API key and are billed by Gemini at their rates. kRouter adds nothing on top and is free and MIT-licensed.
How do I use Gemini with Claude Code or Cursor?
Connect Gemini in the kRouter dashboard, then point your tool at kRouter's local endpoint (http://localhost:20128/v1) with a kRouter API key. Any OpenAI-compatible client works, and models are addressed as gemini/<model>.
Which Gemini models can kRouter route to?
20 models, including Gemini 3.1 Pro Preview, Gemini 3.1 Flash Lite Preview, Gemini 3 Flash Preview. Every one is addressed as gemini/<model> from any client.
What happens when Gemini is rate limited?
kRouter detects the limit, parks that account until its real reset time, and fails over to your next connected account or provider — so the request still completes instead of erroring.