LiteLLMModels

Gemma 4 31B IT API Pricing

As of October 10, 2026, Gemma 4 31B IT is free to use on Google AI Studio. Across 11 providers on LiteLLM, the input price ranges from $0 to $0.40. It has a 262,144-token context window and returns up to 32,768 tokens per response.

By GoogleModel ID gemini/gemma-4-31b-itPrices updated Checked
Price
Free
Context window
262,144 tokens
Max output
32,768 tokens
Providers
11
Added to LiteLLM
June 2026

Gemma 4 31B IT pricing by provider

12 listings across 11 providers. Token prices are in US dollars per 1M tokens. The highlighted row is the price quoted above.

ProviderModel name in LiteLLMInputOutputCache readContext
Google AI Studiogemini/gemma-4-31b-it$0$0–256K
AIHubMixaihubmix/gemma-4-31b-it$0.14$0.40–256K
DeepInfradeepinfra/google/gemma-4-31B-it$0.13$0.38–256K
FriendliAIfriendliai/google/gemma-4-31B-it$0.14$0.40–256K
LibertAIlibertai/gemma-4-31b-it$0.15$0.40–256K
Novita AInovita/google/gemma-4-31b-it$0.14$0.40–256K
Sailsail/google/gemma-4-31B-it$0.40$0.60$0.20256K
SambaNovasambanova/gemma-4-31B-it$0.38$1.15–128K
Tensormeshtensormesh/google/gemma-4-31B-it$0.14$0.56$032K
Together AItogether_ai/google/gemma-4-31B-it$0.39$0.97–256K
Weights & Biaseswandb/google/gemma-4-31B-it$0.10$0.34–262K
Sailnvfp4sail/nvidia/Gemma-4-31B-IT-NVFP4$0.14$0.40$0.07256K

What Gemma 4 31B IT costs in practice

1,000 requests with 2,000 input and 500 output tokens each

Google AI Studio$0
Weights & Biases$0.37
DeepInfra$0.45
AIHubMix$0.48

100 long-document requests with 100,000 input and 2,000 output tokens each

Google AI Studio$0
Weights & Biases$1.068
DeepInfra$1.376
AIHubMix$1.48

Gemma 4 31B IT features

Use Gemma 4 31B IT with LiteLLM

Call Gemma 4 31B IT through the LiteLLM Python SDK, or put it behind the LiteLLM proxy and send OpenAI-format requests to /v1/chat/completions. LiteLLM tracks the cost of every request at these prices.

Python SDK
from litellm import completion

response = completion(
    model="gemini/gemma-4-31b-it",
    messages=[{"role": "user", "content": "Hello!"}],
)
Proxy config.yaml
model_list:
  - model_name: gemma-4-31b-it
    litellm_params:
      model: gemini/gemma-4-31b-it
      api_key: os.environ/GEMINI_API_KEY
Call the proxy
curl http://0.0.0.0:4000/v1/chat/completions \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer sk-1234" \
  -d '{
    "model": "gemma-4-31b-it",
    "messages": [{"role": "user", "content": "Hello!"}]
  }'

Gemma 4 31B IT FAQ

How much does Gemma 4 31B IT cost?

Gemma 4 31B IT is free to use on Google AI Studio. Across 11 providers on LiteLLM, the input price ranges from $0 to $0.40.

What is the context window of Gemma 4 31B IT?

Gemma 4 31B IT has a 262,144-token context window and returns up to 32,768 tokens per response.

Which providers offer Gemma 4 31B IT?

Gemma 4 31B IT is available from 11 providers through LiteLLM: Google AI Studio, AIHubMix, DeepInfra, FriendliAI, LibertAI, Novita AI, Sail, SambaNova, Tensormesh, Together AI and Weights & Biases. The lowest price is on Google AI Studio.

How do I call Gemma 4 31B IT with an OpenAI-compatible API?

Use the LiteLLM Python SDK with model="gemini/gemma-4-31b-it", or add the model to the LiteLLM proxy's config.yaml and send requests to /v1/chat/completions from any OpenAI client. LiteLLM tracks the cost of every request at the prices on this page.

What features does Gemma 4 31B IT support?

Gemma 4 31B IT supports function calling, parallel tool calls, structured output, image input, reasoning and prompt caching.

When did LiteLLM add Gemma 4 31B IT?

Gemma 4 31B IT was added to LiteLLM's model price file in June 2026.

Sources

Prices come from LiteLLM's open-source model_prices_and_context_window.json, which LiteLLM uses to calculate the cost of every request. Provider pricing pages:

LiteLLM docs: Google AI Studio, AIHubMix, DeepInfra, FriendliAI, LibertAI, Sail.

Provider pages: Google AI Studio, AIHubMix, DeepInfra, FriendliAI, LibertAI, Novita AI, Sail, SambaNova, Tensormesh, Together AI, Weights & Biases.