Back to Models

Gemma 4 31B

googlegoogle/gemma-4-31b

Google's Gemma 4 31B dense model β€” open weights under Apache 2.0, ranks #3 on the open Arena leaderboard. Multimodal text + image input. Released April 2026.

Context Length
128K
Max Output
8K
Input Priceper 1M tokens
$0.360/ 1M tokens
Output Priceper 1M tokens
$0.600/ 1M tokens

Modalities

textimage→text

Pricing Breakdown

TypeRate
Input$0.360 / 1M tokens
Output$0.600 / 1M tokens

Supported Parameters

temperaturemax_tokenstop_pstop

API Usage Examples

Use the global api.therouter.ai endpoint shown below for new integrations; the legacy China accelerated endpoint is retired.

cURL
curl https://api.therouter.ai/v1/chat/completions   -H "Content-Type: application/json"   -H "Authorization: Bearer $THE_ROUTER_API_KEY"   -d '{
    "model": "google/gemma-4-31b",
    "messages": [
      {"role": "user", "content": "Summarize the key points from this input."}
    ]
  }'
Customer Support