Skip to content

Gemma 4 31B on OpenRouter

OpenRouter Free API tier

The catch: Only 50 requests a day until you buy 10 credits, and many free endpoints keep or train on prompts: OpenRouter marks the NVIDIA, Poolside, Liquid, Thinking Machines and Inception free endpoints 'Trains', and Google AI Studio (55 days) and Cohere (30 days) as retaining prompts.

AccessFree API tier
Free limitsFree variant: 20 requests per minute and 50 requests per day, or 1,000 per day once you have bought at least 10 credits. Google AI Studio serves it; OpenRouter marks it 'Privacy: Logs' (prompts retained 55 days, not used for training).
Modalitytext, image, video
Credit cardNot required
Commercial use–
Trains on your dataNo
Licence or termsOpenRouter Terms of Service (last updated 31 Aug 2026) + each provider's Model Terms
Context window262,144 tokens
Model idgoogle/gemma-4-31b-it:free
Base URLhttps://openrouter.ai/api/v1
Last checked8 Oct 2026

How to use Gemma 4 31B

It speaks the OpenAI API at https://openrouter.ai/api/v1, so the OpenAI SDK you already use works once you change the base URL and key.

Quickstart
curl https://openrouter.ai/api/v1/chat/completions -H "Content-Type: application/json" -H "Authorization: Bearer $OPENROUTER_API_KEY" -d '{"model":"google/gemma-4-31b-it:free","messages":[{"role":"user","content":"Hello"}]}'
Paste into Claude Code
I want to use the free AI model "Gemma 4 31B" from OpenRouter (model id: google/gemma-4-31b-it:free) in my project.
Please:
1. Check the provider docs and give me the exact steps to get a free API key.
2. Give me a minimal working example that reads the key from an environment variable.
3. Tell me the real free limits and any catch (commercial use, card, data use). Listed limits: 20 RPM · 50 RPD (1,000 after buying 10 credits).
4. If the same provider has a more generous free option, mention it.

Before you ship on it

  • Only 50 requests a day until you buy 10 credits, and many free endpoints keep or train on prompts: OpenRouter marks the NVIDIA, Poolside, Liquid, Thinking Machines and Inception free endpoints 'Trains', and Google AI Studio (55 days) and Cohere (30 days) as retaining prompts.
  • OpenRouter Terms (last updated 31 Aug 2026) allow incorporating the Service into your own products and services, but you must follow each model's Model Terms; the FAQ says free models 'are usually not suitable for…
  • Free tiers are shared capacity: treat the limits as a ceiling, not a promise, and keep a paid fallback.

Questions

Is Gemma 4 31B on OpenRouter free?

Yes. OpenRouter offers it as free api tier, with these limits: 20 RPM · 50 RPD (1,000 after buying 10 credits). No credit card is needed.

Can I use Gemma 4 31B on OpenRouter commercially?

The provider’s terms do not say. Ask them before you build a product on it.

How do I start with Gemma 4 31B on OpenRouter?

It speaks the OpenAI API at https://openrouter.ai/api/v1, so the OpenAI SDK you already use works once you change the base URL and key.

Source: openrouter.ai/google/gemma-4-31b-it:free, checked 8 Oct 2026.