Google Gemma 4 26B A4B Instruct API
Gemma 4 26B A4B is a Mixture-of-Experts model from Google DeepMind with 26B total parameters and only 4B active per token, offering fast inference at high quality. It handles text, image, and video input, supports 256K context, function calling, and reasoning with configurable thinking modes.
输入: USD 0.13 / 百万 token; 输出: USD 0.4 / 百万 token
公开 ID: google-gemma-4-26b-a4b-it
模型类型: 聊天
推理 工具调用 视觉 结构化输出
定价
输入 · USD 0.13 / 百万 token
输出 · USD 0.4 / 百万 token
缓存读取 · USD 0.05 / 百万 token
缓存写入 · USD 0.13 / 百万 token
模型规格
- 模型类型
- 聊天 / 图片
- 上下文窗口(token)
- 256000
- 最大输出(token)
- 8192
- 推理
- 支持
- 工具调用
- 支持
- 视觉
- 支持
- 结构化输出
- 支持
隐私
未知
未知表示尚未发布经过核实的完整服务隐私保证。无审查不保证任意请求成功。
快速开始
确认该模型出现在你的密钥目录中,再查看该能力文档中的输入选项。
将 GLOOP_API_BASE 设为 API 地址,GLOOP_API_KEY 设为服务端密钥。
curl
curl --fail-with-body "${GLOOP_API_BASE%/}/v1/chat/completions" \
-H "Authorization: Bearer $GLOOP_API_KEY" \
-H 'Content-Type: application/json' \
--data-raw '{
"messages": [
{
"content": "Hello",
"role": "user"
}
],
"model": "google-gemma-4-26b-a4b-it"
}'Python
import os, json, urllib.request
url = os.environ['GLOOP_API_BASE'].rstrip('/') + "/v1/chat/completions"
headers = {'Authorization': 'Bearer ' + os.environ['GLOOP_API_KEY']}
headers['Content-Type'] = 'application/json'
data = "{\n \"messages\": [\n {\n \"content\": \"Hello\",\n \"role\": \"user\"\n }\n ],\n \"model\": \"google-gemma-4-26b-a4b-it\"\n}".encode('utf-8')
request = urllib.request.Request(url, data=data, headers=headers)
with urllib.request.urlopen(request) as response:
print(json.load(response))Node.js
const url = process.env.GLOOP_API_BASE.replace(/\/$/, '') + "/v1/chat/completions";
const headers = { Authorization: `Bearer ${process.env.GLOOP_API_KEY}` };
headers['Content-Type'] = 'application/json';
const response = await fetch(url, { method: 'POST', headers, body: JSON.stringify({
"messages": [
{
"content": "Hello",
"role": "user"
}
],
"model": "google-gemma-4-26b-a4b-it"
}) });
if (!response.ok) throw new Error(`HTTP ${response.status}`);
console.log(await response.json());
执行前请确认模型访问权限和价格。复制示例不会调用 API。
常见问题
Google Gemma 4 26B A4B Instruct — 应使用哪个模型 ID?
google-gemma-4-26b-a4b-it
Google Gemma 4 26B A4B Instruct — 此模型如何计费?
输入: USD 0.13 / 百万 token; 输出: USD 0.4 / 百万 token
Google Gemma 4 26B A4B Instruct — 支持哪些 API 端点?
/v1/chat/completions
Google Gemma 4 26B A4B Instruct — 上下文窗口有多大?
256000 Token
同类型模型
- Google Gemma 4 31B Instruct
- Google Gemma 3 27B Instruct
- Qwen 3.8 Flash
- Qwen 3.5 35B A3B
- GLM 5.3 Flash
- Qwen 3.5 9B