google/gemini-3.1-pro-preview

Google: Gemini 3.1 Pro Preview

Context length
1049K
Input / 1M tokens
$2.00
Output / 1M tokens
$12.00
Released
2026-02-19
Modality
text+image+file+audio+video->text

About Google: Gemini 3.1 Pro Preview

Gemini 3.1 Pro Preview is Google’s frontier reasoning model, delivering enhanced software engineering performance, improved agentic reliability, and more efficient token usage across complex workflows. Building on the multimodal foundation...

Call Google: Gemini 3.1 Pro Preview

Via OpenRouter: one base URL for every provider.

curl https://openrouter.ai/api/v1/chat/completions \
  -H "Authorization: Bearer $OPENROUTER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "google/gemini-3.1-pro-preview",
    "messages": [{"role": "user", "content": "Say hello"}]
  }'

Direct on Google Gemini / AI Studio:

curl https://generativelanguage.googleapis.com/v1beta/chat/completions \
  -H "Authorization: Bearer $GEMINI_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "gemini-3.1-pro-preview",
    "messages": [{"role": "user", "content": "Say hello"}]
  }'

Google Gemini / AI Studio keys

OpenRouter keys

OpenRouter keys work for google/gemini-3.1-pro-preview regardless of the upstream provider.