Gemini 3 Flash 是一款面向实时文本生成的高速多模态语言模型。支持文本和图像输入、function calling 以及 Google Search grounding。基于 token 计费:每百万输入 token $0.30、每百万输出 token $1.80。提供两个端点:标准异步(/gemini-3-flash)和通过 SSE 实现的实时流式端点(/gemini-3-flash/stream)。
关于此模型
Gemini 3 Flash 是一款面向实时文本生成的高速多模态语言模型。它原生处理文本和图像输入,支持 function calling 和 Google Search grounding,并提供低延迟响应,非常适合聊天机器人、助手、内容工具和自动化流程。价格基于 token 计费:每百万输入 token $0.30、每百万输出 token $1.80。
成本分析
| 提供商 | 费用 | 备注 |
|---|---|---|
| Google AI (Official) | $0.50/M 输入 Token, $3.00/M 输出 Token | Official Google AI 定价 for Gemini Flash. muapiapp is 40% 更便宜 — you save $0.20 per million input tokens and $1.20 per million output tokens. |
| muapiapp | $0.30/M 输入 Token, $1.80/M 输出 Token | 40% 更便宜 than Google's official 定价. Token-based billing — you only pay for what you use, with no per-request minimums or setup fees. |
| Fal.ai | 暂不可用 | Fal.ai 目前不提供独立的 Gemini Flash LLM 端点。 |
| Replicate | 暂不可用 | Replicate 目前不提供托管的 Gemini Flash 模型。 |
Official Google AI 定价 for Gemini Flash. muapiapp is 40% 更便宜 — you save $0.20 per million input tokens and $1.20 per million output tokens.
40% 更便宜 than Google's official 定价. Token-based billing — you only pay for what you use, with no per-request minimums or setup fees.
Fal.ai 目前不提供独立的 Gemini Flash LLM 端点。
Replicate 目前不提供托管的 Gemini Flash 模型。
** 竞品价格根据相似模型架构和使用层级估算。
配置参数
| 参数 | 类型 | 描述 | 默认值 |
|---|---|---|---|
| 提示词 | string | 提供给模型的用户消息或指令。 | Summarize the key points of the attached image. |
| 图像 URL | string | 作为多模态输入的可选图像 URL。 | undefined |
| 系统提示词 | string | 可选的系统级指令,用于引导模型行为。 | You are a helpful assistant that responds concisely. |
提供给模型的用户消息或指令。
Summarize the key points of the attached image.作为多模态输入的可选图像 URL。
undefined可选的系统级指令,用于引导模型行为。
You are a helpful assistant that responds concisely.开发者文档
Gemini 3 Flash 提供两个端点——标准异步端点和实时流式端点。
POST /api/v1/gemini-flash适用于工作流、自动化和批处理。
Python:
import requests, time
API_KEY = "your_api_key_here"
headers = {"x-api-key": API_KEY, "Content-Type": "application/json"}
# 1. Submit
r = requests.post("https://api.muapi.ai/api/v1/gemini-flash", headers=headers,
json={"prompt": "Explain quantum computing.", "system_prompt": "Be concise."})
request_id = r.json()["request_id"]
# 2. Poll
while True:
result = requests.get(f"https://api.muapi.ai/api/v1/predictions/{request_id}/result", headers=headers).json()
if result["status"] == "completed":
print(result["output"]["text"])
break
time.sleep(2)
cURL:
# Submit
curl -X POST https://api.muapi.ai/api/v1/gemini-flash \
-H "x-api-key: YOUR_API_KEY" -H "Content-Type: application/json" \
-d '{"prompt": "Explain quantum computing."}'
# Poll
curl https://api.muapi.ai/api/v1/predictions/{request_id}/result \
-H "x-api-key: YOUR_API_KEY"
POST /api/v1/gemini-flash/stream适用于聊天 UI 和实时 token 显示。
Python (httpx):
import httpx, json
API_KEY = "your_api_key_here"
with httpx.Client(timeout=120) as client:
with client.stream("POST", "https://api.muapi.ai/api/v1/gemini-flash/stream",
headers={"x-api-key": API_KEY, "Content-Type": "application/json"},
json={"prompt": "Write a poem about the ocean."}
) as response:
for line in response.iter_lines():
if line.startswith("data: "):
data = line[6:]
if data == "[DONE]": break
delta = json.loads(data)["choices"][0]["delta"].get("content", "")
if delta: print(delta, end="", flush=True)
print()
JavaScript (fetch):
const response = await fetch("https://api.muapi.ai/api/v1/gemini-flash/stream", {
method: "POST",
headers: { "x-api-key": "YOUR_API_KEY", "Content-Type": "application/json" },
body: JSON.stringify({ prompt: "Write a poem about the ocean." })
});
const reader = response.body.getReader();
const decoder = new TextDecoder();
while (true) {
const { done, value } = await reader.read();
if (done) break;
for (const line of decoder.decode(value, { stream: true }).split("\n")) {
if (!line.startsWith("data: ")) continue;
const data = line.slice(6).trim();
if (data === "[DONE]") return;
const delta = JSON.parse(data).choices?.[0]?.delta?.content ?? "";
if (delta) process.stdout.write(delta);
}
}
cURL:
curl -X POST https://api.muapi.ai/api/v1/gemini-flash/stream \
-H "x-api-key: YOUR_API_KEY" -H "Content-Type: application/json" \
-d '{"prompt": "Write a poem about the ocean."}' --no-buffer
请参阅完整文档:/docs/streaming。
| Token 类型 | 费率 |
|---|---|
| 输入 | $0.30/百万 |
| 输出 | $1.80/百万 |
钱包余额至少需要 $1.00。
常见问答
它支持文本提示词和可选的图像 URL。所有媒体类型在 payload 中都使用相同的结构。
价格基于 token 计费:每百万输入 token $0.30、每百万输出 token $1.80。实际费用根据 API 响应计算,并在每次调用后从你的钱包中扣除。
由于费用会在调用后根据 token 使用量扣除,$1.00 的最低余额可以确保钱包足以覆盖实际使用费用。
支持。Gemini 3 Flash 支持兼容 OpenAI 的 function calling。你可以在请求中定义工具,模型会根据需要调用它们。
/gemini-3-flash 是标准异步端点——它返回 request_id,你需要轮询结果。/gemini-3-flash/stream 返回实时的 Server-Sent Events(SSE)流,在生成 token 的同时持续发送。聊天 UI 应使用流式端点;工作流和自动化应使用标准端点。