Requesty
Google logo

gemma-4-31b-it

Google/Open weights/2 providers

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 calling, and multilingual support across 140+ languages. Strong on coding, reasoning, and document understanding tasks. Apache 2.0 license.More

Which id to call

gemma-4-31b-it

Requesty routes this id across every provider serving gemma-4-31b-it, picking on price and health and failing over automatically. The id stays valid when a provider changes underneath it.

From /1M input

free

Google LLC (Gemini API)

Context

262K

8K output

Endpoints

3

1 region

Price spread

1.3x

3 endpoints

Capabilities 4/8

VisionReasoningTool callingCachingWeb searchJSON schemaComputer useImage generation

3 endpoints / 1 region

Providers serving gemma-4-31b-it

Provider prices, per 1M tokens. Pay as you go adds 5%, or 0% on your own keys.

Providers serving gemma-4-31b-it, with pricing and measured performance. The best value in each column is highlighted.
RankPrivacy
1Google LLC (Gemini API)Global262Kfreefreefreeno-train
2DeepInfra Inc.Global262K$0.10$0.30-zdr
3DeepInfra Inc.Global262K$0.13$0.38-zdr

A column is blank where no qualifying sample exists, and every row links to that provider's endpoint page.

model=

Which id to call

One base url, https://router.requesty.ai/v1, and one key for every id here.

gemma-4-31b-it

Requesty routes this id across every provider serving gemma-4-31b-it, picking on price and health and failing over automatically. The id stays valid when a provider changes underneath it.

OpenAI compatible

Call it in three lines

Change the base url, use your Requesty key, set the model to any id on the left. Existing OpenAI SDK code needs no other edit.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
from openai import OpenAI client = OpenAI( api_key="YOUR_REQUESTY_API_KEY", base_url="https://router.requesty.ai/v1", ) response = client.chat.completions.create( model="gemma-4-31b-it", messages=[ {"role": "user", "content": "Explain quantum computing in one paragraph."}, ], ) print(response.choices[0].message.content)

6

More from Google

Reference

gemma-4-31b-it questions

Which providers serve gemma-4-31b-it?

gemma-4-31b-it is available from 2 providers through Requesty: Google LLC (Gemini API), DeepInfra Inc.. All endpoints share one OpenAI-compatible API and one key, and Requesty fails over between them automatically.

How much does gemma-4-31b-it cost?

Pricing starts at free per million input tokens and free per million output tokens on Google LLC (Gemini API), the cheapest endpoint. Prices vary by provider and region; the table above shows every endpoint. Those are the upstream provider rates: pay as you go adds 5% on top, or 0% if you bring your own provider keys.

Is gemma-4-31b-it open weights?

Yes. gemma-4-31b-it is an open-weights model from Google, which is why multiple inference providers can host it. Provider choice affects price, latency, and data-privacy terms, all compared above.

What is the context window of gemma-4-31b-it?

gemma-4-31b-it supports up to 262K tokens of context, with up to 8K output tokens per response. Some providers expose a smaller window; check the per-endpoint context column above.

How do I use gemma-4-31b-it with the OpenAI SDK?

Install the OpenAI SDK, set base_url to "https://router.requesty.ai/v1", set your API key to your Requesty key, and set the model to "gemma-4-31b-it" or any endpoint id from the table above. The quickstart section shows Python, JavaScript and cURL snippets.

Should I call gemma-4-31b-it by its managed id or a provider id?

Use the managed id, "gemma-4-31b-it". Requesty picks which of the 2 providers serves each request based on price and health, and fails over when one degrades, so the id keeps working while the routing changes underneath it. Send a provider id like "google/gemma-4-31b-it" only when you need one specific deployment and want no failover.

Route gemma-4-31b-it through one endpoint

One key for 2 providers on this model and 600+ others. No markup on provider prices, automatic failover, caching built in.

Benchmark rankings