Easy 🌍 Regional Pricing
Reliability: High
Google Gemini API完整指南
Gemini是Google开发的AI模型,支持免费API调用。本文介绍Gemini API申请和充值方式
4.5 (9,800 ratings)
120,000 views Updated 5/18/2024 GeminiGoogleAPIAI模型免费额度Vertex AI
一、Gemini API简介
Gemini是Google开发的AI模型系列,包括Gemini Pro、Gemini Ultra等,支持文本和代码生成。
API版本
| 模型 | 说明 | 定价 |
| Gemini 1.5 Flash | 轻量级 | 免费(有限制) |
| Gemini 1.5 Pro | 中量级 | $0.00125/千tokens |
| Gemini Pro | 标准版 | 免费(有限制) |
|---|
免费额度
二、API申请
获取API Key
使用API Key
import google.generativeai as genaigenai.configure(api_key='YOUR_API_KEY')
model = genai.GenerativeModel('gemini-pro')
response = model.generate_content('Hello')
print(response.text)
三、付费升级
Google AI Studio付费
Vertex AI(企业版)
通过Google Cloud Vertex AI使用: