Gemma 3 4B
Google's Gemma 3 4B is a image-generation model. Gemma 3 introduces multimodality, supporting vision-language input and text outputs. It handles context windows up to 128k tokens, understands over 140 languages, and offers improved math, reasoning, and chat capabilities,...
by Google · 131K token context window
Best for
- image generation from text
- creative design and ideation
Ways to use Gemma 3 4B in osFoundry
Connect with your own key (BYOK)
Open the key dialog and paste your Google API key. osFoundry discovers Gemma 3 4B automatically — assign it to a Maestro role (router, direct, orchestrator, or fallback) in the Pipeline tab and it is live in every chat. Your key, your provider account — no token markup.
Use it in a Room App
Room Apps declare AI features in their manifest, then call them with invokeAI:
import { invokeAI } from '@osfoundry/app-sdk'
// 'summarize' is an AI feature declared in your app manifest.
const result = await invokeAI('summarize', userText)
Call it from your own apps
Once a model is wired into your workspace you can host it as an API and reach it from your own services, scripts, or CI — outside osFoundry.
Run Gemma 3 4B yourself
Gemma 3 4B is also available as open weights — self-host it for full data control and no per-token cost. See that page for GPU requirements and a cost comparison against API pricing.
Gemma 3 4B vs similar models
| Model | Org | Params | Context | Input price | Self-host |
|---|
| Gemma 3 4B | Google | — | 131K | $ 0.040 /1M | API only |
| Mistral Small 3.1 24B | Mistral | — | 128K | $ 0.350 /1M | API only |
| o1-pro | OpenAI | — | 200K | $ 150.00 /1M | API only |
| Llama 4 Scout | Meta | — | 328K | $ 0.080 /1M | API only |
Licence
Hosted — usage subject to provider terms — Hosted-only model — usage governed by the provider's API terms. Bring your own provider key.
No weights distributed; usage subject to provider terms.
Frequently asked about Gemma 3 4B
How much does Gemma 3 4B cost?
Gemma 3 4B is metered at $ 0.040 /1M for input, and $ 0.080 /1M for output. Bring your own Google API key — osFoundry passes through provider pricing without markup.
Can I use Gemma 3 4B commercially?
Commercial use is allowed with conditions. Hosted-only model — usage governed by the provider's API terms. Bring your own provider key. No weights distributed; usage subject to provider terms.
What is the context window of Gemma 3 4B?
Gemma 3 4B supports a 131K token context window.
Can I run Gemma 3 4B locally?
No — Gemma 3 4B is hosted only and accessed via the Google API. An open-weights equivalent is available to self-host — see the cross-link above.
What is Gemma 3 4B best at?
Gemma 3 4B is well-suited to image generation from text, creative design and ideation.
How do I use Gemma 3 4B in osFoundry?
Paste your Google API key in the key dialog (or deploy the open weights for self-hostable models), assign Gemma 3 4B to a Maestro role in the Pipeline tab, then use it in chat, Room Apps via invokeAI, or your own apps.
Published by Google on March 13, 2025. Source: https://openrouter.ai/google/gemma-3-4b-it