Gemma 4 31B Instruct is Google DeepMind's 30.7B dense multimodal model supporting text and image input with text output. Features a 256K token context window, configurable thinking/reasoning mode, native function...
Google Gemma 4 31B is an instruction-tuned variant of the Gemma 4 family, developed by Google. It has approximately 31 billion parameters and is optimized for chat and instruction-following tasks.…
Gemma 4 31B is designed for instruction following, text generation, and reasoning. It can understand complex prompts, multi-turn conversations, and tasks that require step-by-step logic. The model is instruction-tuned, meaning it has been fine-tuned to follow user directions and produce helpful, coherent responses. It supports both single-turn and multi-turn interactions. Based on its 31B parameter count, it balances capability with inference speed, making it suitable for real-time applications where latency matters.
Through the GPQA Diamond benchmark, we know the model performs well on expert-level reasoning tasks in science. It is also likely strong at code generation, summarization, and creative writing, though specific benchmarks for those tasks are not provided in the given facts. The model is most effective when given clear, structured instructions. For tasks that require very long context or retrieval-augmented generation, users should test the model's context window limits, as the exact context length is not specified in the provided data.
If your tasks are simple—such as basic classification, short text generation, or single-sentence responses—you might prefer a smaller, less expensive model like Gemma 4 2B or 9B. The 31B variant incurs higher token costs, although still modest. For high-throughput applications where latency is critical, a smaller model may also be faster. Additionally, if your use case does not require the rigorous reasoning measured by GPQA Diamond, a cheaper general-purpose model could provide adequate performance at lower cost.
No specific limitations are listed in the provided facts. However, as with many open-weight instruction-tuned models, Gemma 4 31B may produce incorrect or biased outputs, especially on ambiguous or controversial topics. It may also struggle with tasks requiring real-time information or very recent events due to its training cutoff. The model's context window size is not disclosed; if it is limited (e.g., 8K-32K), it may not suitable for very long documents. Users should always verify outputs in high-stakes applications.
GPQA Diamond is a dataset of graduate-level multiple-choice questions covering biology, physics, and chemistry. A score of 85.7% means Gemma 4 31B answered over 85% of these questions correctly. This is a strong result, indicating the model has robust domain knowledge and reasoning abilities. It is important to note that the benchmark is multiple-choice, so it does not evaluate generative capabilities directly, but it correlates with the model's ability to recall and reason about expert-level content.
No additional benchmark scores are provided in the given facts. The only quantitative benchmark shared is the GPQA Diamond score of 85.7. For a more complete understanding of the model's capabilities, users should consult Google's official technical report or model card. OrcaRouter does not independently verify or add benchmarks. The model may perform differently on other evaluations such as MMLU, HumanEval, or GSM8K, but those figures are not included here.
Specific inference speed or latency figures are not provided in the given facts. As a 31B parameter model, it is larger than the 9B and 2B variants of Gemma 4, so it will typically be slower per token and require more GPU memory. Actual latency depends on hardware (e.g., GPU type, batch size) and provider infrastructure. When accessed via OrcaRouter, you are subject to Google's serving infrastructure. For latency-critical applications, we recommend testing the model's response time under your expected workload.
The GPQA Diamond score of 85.7% shows strong performance, but it is not perfect—the model still misses 14.3% of questions, meaning it may not be reliable for all expert-level queries. The benchmark does not measure long-context reasoning, multilingual performance, or safety. Therefore, while the score is impressive, it should not be interpreted as a guarantee of perfect reasoning across all tasks. Users should consider the model's performance in the specific domain they intend to apply it to.
Pricing is $0.13 per 1 million input tokens and $0.38 per 1 million output tokens. These are the provider rates billed with zero markup by OrcaRouter. Tokens are counted according to Google's tokenizer; input tokens include the entire prompt and any system messages, while output tokens are the generated text. There are no additional per-request fees or monthly commitments. This straightforward per-token pricing makes cost estimation easy based on your usage volume.
The provided facts do not mention any caching discounts or volume pricing. OrcaRouter may offer caching of repeated input tokens to reduce costs, but that is not specified here. You should check OrcaRouter's documentation or contact their support for details on any cost optimization features. The base price of $0.13/$0.38 per million tokens applies by default. For very high usage, you may inquire about potential enterprise agreements, but no such terms are included in this data.
If you use Gemma 4 2B or 9B, your cost per token will be lower, often in the range of $0.02–$0.10 per million tokens. The 31B model is more expensive but offers higher reasoning capability as indicated by the GPQA Diamond score. For tasks that do not require expert-level reasoning, the extra cost may not be justified. Conversely, for applications where accuracy is critical, investing in the 31B model might reduce the need for manual verification, potentially lowering overall costs.
OrcaRouter passes through the exact provider rate without any markup. For Google's Gemma 4 31B, that means you pay $0.13 per million input tokens and $0.38 per million output tokens directly. There is no additional service fee or platform margin. OrcaRouter makes money through other means (e.g., enterprise subscriptions or usage overage), but for this model, the pricing you see is what Google charges. This transparency allows you to compare costs directly with other providers.
You use an OpenAI-compatible client library with the base URL https://api.orcarouter.ai/v1 and the model ID "google/gemma-4-31b-it". For example, using the OpenAI Python SDK, set `openai.api_base = "https://api.orcarouter.ai/v1"` and `openai.api_key = "your-orcarouter-api-key"`. Then call `openai.ChatCompletion.create(model="google/gemma-4-31b-it", messages=[{"role":"user","content":"Hello"}])`. The API supports the same parameters as OpenAI's chat endpoint, such as temperature, max_tokens, and top_p.
OrcaRouter's API supports standard OpenAI-compatible parameters: `model`, `messages`, `temperature` (0–2, default 1), `max_tokens` (integer, up to model's limit), `top_p` (0–1, default 1), `frequency_penalty`, `presence_penalty`, `stop` sequences, and `stream` (boolean). The parameter `n` (number of completions) may also be supported but usage limits apply. Note that specific Gemma 4 parameters like `repetition_penalty` might be supported via extra body keys; refer to OrcaRouter documentation for custom provider parameters.
Yes, migration is straightforward if you already use an OpenAI-compatible API. You simply change the `model` parameter to "google/gemma-4-31b-it" and point to OrcaRouter's base URL. Note that tokenization and output formatting may differ slightly from other models. You should test the model's responses on a sample of your prompts to ensure quality. Also be aware that the pricing structure differs from OpenAI's models, and you may need to adjust your cost expectations accordingly.
OrcaRouter requires an API key sent in the `Authorization` header as `Bearer <your-api-key>`. You can obtain a key by signing up at OrcaRouter's website. The key is used to authenticate your requests and route them to the appropriate provider. Make sure to keep your key secure. The API does not support other authentication methods. For streaming requests, the same key is used. There are no additional IP restrictions unless specified in your OrcaRouter account.
Gemma 4 9B is a smaller, cheaper model—typically priced around $0.02–$0.10 per million tokens—and likely has lower benchmark scores. The 31B variant, with 3.4x more parameters, achieves 85.7% on GPQA Diamond; the 9B's score is not provided but is presumably lower. The 31B model offers better reasoning but at a higher cost and likely higher latency. For simple tasks, 9B may suffice; for expert-level questions, 31B is the better choice. Both are accessed via the same OrcaRouter API.
Direct comparison benchmarks are not provided. However, Llama 3.1 70B is a larger model (70B parameters) and often has higher performance on general benchmarks, but also higher cost per token. Gemma 4 31B is more efficient and may be competitive on domain-specific reasoning like GPQA. The 31B size makes it attractive for deployment on consumer-grade GPUs. Users should evaluate on their own tasks. OrcaRouter may offer both models for direct comparison.
Gemma 4 31B is an open-weight model under Google's Gemma license, allowing free use for most applications. However, when accessed through OrcaRouter, you are subject to OrcaRouter's terms of service and pay per token. You could also run the model yourself on your own hardware if you have the resources. OrcaRouter provides a hosted alternative that avoids infrastructure overhead. The choice between self-hosting and using OrcaRouter depends on your budget, latency requirements, and operational preferences.
OrcaRouter provides a unified API endpoint for multiple providers, including Google. If you use Google's own Vertex AI or AI Platform, you may get different pricing, possibly lower for high volume. OrcaRouter's zero markup is competitive for moderate usage. The main advantage of OrcaRouter is the single OpenAI-compatible API for many models, simplifying integration. For users already on Google Cloud, direct access might offer better integration with other services. OrcaRouter does not store your data beyond standard API logging; check their privacy policy for details.
OpenAI-compatible — keep the SDK you already use
https://api.orcarouter.ai/v1from openai import OpenAI
client = OpenAI(
base_url="https://api.orcarouter.ai/v1",
api_key="$ORCAROUTER_API_KEY",
)
response = client.chat.completions.create(
model="google/gemma-4-31b-it",
messages=[{"role": "user", "content": "Hello"}],
)
print(response.choices[0].message.content)| Input / 1M tokens | $0.130 |
| Output / 1M tokens | $0.380 |
| Cache read / 1M | $0.020 |
| Currency | USD |
Estimate based on list price
Estimate only — actual token counts depend on the provider's tokenizer.
GET /api/public/models/google/gemma-4-31b-itOpen @misc{orcarouter_gemma_4_31b_it,
title = {Gemma 4 31B API},
author = {Google},
year = {2026},
howpublished = {OrcaRouter},
url = {https://www.orcarouter.ai/models/google/gemma-4-31b-it}
}Google. (2026). Gemma 4 31B API. OrcaRouter. https://www.orcarouter.ai/models/google/gemma-4-31b-it