
Gemma 4 E4B是一个Google开放的多模式聊天模式,包含图像输入,功能调用,结构化输出,以及后续高效的指令.
Gemma 4 E4B是一个Google开放的多模式聊天模式,包含图像输入,功能调用,结构化输出,以及后续高效的指令.
支持文本和图像输入,流线,函数工具,结构化的JSON输出,种子控制,以及默认的思维模式. 计费是每个成功的信息。
也称为 Google Gemma 4 E4B, Gemma-4-E4B
gemma-4-e4bPOST /v1/chat/completionsPOST /v1/responsesPOST /v1/messagesLive pay-as-you-go rates from the EmpirioLabs catalog. You are billed only for what you use, with no monthly minimum.
Gemma 4 E4B serves the OpenAI-compatible Chat Completions API. Point any OpenAI SDK at https://api.empiriolabs.ai/v1 with your EmpirioLabs API key and use the model id gemma-4-e4b. Get an API key from the EmpirioLabs dashboard.
curl https://api.empiriolabs.ai/v1/chat/completions \
-H "Authorization: Bearer $EMPIRIOLABS_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "gemma-4-e4b",
"messages": [
{"role": "user", "content": "Write a haiku about the ocean."}
]
}'from openai import OpenAI
client = OpenAI(
base_url="https://api.empiriolabs.ai/v1",
api_key="YOUR_EMPIRIOLABS_API_KEY",
)
response = client.chat.completions.create(
model="gemma-4-e4b",
messages=[{"role": "user", "content": "Write a haiku about the ocean."}],
)
print(response.choices[0].message.content)Request parameters supported by the Gemma 4 E4B API on EmpirioLabs. Defaults apply when a field is omitted.
| 参数 | 类型 | 默认 | 范围 / 值 | 描述 |
|---|---|---|---|---|
| temperature | number | 0.7 | 0 to 2 | Sampling temperature. Lower values are more deterministic. |
| top_p | number | 0.95 | 0 to 1 | Nucleus sampling probability mass. |
| min_p | number | 0 | 0 to 1 | Minimum token probability filter. |
| max_tokens | integer | 4096 | 1 to 4096 | Maximum output tokens. |
| stop | string | - | - | One or more stop strings. |
| seed | integer | - | 0 to 2147483647 | Optional deterministic sampling seed. |
| enable_thinking | boolean | true | - | Enable the model reasoning channel before final output. |
| reasoning_effort | enum | - | low, medium, high | OpenAI-compatible hint. Medium and high enable thinking mode. |
| presence_penalty | number | 0 | -2 to 2 | Penalize tokens that already appeared. |
| frequency_penalty | number | 0 | -2 to 2 | Penalize repeated tokens by frequency. |
| repetition_penalty | number | 1 | 0.1 to 2 | Discourage exact repeated text. |
| logprobs | boolean | false | - | Return token log probabilities when supported. |
| top_logprobs | integer | - | 0 to 20 | Number of alternate token log probabilities to return. |
| tools | array | - | - | OpenAI-compatible function tool definitions. |
支持文本和图像输入,流线,函数工具,结构化的JSON输出,种子控制,以及默认的思维模式. 计费是每个成功的信息。
On EmpirioLabs, Gemma 4 E4B is billed pay as you go: 每个消息 $0.03 固定; Web Search (Linkup) $0.013 per call when invoked. The live rate card on this page always matches what the API charges.
Gemma 4 E4B supports a 8K-token context window with up to 4,096 output tokens per response.
Yes. Gemma 4 E4B serves the OpenAI-compatible Chat Completions API, so existing OpenAI SDKs work by pointing base_url at https://api.empiriolabs.ai/v1 and setting the model id to gemma-4-e4b.
Yes. The EmpirioLabs playground runs Gemma 4 E4B in the browser with the same parameters the API exposes, so you can test prompts before writing code.
Create an EmpirioLabs account, then generate a key under API Keys in the dashboard. Billing is pay-as-you-go credits, so you only pay for the requests you make.
Check out our pricing or reach out if you want your own model deployed on our stack.