Models / Google

Gemma 4 31B API pricing

$3.00 in, $4.00 out per million tokens.

gemma-4-31b-itmanaged routeOpenAI SDK

Price · per million tokens, USD

Get a key
TokensGoogle list priceUplinkSwitchSaving
Input—$3.00—
Cached input—$1.00—
Output—$4.00—
No list price on record.
Real-model check: Steady since Oct 20

Gemma 4 31B: what it is · from Google’s own model card, read 2026-10-20

The dense, largest Gemma 4, with text and image input and support for more than 140 languages. Google lists text generation, coding and reasoning among its uses. It is served as gemma-4-31b-it at $3.00 input and $4.00 output per million tokens, on the same key as every other model in the catalog.

Gemma 4 31B
DeveloperGoogle
Parameters31B, dense
Contextup to 256K tokens
LicenseApache-2.0
Published2026-03-11
Downloads, 30 days to 2026-10-208,894,902
Sourcegoogle/gemma-4-31B-it

From google/gemma-4-31B-it, read 2026-10-20.

curl
curl https://api.uplinkswitch.com/v1/chat/completions \
  -H "authorization: Bearer sk-uplink-live-..." \
  -H "content-type: application/json" \
  -d '{"model":"gemma-4-31b-it","max_tokens":1024,"messages":[{"role":"user","content":"Hello"}]}'

Gemma 4 31B next to Google’s other models · per million tokens, live

ModelHere, in / out1,000 chat turns
Gemini 2.5 Flash Lite$0.075 / $0.30$0.30
Gemini 2.5 Flash$0.09 / $0.75$0.56
Gemini 3.1 Flash Lite$0.15 / $0.90$0.75
Gemini 3.1 Flash Lite Preview$0.1875 / $1.125$0.94
Gemma 4 12B$0.40 / $1.20$1.40
Gemini 3 Flash Preview$0.375 / $2.25$1.88
Gemma 4 26B-A4B$0.56 / $1.60$1.92
Gemini 3.6 Flash$0.4925 / $2.25$2.11
Gemini 3.7 Flash$0.4925 / $2.25$2.11
Gemini 3.8 Flash$0.4925 / $2.25$2.11
Gemini 4 Argon$0.60 / $3.00$2.70
Gemini 2.5 Pro$0.9375 / $7.50$5.63
Gemini 3.1 Pro Preview$1.20 / $7.20$6.00
Gemma 31B Heretic Uncensored$1.50 / $8.25$7.13
DiffusionGemma 26B A4B$3.00 / $3.00$7.50
Gemini 3.5 Flash$1.50 / $9.00$7.50
Gemma 4 31B$3.00 / $4.00$8.00

A chat turn is 2,000 input and 500 output tokens. Live from the catalog, ordered by the cost of 1,000 turns.

Worked for Gemma 4 31B: 1,000 turns are 2,000,000 input tokens and 500,000 output tokens. At $3.00 input and $4.00 output per million tokens, that is $6.00 + $2.00 = $8.00, paid from prepaid credit with no subscription.

Gemma 4 31B API key · base URL and setup

  1. Create a key in the console at uplinkswitch.ai/console. Credit is prepaid from $10 with no subscription, and the key works at once.
  2. Point your SDK or tool at https://api.uplinkswitch.com/v1, for example with OPENAI_BASE_URL, and send the key as the bearer token.
  3. Send gemma-4-31b-it as the model. The same key calls every other model in the catalog.
Python · OpenAI SDK
from openai import OpenAI

client = OpenAI(
    base_url="https://api.uplinkswitch.com/v1",
    api_key="sk-uplink-live-...",
)

completion = client.chat.completions.create(
    model="gemma-4-31b-it",
    messages=[{"role": "user", "content": "Summarize this in one line."}],
)
print(completion.choices[0].message.content)
TypeScript · OpenAI SDK
import OpenAI from 'openai';

const client = new OpenAI({
  baseURL: 'https://api.uplinkswitch.com/v1',
  apiKey: 'sk-uplink-live-...',
});

const completion = await client.chat.completions.create({
  model: 'gemma-4-31b-it',
  messages: [{ role: 'user', content: 'Summarize this in one line.' }],
});
console.log(completion.choices[0].message.content);
curl
curl https://api.uplinkswitch.com/v1/chat/completions \
  -H "authorization: Bearer sk-uplink-live-..." \
  -H "content-type: application/json" \
  -d '{"model":"gemma-4-31b-it","messages":[{"role":"user","content":"Hello"}]}'

What would it cost? · paste a prompt, priced before you send it

Input is counted at about 4 characters per token.

Cheapest first. A real request is billed on the provider's own token count. Same estimate as JSON: POST https://api.uplinkswitch.com/v1/estimate, no key needed.

Gemma 4 31B questions

Gemma 4 31B is a model from Google. Through UplinkSwitch it answers the OpenAI SDK on one key as gemma-4-31b-it.

$3.00 per million input tokens and $4.00 per million output tokens, with cached input at $1.00.

It is pay as you go: prepaid credit from $10, with no subscription or monthly fee, billed per token. A 1,000-token prompt with a 500-token reply costs about $0.005.

gemma-4-31b-it. Send it as the model through the OpenAI SDK with base URL https://api.uplinkswitch.com/v1.

Create one in the console at uplinkswitch.ai/console: prepaid credit from $10, no subscription, and the key is live at once. The same key calls Gemma 4 31B and every other model in the catalog; send it as the bearer token with base URL https://api.uplinkswitch.com/v1.

Every day each model gets the same test prompt, and the results are public on /proof. Gemma 4 31B's latest result: Steady since Oct 20.

Yes: gemma-4-31b-it on the OpenAI format at https://api.uplinkswitch.com/v1, $3.00 input and $4.00 output per million tokens. No weights to download and no GPU of your own; the key also runs every other model in the catalog.

31B, dense, per google/gemma-4-31B-it.

Up to 256K tokens, per google/gemma-4-31B-it.

Its weights are open on Hugging Face (google/gemma-4-31B-it); the license is Apache-2.0.

$0.80 for 100 chat turns of 2,000 input and 500 output tokens each, at $3.00 input and $4.00 output per million tokens, from prepaid credit with no subscription.

Gemma 4 31B is the dense model; Gemma 4 26B-A4B activates about 4B parameters a token. Gemma 4 31B is $3.00 / $4.00 per million tokens in / out, $8.00 for 1,000 chat turns; Gemma 4 26B-A4B is $0.56 / $1.60 per million tokens in / out, $1.92 for 1,000 chat turns. Both run on the same key, so send the same prompt to each.

This is Google’s stock model; the Heretic build has the refusal direction removed. Gemma 4 31B is $3.00 / $4.00 per million tokens in / out, $8.00 for 1,000 chat turns; Gemma 31B Heretic Uncensored is $1.50 / $8.25 per million tokens in / out, $7.13 for 1,000 chat turns. Both run on the same key, so send the same prompt to each.