Gemma 3 4B
Gemma 3 introduces multimodality, supporting vision-language input and text outputs.
- Context Window
- 131K
- In
- $0.056per million tokens
- Out
- $0.111per million tokens
google/ gemma-3-4b-itSpecifications
In$0.056
Out$0.111
- Context Window
- 131K
- Modalities
- text
- Price
- $0.056 in · $0.111 out, per million tokens
- Model ID
- google/gemma-3-4b-it
Quick start
google/gemma-3-4b-it
$0.056 in · $0.111 out, per million tokens
import OpenAI from 'openai'
const client = new OpenAI({
apiKey: process.env.HANZO_API_KEY,
baseURL: 'https://api.hanzo.ai/v1'
})
const response = await client.chat.completions.create({
model: 'google/gemma-3-4b-it',
messages: [{ role: 'user', content: 'Hello!' }]
})
console.log(response.choices[0].message.content)
from openai import OpenAI
client = OpenAI(
api_key=os.environ["HANZO_API_KEY"],
base_url="https://api.hanzo.ai/v1"
)
response = client.chat.completions.create(
model="google/gemma-3-4b-it",
messages=[{"role": "user", "content": "Hello!"}]
)
print(response.choices[0].message.content)
curl https://api.hanzo.ai/v1/chat/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $HANZO_API_KEY" \
-d '{
"model": "google/gemma-3-4b-it",
"messages": [{"role": "user", "content": "Hello!"}]
}'
package main
import (
"context"
"fmt"
"os"
"github.com/sashabaranov/go-openai"
)
func main() {
cfg := openai.DefaultConfig(os.Getenv("HANZO_API_KEY"))
cfg.BaseURL = "https://api.hanzo.ai/v1"
client := openai.NewClientWithConfig(cfg)
resp, _ := client.CreateChatCompletion(context.Background(),
openai.ChatCompletionRequest{
Model: "google/gemma-3-4b-it",
Messages: []openai.ChatCompletionMessage{
{Role: openai.ChatMessageRoleUser, Content: "Hello!"},
},
},
)
fmt.Println(resp.Choices[0].Message.Content)
}
More from Google
View all Google models →$0.78Bill a month
Gemma 3 12B costs 1.1× more for this mix.
Gemma 3 4B$0.78131K
Gemma 3 12B$0.89131K
- Gemini 2.5 Flash Gemini 2.5 Flash is Google's state-of-the-art workhorse model, specifically designed for advanced reasoning, coding, mathematics, and scientific tasks. It includes built-in "thinking" capabilities, enabling it to provide responses with greater...
- Nano Banana (Gemini 2.5 Flash Image) Gemini 2.5 Flash Image, a.k.a. "Nano Banana," is now generally available. It is a state of the art image generation model with contextual understanding. It is capable of image generation,...
- Gemini 2.5 Flash Lite Gemini 2.5 Flash-Lite is a lightweight reasoning model in the Gemini 2.5 family, optimized for ultra-low latency and cost efficiency. It offers improved throughput, faster token generation, and better performance...
- Gemini 2.5 Pro Gemini 2.5 Pro is Google’s state-of-the-art AI model designed for advanced reasoning, coding, mathematics, and scientific tasks. It employs “thinking” capabilities, enabling it to reason through responses with enhanced accuracy...
- Gemini 2.5 Pro Preview 06-05 Gemini 2.5 Pro is Google’s state-of-the-art AI model designed for advanced reasoning, coding, mathematics, and scientific tasks. It employs “thinking” capabilities, enabling it to reason through responses with enhanced accuracy...
- Gemini 3 Flash Preview Gemini 3 Flash Preview is a high speed, high value thinking model designed for agentic workflows, multi turn chat, and coding assistance. It delivers near Pro level reasoning and tool...
Use Gemma 3 4B via Hanzo AI
One API key. Every major model. OpenAI-compatible. Start free.
