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。

檢視 API 指南 · 發現模型 · SDK 接入 · 計費

常見問題

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

同類型模型

全部模型