Gemma API

Google's open Gemma 4 31B with a 256K context, available through one API key.

Gemma (Google) models and pricing

ModelContextInput / 1MOutput / 1MCached / 1M
Gemma 4 31B
google/gemma-4-31b-it
256K $0.23$0.65$0.047

USD per million tokens. Billed from prepaid credit; every response reports its exact cost.

Quick start

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

Works with LangChain, Cline, Continue, Open WebUI and any tool that lets you set a base URL: use https://solorouter.ai/api/v1. See the docs.

Frequently asked questions

How do I call Gemma 4?

Create a Solo Router key and use the model google/gemma-4-31b-it.

Get your API key in 30 seconds

Sign in with Google. New accounts get free credit to try any model.

Get started free

Also on Solo Router: DeepSeek API · Kimi API · Qwen API · GLM API · MiniMax API · Llama API · all models