Skip to content
Dashboard

Gemini 2.5 Pro

Gemini 2.5 Pro is a Pro-tier thinking model from Google, built for complex reasoning, coding, math, and science tasks, with strong results on human preference benchmarks and a context window of 1.0M tokens. Your use is subject to Google's Terms & Privacy Policies.

View API reference
Input and output price
Prices from: Input $1.25, Output $10, Per 1M tokens
24h uptime
Loading AI Gateway uptime
import { streamText } from 'ai'
const result = streamText({
model: 'google/gemini-2.5-pro',
prompt: 'Why is the sky blue?'
})
Read docs

Copy link to headingPlayground

Try out Gemini 2.5 Pro by Google. Usage is billed to your team at API rates. Free users (those who haven't made a payment) get $5 of credits every 30 days.

google logo
google logo

Gemini 2.5 Pro

Copy link to headingProviders

Route requests across multiple providers. Copy a provider slug to set your preference. Visit the docs for more info. Using a provider means you agree to their terms, listed under Legal.

Checking availability for your team
Provider
Context
Max Output
Latency
Throughput
Input
Output
Cache
Web Search
Capabilities
ZDR
No Training
Regional Inference
Free Tier
Release Date
1M66K1.8 s92 tps
$1.25/M+3 more
$10/M+3 more
Read$0.13/M
$35/K+1 more
+3
US
EU
03/20/2025
1M66K2.3 s147 tps
$1.25/M+3 more
$10/M+3 more
Read$0.13/M
$35/K+1 more
+3
03/20/2025

Copy link to headingUptime

Direct request success rate on AI Gateway and per-provider. Visit the docs for more info.

Copy link to headingThroughput

P50 throughput on live AI Gateway traffic, in tokens per second (TPS). Visit the docs for more info.

Copy link to headingLatency

P50 time to first token (TTFT) on live AI Gateway traffic, in milliseconds. View the docs for more info.

Getting started

Call Gemini 2.5 Pro through AI Gateway with the AI SDK generateText and streamText functions, or through the OpenAI Chat Completions, OpenAI Responses, and Anthropic Messages APIs by changing the base URL. AI Gateway authenticates the request and routes it to an available provider.

Install the AI SDK (pnpm add ai dotenv), create an API key from the API Keys page, and set it as AI_GATEWAY_API_KEY in your environment. Full setup is covered in the text generation quickstart.

index.ts
import { generateText } from 'ai';
import 'dotenv/config';
async function main() {
const result = await generateText({
model: 'google/gemini-2.5-pro',
prompt: 'Why is the sky blue?',
});
console.log(result.text);
}
main().catch(console.error);

Top-level parameters

The same Gemini 2.5 Pro request in each API format AI Gateway supports.

top-level-params.ts
import { generateText } from 'ai';
import 'dotenv/config';
async function main() {
const result = await generateText({
model: 'google/gemini-2.5-pro',
system: 'You are a concise technical assistant.',
prompt: 'Summarize the tradeoffs between static generation and SSR.',
maxOutputTokens: 1024,
});
console.log(result.text);
}
main().catch(console.error);

Standard parameters like prompt, messages, temperature, and tools work as documented in the AI SDK docs. These are the parameters with model-specific behavior.

ParameterTypeRequiredDescription
modelstringYesModel ID in the form creator/model, e.g. google/gemini-2.5-pro. AI Gateway routes the request to an available provider.
maxOutputTokensnumberNoHard cap on generated tokens. Gemini 2.5 Pro supports up to 65,536 output tokens. Reasoning tokens count toward this limit.
reasoning'provider-default' | 'none' | 'minimal' | 'low' | 'medium' | 'high' | 'xhigh'NoProvider-agnostic reasoning effort, available in AI SDK 7 or later. Maps to the provider’s native reasoning configuration; reasoning settings under providerOptions take precedence when both are set. See the Reasoning section below.
providerOptionsRecord<string, JSONValue>NoAI Gateway routing options under gateway, plus any provider-native options under the provider’s own namespace — see the table below.

Input limits

InputFormatsSourcesMax countMax sizeLimits
TextPrompt and response share the 1M-token context window
ImageURL, base64, Uint8ArraySent as image parts in messages; counts as input tokens
PDFURL, base64, Uint8ArraySent as file parts in messages; counts as input tokens

Provider options

Set AI Gateway routing options under providerOptions.gateway. For provider-specific options, pass them under the provider’s namespace as documented by the AI SDK.

Learn more in the AI SDK google provider docs.

provider-options.ts
import { generateText } from 'ai';
import 'dotenv/config';
async function main() {
const result = await generateText({
model: 'google/gemini-2.5-pro',
prompt: 'Why is the sky blue?',
providerOptions: {
gateway: {
only: ['vertex', 'google'],
},
},
});
console.log(result.text);
}
main().catch(console.error);

These AI Gateway routing options apply to every model. Provider-specific options pass through under the provider’s own namespace (for example providerOptions.anthropic) exactly as documented by the AI SDK.

ParameterTypeRequiredDescription
providerOptions.gateway.onlystring[]NoRestrict routing to these provider slugs. Requests fail over only within the listed providers.
providerOptions.gateway.orderstring[]NoPreferred provider order. Listed providers are tried first; unlisted providers remain available as fallbacks.
providerOptions.gateway.sort'cost' | 'ttft' | 'tps'NoRank candidate providers by price, time to first token, or tokens per second instead of the default routing order.
providerOptions.gateway.zeroDataRetentionbooleanNoRoute only to providers with a zero-data-retention policy for this model.

Routing across providers

AI Gateway serves the same model through multiple providers and fails over automatically. order expresses a preference while keeping every provider eligible; only is a hard allowlist — if none of the listed providers are available the request fails instead of falling back.

Options under a provider's own namespace (for example providerOptions.anthropic) are forwarded to that provider with the request. Providers ignore option namespaces that don't apply to them, so it is safe to set provider options alongside gateway routing options.

Reasoning

AI Gateway bridges reasoning across every API format. The AI SDK exposes a provider-agnostic top-level reasoning level (none, minimal, low, medium, high, or xhigh); the Chat Completions and Responses formats take the same effort under reasoning.effort; and the Anthropic Messages format uses a native thinking token budget. Whichever you send, the gateway maps it to the target model’s native configuration, converting between effort levels and token budgets as needed. Reasoning-related settings under providerOptions take full precedence over the top-level reasoning value and are never merged. Reasoning tokens typically count toward your output-token usage, though how they’re reported and billed varies by provider.

Learn more in the AI Gateway reasoning guide.

reasoning.ts
import { generateText } from 'ai';
import 'dotenv/config';
async function main() {
const result = await generateText({
model: 'google/gemini-2.5-pro',
prompt: 'Explain the Monty Hall problem step by step.',
reasoning: 'high',
});
console.log(result.text);
}
main().catch(console.error);

Image input

Send images alongside text as message parts. Images count as input tokens.

image-input.ts
import { generateText } from 'ai';
import 'dotenv/config';
async function main() {
const result = await generateText({
model: 'google/gemini-2.5-pro',
messages: [
{
role: 'user',
content: [
{ type: 'text', text: 'Describe this image.' },
{ type: 'image', image: 'https://example.com/photo.jpg' },
],
},
],
});
console.log(result.text);
}
main().catch(console.error);

PDF input

Attach PDFs as file parts. Their contents count as input tokens.

pdf-input.ts
import { generateText } from 'ai';
import 'dotenv/config';
async function main() {
const result = await generateText({
model: 'google/gemini-2.5-pro',
messages: [
{
role: 'user',
content: [
{ type: 'text', text: 'Summarize this document.' },
{
type: 'file',
mediaType: 'application/pdf',
data: 'https://example.com/document.pdf',
},
],
},
],
});
console.log(result.text);
}
main().catch(console.error);

Tool calling

Expose tools the model can call. Define each tool’s inputs with a Zod schema.

tool-calling.ts
import { generateText, tool } from 'ai';
import { z } from 'zod';
import 'dotenv/config';
async function main() {
const result = await generateText({
model: 'google/gemini-2.5-pro',
prompt: 'What is the weather in San Francisco?',
tools: {
getWeather: tool({
description: 'Get the current weather for a location',
inputSchema: z.object({ location: z.string() }),
execute: async ({ location }) => ({ location, temperatureC: 18 }),
}),
},
});
console.log(result.text);
}
main().catch(console.error);

Copy link to headingMore models by Google

Model
Context
Latency
Throughput
Input
Output
Cache
Web Search
Capabilities
Providers
ZDR
No Training
Free Tier
Release Date
1M1.8 s444 tps
$0.75/M
$3.75/M
Read$0.08/M
$14/K+1 more
+3
google logo
vertex logo
09/02/2026
1M1.2 s272 tps
$0.75/M
$3.75/M
Read$0.08/M
$14/K+1 more
+3
google logo
vertex logo
08/13/2026
1M0.6 s334 tps
$0.30/M
$2.50/M
Read$0.03/M
$14/K+1 more
+3
google logo
vertex logo
07/21/2026
1M0.6 s293 tps
$0.25/M
$1.50/M
Read$0.03/M
$14/K+1 more
+3
google logo
vertex logo
05/07/2026
1M0.7 s200 tps
$0.50/M+1 more
$3/M+1 more
Read$0.05/M
$14/K+1 more
+3
google logo
vertex logo
12/17/2025
1M0.3 s384 tps
$0.10/M
$0.40/M
Read$0.01/M
$35/K+1 more
+3
google logo
vertex logo
06/17/2025

Copy link to headingAbout Gemini 2.5 Pro

Google introduced Gemini 2.5 Pro on March 20, 2025 as the flagship of the Gemini 2.5 thinking model generation. Reasoning is its headline capability. Gemini 2.5 models reason through their thoughts before responding, and Google achieved this performance level by combining a significantly enhanced base model with improved post-training. On reasoning benchmarks, 2.5 Pro posts strong results on math and science (including GPQA and AIME 2025) without majority voting or other cost-increasing test-time techniques. On Humanity's Last Exam, a dataset designed by hundreds of subject matter experts to represent the human frontier of knowledge and reasoning, 2.5 Pro scores 18.8% without tool use.

Coding performance received particular attention. Gemini 2.5 Pro represents a significant leap over the 2.0 generation in creating web apps and agentic code applications, along with code transformation and editing. On SWE-Bench Verified, the industry-standard benchmark for agentic code evaluation, it scores 63.8% with a custom agent setup. It can generate a playable video game from a single-line prompt.

Gemini 2.5 Pro ships with a context window of 1.0M tokens, the largest among Gemini 2.5 models, and supports text, audio, images, video, and entire code repositories as input. Tool use including Google Search and code execution is available.

Copy link to headingWhat To Consider When Choosing a Provider

  • Configuration: Given the context window of 1.0M tokens, applications passing very large inputs should confirm provider-side limits and latency expectations for long-context requests before deploying at scale.
  • Zero Data Retention: Zero Data Retention is available for this model. It is offered on a per-provider and model basis. See the documentation for details.
  • Authentication: AI Gateway authenticates requests using an API key or OIDC token. You do not need to manage provider credentials directly.

Copy link to headingWhen to Use Gemini 2.5 Pro

Best for

  • Advanced coding and software engineering: Building visually compelling web applications, writing agentic code, performing large-scale code transformation and editing across entire repositories
  • Complex mathematical and scientific reasoning: Multi-step problems in mathematics, physics, chemistry, or logic that require sustained chain-of-thought reasoning without test-time augmentation
  • Research and long-document analysis: Processing entire codebases, academic papers, legal corpora, or research datasets within a context of 1.0M tokens to extract insights, connections, and answers
  • Hard benchmark-level tasks: Questions from expert-curated datasets, graduate-level reasoning problems, or tasks at the outer edge of what general-purpose models typically handle
  • Agentic applications requiring deep planning: Multi-step workflows where the model must reason across tools, plan sub-tasks, and produce executable or high-accuracy outputs

Consider alternatives when

  • High-volume routine tasks: Translation, classification, and summarization where the reasoning depth of 2.5 Pro adds cost without improving output quality
  • Speed-first accuracy targets: Response speed is paramount and accuracy requirements can be met by 2.5 Flash with thinking enabled
  • Smaller context windows suffice: Your application does not benefit from the context window of 1.0M tokens, making the pricing premium for Pro's larger capacity unnecessary
  • Embedding or retrieval workloads: A dedicated embedding model is architecturally appropriate for these use cases

Gemini 2.5 Pro is purpose-built for the hardest problems: code that requires deep understanding of large repositories, mathematical reasoning at competition level, and research tasks that demand both breadth of knowledge and sustained logical precision. Teams tackling the most demanding inference workloads will find in 2.5 Pro a model whose thinking architecture and context window of 1.0M tokens were designed specifically for that class of challenge.

Copy link to headingFrequently Asked Questions

  • What is Gemini 2.5 Pro's score on LMArena?

    Gemini 2.5 Pro ranks highly on LMArena, which measures human preferences across a broad range of tasks. Check the LMArena leaderboard for the latest score, as rankings shift over time.

  • What coding benchmarks does 2.5 Pro perform strongly on?

    Gemini 2.5 Pro scores 63.8% on SWE-Bench Verified with a custom agent setup. SWE-Bench Verified is the industry-standard benchmark for agentic code evaluation. The model also excels at creating web apps, agentic code applications, and code transformation.

  • How does 2.5 Pro's thinking capability differ from 2.5 Flash's?

    Both models reason through problems before responding. Gemini 2.5 Pro is the Pro tier in the Gemini 2.5 family and posts strong results on coding, math, and science benchmarks. Gemini 2.5 Flash provides configurable thinking budgets and sits at the Pareto frontier of cost and performance.

  • What is Humanity's Last Exam and how does Gemini 2.5 Pro perform on it?

    Humanity's Last Exam is a benchmark dataset created by hundreds of subject matter experts to capture the human frontier of knowledge and reasoning. Gemini 2.5 Pro scores 18.8% on this benchmark without tool use.

  • What is the context window size?

    Gemini 2.5 Pro has a context window of 1.0M tokens, the largest among Gemini 2.5 models, enabling it to process entire code repositories, lengthy research datasets, or extensive multi-document inputs in a single pass.

  • What tool use capabilities does 2.5 Pro have?

    Google Search and code execution are available as built-in tools. The model can fetch real-time information, run code, and verify results within a single inference session.

  • Does 2.5 Pro support multimodal input?

    Yes. The model accepts text, audio, images, video, and entire code repositories as input, maintaining the native multimodality that defines the Gemini model family.

  • Is Gemini 2.5 Pro generally available?

    It launched as an experimental model on March 20, 2025. Google later promoted it to stable general availability as part of the Gemini 2.5 family expansion.