We use cookies. Cookies and browser storage keep you signed in and remember your preferences. With your permission we also measure how the site is used. You can any time. See our cookie policy.
Google: Gemma 4 31B
google/gemma-4-31b-itTry Google: Gemma 4 31B now
Runs on your balance at the prices above. New accounts start with free usage.
One API. Every model.
Session cost $0.00
Settings
Advanced parameters
Google: Gemma 4 31B at a glance
- Input price is 56% lower than the median of 434 Text models.
- Context window of 262,144 tokens, enough for long documents and multi-turn conversations.
- Supports tool (function) calling for agents and integrations.
- Supports structured JSON output with a schema.
- Supports reasoning effort control.
- Accepts images as input (vision).
- A typical request (1,000 input / 500 output tokens) costs about $0.00140.
About Google: Gemma 4 31B
Google: Gemma 4 31B is an instruction-tuned model from Google, listed on api14 under the model id google/gemma-4-31b-it. It belongs to the Gemma family from Google DeepMind, and the provider description identifies it as a 30.7B dense multimodal model. Its main category on api14 is text, and it is offered by Google as the provider. If you are choosing between models on the gateway, this one sits in the mid-size dense range rather than the very largest hosted options, which is relevant when you weigh capability against latency and throughput for your workload.
The model accepts image, text and video as input and returns text only. That combination makes it a multimodal reader rather than a generator of media: you can send it documents, screenshots, photos or video alongside a prompt, and it will answer in prose. The context window is 262144 tokens, which is large enough to hold long documents, extended conversations or sizeable media transcripts in a single request. The maximum output is 16384 tokens, so responses are bounded well below the input capacity. It also supports a configurable thinking or reasoning mode, exposed through the reasoning and include_reasoning parameters, which lets you decide whether the model spends tokens working through a problem before answering.
Those capabilities point to a fairly specific set of uses. Long-context multimodal reading is the obvious one: extracting structured information from scanned documents, PDFs rendered as images, or screenshots, and summarising or answering questions about them. Video input extends this to tasks like describing footage, pulling out events or answering questions about what happens in a clip. The reasoning mode suits multi-step analysis where a direct answer is unreliable, and the tool and function support makes the model usable as the decision-making layer in an agent that calls external services. Structured outputs and response_format let you constrain replies to JSON or a schema when the result feeds another system.
Calling it through api14 works the same way as any other model on the gateway, since the API is OpenAI-compatible. You send a chat completion request with the model field set to google/gemma-4-31b-it and your messages in the standard format, including image or video content parts where relevant. The supported parameters cover the usual sampling controls (temperature, top_p, top_k, min_p, seed, stop, frequency_penalty, presence_penalty, repetition_penalty), output controls (max_tokens, response_format, structured_outputs), inspection options (logprobs, top_logprobs, logit_bias) and tool use (tools, tool_choice). Reasoning behaviour is controlled with reasoning and include_reasoning.
One practical constraint to keep in mind is the output ceiling: 16384 tokens per response, which is modest relative to the 262144 token input window. If your task is generating very long documents in one pass, a model with a larger output allowance may fit better. Similarly, if you need audio input or any non-text output, this model does not cover it, since its input modalities are image, text and video and its output is text only. For long-context multimodal understanding, reasoning-heavy analysis and tool-driven agents, it is a reasonable fit.
How to call the Google: Gemma 4 31B API
- Create an API key in your dashboard.
- Install the official openai SDK for your language.
- Set baseURL to https://api14.com/api/v1 and model to "google/gemma-4-31b-it".
import OpenAI from "openai";
const client = new OpenAI({
baseURL: "https://api14.com/api/v1",
apiKey: process.env.API14_API_KEY,
});
const result = await client.chat.completions.create({
"model": "google/gemma-4-31b-it",
"messages": [
{
"role": "user",
"content": "Explain vector databases in two sentences."
}
]
});
console.log(result.choices[0].message.content);
Supported parameters
frequency_penaltyinclude_reasoninglogit_biaslogprobsmax_tokensmin_ppresence_penaltyreasoningrepetition_penaltyresponse_formatseedstopstructured_outputstemperaturetool_choicetoolstop_ktop_logprobstop_pSpecifications
- Context length
- 262,144
- Max output
- 16,384
- Input
- image, text, video
- Output
- text
Requests on api14 · last 7 days
Google: Gemma 4 31B: frequently asked questions
- How much does the Google: Gemma 4 31B API cost?
- Google: Gemma 4 31B costs Input $0.70 / 1M tokens. It is charged from your USD balance only for successful requests; failed requests are free.
- What is the context window of Google: Gemma 4 31B?
- Google: Gemma 4 31B reads up to 262,144 tokens per request: prompt, history and documents together. It writes up to 16,384 output tokens per response.
- What can Google: Gemma 4 31B do?
- Google: Gemma 4 31B accepts image, text, video and returns text. It supports tool calling, structured JSON output, reasoning effort control.
- How do I call Google: Gemma 4 31B from my code?
- Point any OpenAI SDK at https://api14.com/api/v1 and set the model to "google/gemma-4-31b-it". No other code changes. Copy a ready example from the code panel on this page.
- What are alternatives to Google: Gemma 4 31B?
- Comparable Text models at a similar price: Mistral: Codestral 2508 (batch), Anthropic: Claude Haiku 5.5, OpenAI: GPT-6 Luna Pro. Each runs through the same API key, so switching is one string.
Google: Gemma 4 31B community
New topicThis community has no topics yet. Open the first one about Google: Gemma 4 31B.