Google: Gemma 3 4B IT

gemma-3-4b-it

Gemma 3 4B IT costs $0.261 per million input tokens and $0.261 per million output tokens, supports 128K context, and is available through the OpenAI-compatible API.

Gemma 3 has a large, 128K context window, multilingual support in over 140 languages, and is available in more sizes than previous versions.

Modalities

Text → Text

Input / output price

$0.261 / $0.261 per 1M

Context

128K · max output 8K

Capabilities

Open weights

Pricing

Billed per token actually used and deducted from your credits.

ItemUSD per 1M tokens
Input$0.261
Output$0.261
Cached input$0.130

Calculator

Drag the sliders to estimate what this model will cost.

Per request
$0.00099
Per day
$0.4955
Per month (30 days)
$14.87

Gemma 3 4B IT: input $0.2608/M · output $0.2608/M · cached input $0.1304/M

Request with these settings
curl https://api.geniusrelaygpt.com/v1/chat/completions \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model": "gemma-3-4b-it", "max_tokens": 800,
       "messages": [{"role": "user", "content": "…"}]}'

Code samples

OpenAI-compatible. Set the base URL to https://api.geniusrelaygpt.com/v1 and the model to gemma-3-4b-it.

curl https://api.geniusrelaygpt.com/v1/chat/completions \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "gemma-3-4b-it",
    "stream": true,
    "messages": [{"role": "user", "content": "Hello"}]
  }'

Use it in a client: Cursor · Cline · SillyTavern · Codex

Parameters

Common OpenAI parameters can be passed as-is.

temperaturetop_pmax_tokensstreamstoppresence_penaltyfrequency_penaltyseed

FAQ

How is Gemma 3 4B IT billed?
Input is $0.261 and output is $0.261 per million tokens; cached input is $0.130. The charge for every request is listed in Usage Logs in the console.
How long is the context window?
128K tokens. In a long conversation every turn is billed for the full input, so keep the history under control.
Does it support streaming?
Yes. Add "stream": true to the request to receive server-sent events in the OpenAI format.
Gemma 3 4B IT API pricing · GeniusRelay