Apply your own routing policies, reduce token costs automatically, and see every routing decision in real time with Merge Gateway.

What Gemini 3.1 Flash Lite costs to run
Test Gemini 3.1 Flash Lite
with Gateway’s Simulator
See a prompt's output, token spend, latency, and more with Gemini 3.1 Flash Lite.
Route requests to Gemini 3.1 Flash Lite in minutes
1$ pip install merge-gateway-sdk1from merge_gateway import MergeGateway
2
3client = MergeGateway(api_key="YOUR_API_KEY")
4
5response = client.responses.create(
6 model="openai/gpt-5.2",
7 input=[
8 {"type": "message", "role": "system", "content": "You are a helpful programming tutor. Explain the concepts clearly with practical examples."},
9 {"type": "message", "role": "user", "content": "Explain the concept of recursion in programming with a simple set of examples."},
10 ],
11)
12
13print(response.output[0].content[0].text)1response = client.responses.create(
2 model="anthropic/claude-sonnet-4-20250514",
3 input=[
4 {"type": "message", "role": "system", "content": "You are a helpful programming tutor. Explain the concepts clearly with practical examples."},
5 {"type": "message", "role": "user", "content": "Explain the concept of recursion in programming with a simple set of examples."},
6 ],
7)1from openai import OpenAI
2
3client = OpenAI(
4 api_key="YOUR_API_KEY",
5 base_url="https://api-gateway.merge.dev/v1/openai",
6)1response = client.chat.completions.create(
2 model="gpt-5.2",
3 messages=[
4 {"role": "system", "content": "You are a helpful programming tutor. Explain the concepts clearly with practical examples."},
5 {"role": "user", "content": "Explain the concept of recursion in programming with a simple set of examples."},
6 ],
7)
8
9print(response.choices[0].message.content)1npm install merge-gateway-ai-sdk-provider ai1import { createMergeGateway } from "merge-gateway-ai-sdk-provider";
2
3const gateway = createMergeGateway({
4 apiKey: "YOUR_API_KEY",
5});1import { generateText } from "ai";
2
3const { text } = await generateText({
4 model: gateway("openai/gpt-4o"),
5 prompt: "Explain the concept of recursion in programming with a simple set of examples.",
6});
7
8console.log(text);1import { createOpenAI } from "@ai-sdk/openai";
2
3const gateway = createOpenAI({
4 apiKey: "YOUR_API_KEY",
5 baseURL: "https://api-gateway.merge.dev/v1/ai-sdk",
6});
7
8// All generateText/streamText calls work unchanged1from anthropic import Anthropic
2
3client = Anthropic(
4 api_key="YOUR_API_KEY",
5 base_url="https://api-gateway.merge.dev/v1/anthropic",
6)
7
8message = client.messages.create(
9 model="claude-sonnet-4-20250514",
10 max_tokens=1024,
11 messages=[
12 {"role": "user", "content": "Explain the concept of recursion in programming with a simple set of examples."},
13 ],
14)
15
16print(message.content[0].text)Explore other models available in Merge Gateway
Gemini 3.1 Flash Lite FAQ
Heading
What other models does Google offer?
Google's Gemini lineup spans from lightweight, high-throughput models to large-scale reasoning flagships, covering a wide range of latency, cost, and capability requirements. Here are some other models Google supports:
- Gemini 2.5 Flash: A non-reasoning model with a 1 million token context window and multimodal input support (text, image, speech, video). It is priced at $0.30 per 1M input tokens and $2.50 per 1M output tokens and generates output at over 200 tokens per second on Artificial Analysis, making it a fast, cost-effective option for teams not yet on the Gemini 3.x generation
- Gemini 2.5 Pro: Google's prior-generation flagship reasoning model with a 1 million token context window and multimodal input support. It is priced at $1.25 per 1M input tokens and $10.00 per 1M output tokens, targeting high-accuracy reasoning workloads where cost is less of a constraint than output quality
- Gemini 3 Flash: A non-reasoning model with a 1 million token context window and multimodal input support, priced at $0.50 per 1M input tokens and $3.00 per 1M output tokens. It generates output at 158.4 tokens per second on Artificial Analysis and is positioned as a fast general-purpose model in the Gemini 3.x generation
- Gemini 3 Pro: A reasoning model with a 1 million token context window and multimodal input support, priced at $2.00 per 1M input tokens and $12.00 per 1M output tokens. It targets the highest accuracy tier in the Gemini 3.x lineup and is suited for complex multi-step reasoning and research-grade tasks
- Gemini 3.1 Flash Lite: The current model on this page, offering the highest throughput in the Gemini 3.1 family at 279.2 tokens per second on Artificial Analysis, with the lowest pricing tier among Gemini 3.x reasoning models at $0.25 per 1M input tokens and $1.50 per 1M output tokens
How does Gemini 3.1 Flash Lite differ from Google's other models?
Gemini 3.1 Flash Lite sits at the speed and cost-efficiency end of the Gemini 3.x lineup, designed for high-throughput workloads that benefit from reasoning capability without paying for the full Gemini 3 Pro cost tier.
- Pricing: At $0.25 per 1M input tokens and $1.50 per 1M output tokens, Gemini 3.1 Flash Lite is priced below Gemini 3 Flash ($0.50/$3.00) and well below Gemini 3 Pro ($2.00/$12.00). Its blended rate of $0.22 per 1M tokens on Artificial Analysis makes it one of the most cost-efficient reasoning models in the Gemini 3.x generation
- Speed: Gemini 3.1 Flash Lite generates output at 279.2 tokens per second on Artificial Analysis, ranking #5 out of 162 tracked models. This is faster than Gemini 3 Flash at 158.4 tokens per second and significantly faster than the Gemini 3 Pro tier, which is optimized for accuracy over throughput
- Intelligence score: Gemini 3.1 Flash Lite scores 34 out of 100 on the Artificial Analysis Intelligence Index, ranking #40 out of 162 models and described as well above average for its price tier. Gemini 3 Pro scores higher on reasoning benchmarks, making it the better choice for accuracy-critical tasks
- Context window: Gemini 3.1 Flash Lite supports a 1 million token context window, matching every other model in the Gemini 3.x lineup. This enables long-document processing and extended multi-turn context at the lowest price point in the family
- Multimodal input: Gemini 3.1 Flash Lite accepts text, image, speech, and video inputs with text-only output, matching the multimodal input breadth of Gemini 3 Flash and Gemini 3 Pro. This makes it a viable option for multimodal routing even in cost-sensitive pipelines
- Time to first token: At 5.33 seconds to first token on Artificial Analysis, Gemini 3.1 Flash Lite has higher latency than many non-reasoning alternatives. This reflects the reasoning compute overhead and makes it less suited for real-time, user-facing response generation where sub-second first-token latency is expected
Gemini 3.1 Flash Lite is best suited for batch processing, high-volume extraction, and reasoning-augmented pipelines where throughput and cost efficiency matter more than minimizing time to first token.
What models should I consider using alongside Gemini 3.1 Flash Lite?
No single model is optimal for every task. Here are models worth pairing with Gemini 3.1 Flash Lite depending on what your product needs:
- Gemini 3 Pro when tasks require Google's highest reasoning accuracy in the 3.x generation. At $2.00 per 1M input tokens and $12.00 per 1M output tokens, it handles complex multi-step reasoning and research-grade tasks that push beyond Gemini 3.1 Flash Lite's Intelligence Index score of 34 out of 100 on Artificial Analysis
- Kimi K2.6 when you need the highest open-weight reasoning score available. With an Intelligence Index of 54 out of 100 on Artificial Analysis, ranking #1 overall, it covers the most demanding reasoning workloads at $0.95 per 1M input tokens and $4.00 per 1M output tokens, complementing Gemini 3.1 Flash Lite's speed advantage with higher accuracy when needed
- MiniMax M2.5 as an alternative fast, cost-efficient reasoning model from a different provider. At 187.7 tokens per second and $0.30 per 1M input tokens on Artificial Analysis, it provides a failover path with comparable throughput and pricing characteristics if Gemini availability is constrained
- Claude Sonnet 4.5 for structured output, agentic tasks, and multi-turn conversations where formatting consistency and instruction-following reliability matter more than raw throughput. Routing structured-output requests to Claude while sending high-volume extraction tasks to Gemini 3.1 Flash Lite makes effective use of each model's strength
- GPT-4o Mini for low-cost, high-frequency classification or tagging tasks where OpenAI's ecosystem compatibility and broad community tooling are useful. It pairs well with Gemini 3.1 Flash Lite in a multi-provider cost routing setup that minimizes per-request spend on simple tasks
What are the challenges of using Gemini 3.1 Flash Lite in my product?
Like any production LLM, Gemini 3.1 Flash Lite comes with tradeoffs worth planning for:
- Provider dependency: Routing all requests through Google creates fragility when the provider has an outage or deprecates the preview version of Gemini 3.1 Flash Lite. A fallback to another fast, low-cost reasoning model ensures production continuity without manual intervention
- Cost at scale: At $1.50 per 1M output tokens and its notably verbose output pattern on Artificial Analysis, token costs compound quickly at high request volumes without active output length management or budget controls per project
- High time to first token: At 5.33 seconds to first token on Artificial Analysis, Gemini 3.1 Flash Lite is not well-suited for user-facing chat or real-time applications where perceived responsiveness depends on streaming starting quickly. The model's speed advantage is in total throughput, not initial response latency
- Preview status: Gemini 3.1 Flash Lite is currently in preview, which means the model string, pricing, and availability may change before general availability. Production integrations should monitor Google's release announcements and test any updated model version before switching in live traffic
- Verbosity in outputs: Artificial Analysis evaluation notes that Gemini 3.1 Flash Lite generates somewhat verbose responses, producing more output tokens than comparable models at the same intelligence tier. This increases the effective output cost per task and can affect response quality evaluation when brevity is preferred
Why should I use Merge Gateway to route LLM requests with Gemini 3.1 Flash Lite and every other model?
Using Gemini 3.1 Flash Lite through Merge Gateway gives you access to the model itself and the infrastructure layer around it:
- One API, every provider: Access Gemini 3.1 Flash Lite and every other major LLM through a single endpoint and API key. Change providers by swapping the model string — no application code changes required
- Intelligent routing and automatic failover: Merge routes around Google outages automatically. Routing policies based on cost, latency, or quality can reduce spend by 40–60% without touching your application code
- Cost governance: Set hard or soft project budgets so Gemini 3.1 Flash Lite spend stays within plan. Every request is attributed to a model, project, and tag in a unified billing dashboard across all providers
- Build Your Own Router: Define what "best" means for your traffic by selecting from curated ML benchmarks or adding your own eval scores. The router scores each available model against your weights and picks the winner per request, with a plain-language explanation of every decision
- Security and compliance controls: Apply DLP rules and prompt injection protection before every request reaches Google. Enforce per-project model and region policies without adding that logic to your application
How can I start routing requests to Gemini 3.1 Flash Lite via Merge Gateway?
Getting Gemini 3.1 Flash Lite running through Merge Gateway takes a few minutes:
1. Create an account and get your API key from the dashboard.
2. Install the Merge Gateway SDK: run pip install merge-gateway-sdk (Python) or npm install merge-gateway-sdk (Node). Alternatively, if you're already using the OpenAI SDK, set base_url = "https://api-gateway.merge.dev/v1/openai" and your existing code works as-is.
3. Make your first request using the provider/model format. For Gemini 3.1 Flash Lite, the model string is google/gemini-3.1-flash-lite. Swap the model string to route to any other provider without changing anything else.
4. Configure a routing policy in the dashboard to set failover behavior, cost limits, and optimization strategy. Your first policy can be as simple as naming Gemini 3.1 Flash Lite as primary with one fallback.
Full setup instructions and SDK references are in the Merge Gateway docs.
Try Gemini 3.1 Flash Lite through Merge Gateway
Route, observe, and control AI requests across providers from one API.





