Google 多模态模型 —— 视频理解独步天下
Gemini 2.0 Flash 是 Google 的多模态模型。在视频理解、实时流式输出、多模态推理方面表现突出。Function Calling 支持完善,Google Cloud 生态集成方便。
| 项目 | 详情 |
|---|---|
| API Endpoint | https://generativelanguage.googleapis.com/v1beta/models |
| 鉴权方式 | Google API Key(query 参数或 Header) |
| 默认模型 | gemini-2.0-flash |
| MCP / Function Calling | ✅ 完整支持 |
| 类型 | 价格 |
|---|---|
| 输入(Input) | $0.15 / 1M tokens |
| 输出(Output) | $0.60 / 1M tokens |
| Flash 是性价比版本,Pro 更贵 | |
| 参数名 | 类型 | 默认值 | 说明 |
|---|---|---|---|
| model | string | gemini-2.0-flash | gemini-2.0-flash / gemini-2.0-pro |
| temperature | float | 0.9 | 0-1 |
| maxOutputTokens | integer | 4096 | 最大输出 token |
| tools | array | [] | Function Calling(Google 叫 Tool) |
curl "https://generativelanguage.googleapis.com/v1beta/models/gemini-2.0-flash:generateContent?key=$GOOGLE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"contents": [{
"parts": [{"text": "帮我分析这段视频"}]
}]
}'import google.generativeai as genai
genai.configure(api_key="xxx")
model = genai.GenerativeModel("gemini-2.0-flash")
response = model.generate_content("帮我分析这段视频")
print(response.text)多模态场景 / 视频分析 / Google Cloud 用户
不确定选哪个模型?
Gemini 2.0 Flash 最适合:
多模态场景 / 视频分析 / Google Cloud 用户