Gemma 4 31B (SambaNova) API
SambaNova · serves gemma-4-31b
Pricing
| Input / 1M | $0.38 |
|---|---|
| Output / 1M | $1.15 |
| Blended / 1M | $1.53 |
| Context window | 262,144 tokens |
| Max output | 235,929 tokens |
| License | Open weights · Gemma Terms of Use conditional |
| Knowledge cutoff | January 2025 · source |
| Intelligence index | 29.7 Artificial Analysis Intelligence Index · source |
textvisionfunction-calling
Price verified 2026-09-05 (0 days ago) · sourcecorroborated
Sources
| Source | Input / 1M | Output / 1M | Verified |
|---|---|---|---|
| OpenRouter | $0.38 | $1.15 | 2026-09-05 |
| LiteLLM | $0.38 | $1.15 | 2026-09-03 |
| models.dev | $0.39 | $0.97 | 2026-09-04 |
Two independent sources agree within 20%.
Cheaper providers for gemma-4-31b
| Provider | Blended / 1M | Endpoint |
|---|---|---|
| CoreWeave | $0.44 | view → |
| Venice | $0.48 | view → |
| Chutes | $0.49 | view → |
Compare all 12 providers serving gemma-4-31b →
Call it
Served via OpenRouter, pinned to SambaNova — the provider these prices are resolved from. Set OPENROUTER_API_KEY. Provider page.
curl https://openrouter.ai/api/v1/chat/completions \
-H "Authorization: Bearer $OPENROUTER_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "google/gemma-4-31b-it",
"messages": [{"role": "user", "content": "Hello"}],
"provider": {"only": ["SambaNova"], "allow_fallbacks": false}
}'from openai import OpenAI # pip install openai
client = OpenAI(
base_url="https://openrouter.ai/api/v1",
api_key="...", # OPENROUTER_API_KEY
)
resp = client.chat.completions.create(
model="google/gemma-4-31b-it",
messages=[{"role": "user", "content": "Hello"}],
extra_body={"provider": {"only": ["SambaNova"], "allow_fallbacks": false}},
)
print(resp.choices[0].message.content)Price unchanged since 2026-09-03 — 1 point on record.
Use this data
Raw JSON for this page: gemma-4-31b.json. Free to reuse under CC BY 4.0 with attribution to apipriceindex.com.