Gemma 4 31B API
google/gemma-4-31b-it
Use Gemma 4 31B by Google through the Solo Router API: 256K-token context and streaming. $0.234 per million input tokens and $0.65 per million output tokens, billed from prepaid credit.
Input
$0.234
per 1M tokens
Output
$0.65
per 1M tokens
Cached input
$0.047
per 1M tokens
Context window
256K
tokens
Example request
curl https://solorouter.ai/api/v1/chat/completions \ -H "Authorization: Bearer $SOLO_KEY" -H "Content-Type: application/json" \ -d '{"model": "google/gemma-4-31b-it", "messages": [{"role": "user", "content": "Hello"}], "stream": true}'
Frequently asked questions
How much does the Gemma 4 31B API cost?
$0.234 per million input tokens and $0.65 per million output tokens, and $0.047 per million cached input tokens. You pay from prepaid credit with no monthly fee.
How do I get Gemma 4 31B API access?
Sign in to Solo Router with Google, create an API key and set "model": "google/gemma-4-31b-it" in a chat-completions request to https://solorouter.ai/api/v1.
What is the context window of Gemma 4 31B?
256,000 tokens.
Get your API key in 30 seconds
Sign in with Google. New accounts get free credit (one per person) to try the models.
Get started free