Gemini's reasoning-focused models โ the "Thinking" variants of the Gemini family โ are designed to work through multi-step problems internally, showing their chain of thought before producing a final answer. They rank #6 among the most-used AI model lines, at roughly 25.6% usage share, and compete directly with OpenAI's o-series on math, logic, and coding benchmarks. Made by Google DeepMind, they combine Gemini's native multimodal strengths with deeper deliberation for harder problems.
Thinking-variant Gemini models are called through the same google-genai Python SDK, with an optional thinking config to control how much internal reasoning budget the model uses.
from google import genai
from google.genai import types
client = genai.Client(api_key="YOUR_API_KEY")
response = client.models.generate_content(
model="gemini-2.5-pro",
contents="A train leaves at 2pm going 60mph, another leaves 30 minutes later going 75mph on the same route. When does the second train catch up?",
config=types.GenerateContentConfig(
thinking_config=types.ThinkingConfig(thinking_budget=2048)
)
)
print(response.text)
Get a free API key from Google AI Studio, install the SDK, then call a Thinking-capable Gemini model.
# 1. Get a free API key at aistudio.google.com/apikey
# 2. install the SDK
pip install google-genai
# 3. set your key and run a Python script targeting a "thinking" model
export GEMINI_API_KEY="your-key-here"