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 Price
$0.360/ 1M tokens
Output Price
$0.600/ 1M tokens

Modalities

textimagetext

Pricing Breakdown

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

Supported Parameters

temperaturemax_tokenstop_pstop

API Usage Examples

China users: replace api.therouter.ai with api.therouter.com.cn in the examples below for lower latency.

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."}
    ]
  }'