核心能力
- 原生 Gemini API — 使用 Google 原生 API 格式,完整功能访问
- 思考模式 — 支持思考配置以增强推理能力
- 多轮对话 — 支持系统指令的复杂对话
- 安全过滤 — 可配置的内容安全过滤器
快速示例
参数说明
API 参考
查看 Gemini 3 Pro Preview 的交互式 API Playground。
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
通过 Gemini API 调用 Google Gemini 3 Pro Preview。支持思考模式的先进推理能力。
curl "https://ai.alad.com/v1beta/models/gemini-3-pro-preview:generateContent?key=YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"contents": [
{
"role": "user",
"parts": [{ "text": "用简单的语言解释量子计算。" }]
}
],
"generationConfig": {
"temperature": 1,
"topP": 1
}
}'
import requests
url = "https://ai.alad.com/v1beta/models/gemini-3-pro-preview:generateContent"
params = {"key": "YOUR_API_KEY"}
data = {
"contents": [
{
"role": "user",
"parts": [{"text": "用简单的语言解释量子计算。"}]
}
],
"generationConfig": {
"temperature": 1,
"topP": 1
}
}
response = requests.post(url, params=params, json=data)
result = response.json()
print(result["candidates"][0]["content"]["parts"][0]["text"])
| 参数 | 类型 | 必填 | 说明 |
|---|---|---|---|
key | string | 是 | API 密钥(查询参数) |
contents | array | 是 | { role, parts } 对象数组 |
systemInstruction | object | 否 | 包含 parts 数组的系统指令 |
generationConfig.temperature | float | 否 | 0–2,控制随机性,默认 1 |
generationConfig.topP | float | 否 | 核采样阈值,默认 1 |
generationConfig.thinkingConfig | object | 否 | 思考模式配置 |
