Gemini 3.1 Pro Preview

Model details

Gemini 3.1 Pro Preview

Model
google/gemini-3.1-pro-preview
Provider
vercel-ai-gateway
API
anthropic-messages
Base URL
https://ai-gateway.vercel.sh
Input
text, image
Reasoning
Yes
Context window
1,000,000
Max tokens
64,000
Cost / million input
$2
Cost / million output
$12
Cost / million cache read
$0.2
Cost / million cache write
$0
Model config JSON
{
  "providers": {
    "vercel-ai-gateway": {
      "apiKey": "YOUR_API_KEY",
      "models": [
        {
          "id": "google/gemini-3.1-pro-preview",
          "name": "Gemini 3.1 Pro Preview",
          "reasoning": true,
          "input": [
            "text",
            "image"
          ],
          "contextWindow": 1000000,
          "maxTokens": 64000,
          "cost": {
            "input": 2,
            "output": 12,
            "cacheRead": 0.19999999999999998,
            "cacheWrite": 0
          }
        }
      ],
      "api": "anthropic-messages",
      "baseUrl": "https://ai-gateway.vercel.sh"
    }
  }
}