帮助中心
快速上手与常见问题
账户配置格式
accounts.json 或环境变量 ACCOUNTS_CONFIG 使用的 JSON 数组
[
{
"id": "account_1",
"secure_c_ses": "CSE.Ad...",
"csesidx": "498...",
"config_id": "0cd...",
"host_c_oses": "",
"expires_at": "2026-12-31 23:59:59"
}
]
必填:secure_c_ses / csesidx / config_id。id、host_c_oses、expires_at 可选。
API 对话 curl 格式
标准的 OpenAI 兼容格式,支持流式和非流式输出。
curl -X POST "http://localhost:7860/v1/chat/completions" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_KEY" \
-d '{
"model": "gemini-2.5-flash",
"stream": false,
"temperature": 0.7,
"top_p": 1,
"messages": [
{ "role": "system", "content": "你是一个简洁的助手" },
{ "role": "user", "content": "你好,介绍一下这个项目" }
]
}'
如果未设置 API Key,可省略 Authorization。
文生图格式(Base64 / URL 输出)
使用支持文生图的模型,直接给文本提示即可;输出格式由系统设置决定(base64 或 url)。
curl -X POST "http://localhost:7860/v1/chat/completions" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_KEY" \
-d '{
"model": "gemini-3-pro-preview",
"stream": true,
"temperature": 0.7,
"top_p": 1,
"messages": [
{ "role": "user", "content": "生成一只戴着头盔的猫,赛博风格" }
]
}'
专用图片生成(gemini-imagen)
使用 gemini-imagen 虚拟模型强制启用图片生成功能,输出格式由系统设置决定(base64 或 url)。
curl -X POST "http://localhost:7860/v1/chat/completions" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_KEY" \
-d '{
"model": "gemini-imagen",
"stream": true,
"messages": [
{ "role": "user", "content": "生成一只可爱的猫咪,卡通风格" }
]
}'
专用视频生成(gemini-veo)
使用 gemini-veo 虚拟模型生成视频,输出格式由系统设置决定(html/url/markdown)。
curl -X POST "http://localhost:7860/v1/chat/completions" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_KEY" \
-d '{
"model": "gemini-veo",
"stream": true,
"messages": [
{ "role": "user", "content": "生成一段可爱猫咪玩耍的视频" }
]
}'
图生图格式(Base64 / URL 输入)
content 使用多模态数组,image_url 可填 URL 或 data:base64。
curl -X POST "http://localhost:7860/v1/chat/completions" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_KEY" \
-d '{
"model": "gemini-3-flash-preview",
"stream": false,
"temperature": 0.7,
"top_p": 1,
"messages": [
{
"role": "user",
"content": [
{ "type": "text", "text": "把图片改成插画风格" },
{ "type": "image_url", "image_url": { "url": "https://example.com/cat.png" } }
]
}
]
}'
curl -X POST "http://localhost:7860/v1/chat/completions" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_KEY" \
-d '{
"model": "gemini-3-flash-preview",
"stream": false,
"temperature": 0.7,
"top_p": 1,
"messages": [
{
"role": "user",
"content": [
{ "type": "text", "text": "增强画面细节" },
{ "type": "image_url", "image_url": { "url": "data:image/png;base64,AAA..." } }
]
}
]
}'
读文件格式(URL / Base64)
适用于 PDF/图片/文本等可读文件,Word/PPT 等可能不支持会被提示转换。大部分文件都可能支持,建议自行测试。
curl -X POST "http://localhost:7860/v1/chat/completions" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_KEY" \
-d '{
"model": "gemini-2.5-pro",
"stream": false,
"temperature": 0.7,
"top_p": 1,
"messages": [
{
"role": "user",
"content": [
{ "type": "text", "text": "读取并总结这个文件" },
{ "type": "image_url", "image_url": { "url": "https://example.com/doc.pdf" } }
]
}
]
}'
curl -X POST "http://localhost:7860/v1/chat/completions" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_KEY" \
-d '{
"model": "gemini-2.5-pro",
"stream": false,
"temperature": 0.7,
"top_p": 1,
"messages": [
{
"role": "user",
"content": [
{ "type": "text", "text": "读取并摘要" },
{ "type": "image_url", "image_url": { "url": "data:application/pdf;base64,AAA..." } }
]
}
]
}'
使用声明与免责条款
⚠️ 严禁滥用:禁止将本工具用于商业用途或任何形式的滥用(无论规模大小)
本工具严禁用于以下行为:
违规后果
滥用行为可能导致账号永久封禁、法律追责,一切后果由使用者自行承担。
📖 合法用途
本项目仅限于以下场景:
⚖️ 法律责任
📋 技术声明
🔗 相关服务条款
使用本工具时,您必须同时遵守以下第三方服务的条款:
使用本工具即表示您已阅读、理解并同意遵守以上所有条款。