| 用途 | 模型 | 成本 |
| 日常对话(70%) | 智谱 GLM-4-Flash | $0(永久免费) |
| 代码开发(15%) | DeepSeek-V3 | ~$0.50/月 |
| 复杂推理(10%) | DeepSeek-R1 | ~$1.00/月 |
| 偶尔用 GPT-4o(5%) | GPT-4o via 中转 | ~$2.00/月 |
| 长文档分析 | Gemini Flash | $0(15 RPM 免费) |
| 图片理解 | Gemini Flash | $0(免费多模态) |
| 总计 | ~$3.50/月 |
还剩 $1.50 做缓冲。
具体配置
Step 1 · 注册这些免费账号
1. 智谱清言 — GLM-4-Flash 永久免费
2. 硅基流动 — 14 个模型免费
3. DeepSeek — 注册送 $5
4. Gemini — 15 RPM 免费
5. Groq — 超快推理免费
Step 2 · 用中转站统一管理
在 openllmapi.com 注册,一个 Key 调用所有模型:
from openai import OpenAI
client = OpenAI(
api_key="你的 openllmapi Key",
base_url="https://api.openllmapi.com"
)
def smart_chat(message, task_type="casual"):
"""根据任务类型自动选择最省钱的模型"""
model_map = {
"casual": "glm-4-flash", # 免费
"code": "deepseek-chat", # 极便宜
"reasoning": "deepseek-reasoner", # 便宜
"english": "gpt-4o-mini", # 中等
"premium": "gpt-4o", # 贵,少用
"long_doc": "gemini-1.5-flash", # 免费
}
response = client.chat.completions.create(
model=model_map.get(task_type, "glm-4-flash"),
messages=[{"role": "user", "content": message}]
)
return response.choices[0].message.content
日常聊天 → 免费
print(smart_chat("今天天气怎么样", "casual"))
写代码 → DeepSeek,极便宜
print(smart_chat("用 Python 写一个 Web 爬虫", "code"))
偶尔需要 GPT-4o
print(smart_chat("Analyze this complex English paper...", "premium"))
Step 3 · 本地模型兜底
安装 Ollama,跑一个 7B 模型做离线兜底:
ollama run qwen2.5:7b
API 额度用完了?切到本地模型,零成本继续用。
每日用量估算
假设你每天:
- 聊天 50 次(GLM-4-Flash)→ $0
- 写代码 20 次(DeepSeek-V3)→ ~$0.02
- 推理 5 次(DeepSeek-R1)→ ~$0.03
- GPT-4o 2 次 → ~$0.07
每日成本:~$0.12,每月 ~$3.60。$5 绰绰有余。
进阶省钱技巧
1. 用 Prompt Cache — DeepSeek 和 Claude 都支持,重复前缀不重复计费
2. 控制 max_tokens — 不需要长回复时限制输出长度
3. 用 Flash/Mini 模型 — 简单任务不需要旗舰模型
4. 批量请求 — 攒一批请求一起发,减少 overhead
5. 缓存结果 — 相同问题不重复调用
免费额度汇总
| 厂商 | 免费额度 | 中国大陆直连 |
| 智谱 GLM-4-Flash | 无限 | ✅ |
| 硅基流动 14 模型 | 无限 | ✅ |
| DeepSeek | $5 赠金 | ✅ |
| Gemini Flash | 15 RPM | ❌ |
| Groq | 14400 tok/min | ❌ |
| Cerebras | Rate limited | ❌ |