Gemma 4 31B
Google's open Gemma 4 31B model with image input and a 262K-token context window.
Visionsingle providerus-eu-hosted
google/gemma-4-31b-it
Also callable as gemma-4-31b-it
Call it
Base URL https://api.thetoken.dev/v1, your API key in TOKEN_API_KEY.
from openai import OpenAIimport os
client = OpenAI(base_url="https://api.thetoken.dev/v1", api_key=os.environ["TOKEN_API_KEY"])stream = client.chat.completions.create( model="google/gemma-4-31b-it", messages=[{"role": "user", "content": "Explain failover in one sentence."}], stream=True,)for chunk in stream: if chunk.choices and chunk.choices[0].delta.content: print(chunk.choices[0].delta.content, end="")import OpenAI from "openai";
const client = new OpenAI({ baseURL: "https://api.thetoken.dev/v1", apiKey: process.env.TOKEN_API_KEY });const stream = await client.chat.completions.create({ model: "google/gemma-4-31b-it", messages: [{ role: "user", content: "Explain failover in one sentence." }], stream: true,});for await (const chunk of stream) process.stdout.write(chunk.choices[0]?.delta?.content ?? "");curl https://api.thetoken.dev/v1/chat/completions \ -H "Authorization: Bearer $TOKEN_API_KEY" \ -H "Content-Type: application/json" \ -d '{"model": "google/gemma-4-31b-it", "messages": [{"role": "user", "content": "Explain failover in one sentence."}]}'import anthropicimport os
client = anthropic.Anthropic(base_url="https://api.thetoken.dev", api_key=os.environ["TOKEN_API_KEY"])message = client.messages.create( model="google/gemma-4-31b-it", max_tokens=1024, messages=[{"role": "user", "content": "Explain failover in one sentence."}],)print(message.content)from langchain_openai import ChatOpenAIimport os
llm = ChatOpenAI(model="google/gemma-4-31b-it", base_url="https://api.thetoken.dev/v1", api_key=os.environ["TOKEN_API_KEY"])print(llm.invoke("Explain failover in one sentence.").content)Providers
Requests go to the first provider and move down the list if it fails. TOKEN's price applies whichever provider serves the request.
| # | Provider | Precision (as the provider states it) | Data location | us-eu-hosted |
|---|---|---|---|---|
| 1 | Novita AI | BF16 · checked October 19, 2026 | US | Yes |
Performance
Measured on TOKEN's streamed requests; shown from 10 requests in a window.
| Window | TTFT p50 | TTFT p90 | Output speed p50 | Output speed p90 |
|---|---|---|---|---|
| Last 24 hours | … | … | … | … |
| Last 7 days | … | … | … | … |
TTFT is the time from TOKEN receiving the request to the first token. Output speed is tokens per second after the first token. p50 is the median; p90 is the time 9 in 10 requests beat.
Availability
Request success: the share of real requests answered, after any failover; errors count against it. Last 30 days, one bar per day:
- 24 hours: …
- 7 days: …
- 30 days: …
Endpoint availability: a request to this model every 5 minutes from outside our infrastructure (Better Stack), on the status page. Method: Reliability.
Capabilities
| Input | text, image, video |
|---|---|
| Output | text |
| Reasoning | Yes |
| Tool calling | Yes |
| Structured output (JSON schema) | Yes |
| Maximum output | Not stated by the maker |
| Context window | 262,144 tokens |
As stated by Google, checked October 24, 2026: blog.google, ai.google.dev, huggingface.co.
Questions
Who makes Gemma 4 31B?
Gemma 4 31B is made by Google and was released on April 2, 2026. TOKEN serves the maker's released weights through upstream providers; it does not train or modify the model.
What is the context window of Gemma 4 31B?
262,144 tokens (256K).
At what precision does TOKEN serve Gemma 4 31B?
The first provider in the routing order serves BF16, the maker's 16-bit release. TOKEN never routes to a quantized copy; a provider that does not state its precision is used only as a labelled backup.
Which providers serve Gemma 4 31B on TOKEN?
Novita AI, in that routing order. It has a single provider today, so there is no failover until a second one qualifies.
How much does Gemma 4 31B cost?
$0.16 per 1M input tokens and $0.44 per 1M output tokens, the same whichever provider answers. You pay from prepaid credit in USD; each top-up carries a 5.5% credit purchase fee, shown at checkout.
Does Gemma 4 31B support tool calling, images or reasoning?
Tool calling: Yes. Image input: Yes. Reasoning: Yes. Structured (JSON schema) output: Yes.
Where are my requests processed?
At the provider that answers: US. Keys in the us-eu-hosted group only use US and EU hosts.
Does TOKEN store my prompts or responses?
No. TOKEN keeps token counts and request metadata for billing and logs, not the content of prompts or responses. See the privacy policy.
What happens if a provider of Gemma 4 31B fails?
The request is retried, up to three times. With a single provider there is no other provider to move to yet.
Will Gemma 4 31B be retired without notice?
No. TOKEN gives at least 30 days of notice before a model is retired.