Gemma 2 (27b) overview
Gemma 2 (27b) by Google
Discover Gemma-2 27B by Google, a high-performance language model optimized for diverse text generation tasks with broad language support.
Gemma 2 (27b) specs
- Model ID
google/gemma-2-27b-it- Developer
- Context window
- 8,192 tokens
- Max output
- 2,048 tokens
- Input
- Text
- Output
- Text
- API
- OpenAI-compatible, base URL
https://api.aimlapi.com/v1
Basic Information
- Model Type: Large Language Model (LLM)
Overview:
Gemma-2 27B is a high-performance language model designed to handle a diverse range of text generation tasks, including question answering, summarization, and reasoning. It offers significant improvements in efficiency and performance compared to its predecessors, making it suitable for various applications in natural language processing.
Key Features:
- 27 billion parameters, providing robust performance for complex tasks.
- Large context window of up to 8,192 tokens, allowing for extensive input handling.
- Fine-tuned for improved accuracy in generating coherent and contextually relevant responses.
- Supports multiple languages, enhancing its usability in global applications.
- Designed for efficient inference on NVIDIA GPUs and TPUs, reducing operational costs.
Intended Use:
The model is intended for software developers and researchers looking to implement advanced language processing capabilities in applications such as chatbots, content creation tools, and automated customer support systems.
Language Support:
Gemma-2 27B supports multiple languages, primarily focusing on English while also accommodating other widely spoken languages.
Architecture:
Gemma-2 27B employs a transformer architecture optimized for both performance and efficiency. It utilizes techniques such as grouped-query attention to enhance inference speed while maintaining high-quality outputs.
Use cases
- High‑Quality Chatbots: Comparable to much larger closed models in dialogue fluency
- Conversational Agents: Ideal for customer support, virtual assistants
- Reasoning & QA: Strong performance across MMLU, GSM8K, ARC, HellaSwag benchmarks
- Efficient Plotting: Code-like suggestions and logic reasoning
- Edge Deployment: Runs efficiently on single A100/H100 GPU or TPU
Capabilities
- Function calling
- Streaming
- Structured outputs
Gemma 2 (27b) API pricing
| Usage | Price | Unit |
|---|---|---|
| Input | $0.6877 | 1M tokens |
| Output | $0.6877 | 1M tokens |
Prices from the AI/ML API price list, checked on Nov 4, 2026.
Gemma 2 (27b) vs other models: token prices
AI/ML API input and output rates for 5 models, per million tokens.
| Model | Input | Output |
|---|---|---|
| $0.6877 | $0.6877 | |
| $0.3 | $2.5 | |
| $0.75 | $3.75 | |
| $0.75 | $3.75 | |
| $2 | $10 |
How to use the Gemma 2 (27b) API
View docsBuild with your agent
Give your agent the model details, code and documentation.
1Get your API key
Create API keyexport AIMLAPI_KEY="8f2b4c7d9a1e6b3f…"2Make your first request
curl 'https://api.aimlapi.com/v1/chat/completions' \
-H "Authorization: Bearer $AIMLAPI_KEY" \
-H 'Content-Type: application/json' \
-d '{
"model": "google/gemma-2-27b-it",
"messages": [
{
"role": "user",
"content": "Write a haiku about the ocean."
}
]
}'import os
import requests
headers = {
"Authorization": f"Bearer {os.environ['AIMLAPI_KEY']}",
"Content-Type": "application/json",
}
payload = {
"model": "google/gemma-2-27b-it",
"messages": [
{
"role": "user",
"content": "Write a haiku about the ocean."
}
]
}
response = requests.post("https://api.aimlapi.com/v1/chat/completions", headers=headers, json=payload, timeout=120)
response.raise_for_status()
print(response.json())const response = await fetch("https://api.aimlapi.com/v1/chat/completions", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.AIMLAPI_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
"model": "google/gemma-2-27b-it",
"messages": [
{
"role": "user",
"content": "Write a haiku about the ocean."
}
]
}),
});
if (!response.ok) throw new Error(`HTTP ${response.status}`);
console.log(await response.json());Related articles
Gemma 2 (27b) FAQ
What is the context window of Gemma 2 (27b)?
Gemma 2 (27b) has a 8,192 tokens context window and can return up to 2,048 tokens.
What inputs and outputs does Gemma 2 (27b) support?
Gemma 2 (27b) takes image, text as input and returns text.
What is the model ID for Gemma 2 (27b)?
Use google/gemma-2-27b-it as the model id. Requests go to https://api.aimlapi.com/v1/chat/completions.
How much does Gemma 2 (27b) cost?
Gemma 2 (27b) costs $0.6877 input and $0.6877 output per 1M tokens on AI/ML API, billed as you go with no subscription.
Does Gemma 2 (27b) support streaming?
Yes, Gemma 2 (27b) can stream responses as they are generated.
Can Gemma 2 (27b) read images?
Yes, Gemma 2 (27b) accepts image input alongside text.
Who created Gemma 2 (27b)?
Gemma 2 (27b) was built by Google.

