Skip to main content
Version: Current

API 充值与账单

CSSA GPT 调用的各家模型 API 由 BU CSSA Tech 统一账号付费。充值、查看余额、下载发票均在各厂商官网完成,不在本服务器上操作

统一登录账号

项目
登录邮箱bucssatech@gmail.com
适用范围下文列出的所有 API Provider 控制台

使用该 Google 账号登录对应网站。若开启了两步验证,验证码会发到该邮箱或已绑定的验证方式(由 Tech 负责人保管)。

注意:厂商控制台里的 API Key 与服务器 /root/litellm/api_keys.env 中的值对应。在网页上轮换 / 新建 Key 后,必须同步更新 api_keys.env 并执行 bash /root/litellm/operation.sh,否则服务会继续用旧 Key。


OpenAI(GPT 系列)

项目说明
用途gpt-5.1gpt-5-minigpt-5.1-codex-max
控制台https://platform.openai.com
本机环境变量OPENAI_API_KEY

充值步骤

  1. 浏览器打开 https://platform.openai.com ,用 bucssatech@gmail.com 登录(Continue with Google)。
  2. 左下角或右上角进入 SettingsBilling(或直接打开 https://platform.openai.com/settings/organization/billing)。
  3. Payment methods 中添加/确认信用卡或借记卡。
  4. 选择其一:
    • Add to credit balance:预充值余额(Prepaid credits)
    • 或开通 Auto recharge:余额低于阈值时自动扣款
  5. Usage / Limits 查看消费与配额。

常见问题

  • 报错 insufficient_quota / 402:余额不足或达到 hard limit,需充值或提高限额。
  • 新 Key:在 https://platform.openai.com/api-keys 创建后写入 api_keys.env

Google Gemini

项目说明
用途gemini-2.5-flashgemini-2.5-pro
控制台(常用)https://aistudio.google.com
计费说明多数通过 Google 账号关联;若走 Cloud 计费则见 Google Cloud Console
本机环境变量GEMINI_API_KEY

充值 / 付费步骤

  1. bucssatech@gmail.com 登录 https://aistudio.google.com
  2. 查看 API Key:左侧 Get API key / https://aistudio.google.com/apikey (与 GEMINI_API_KEY 对应)。
  3. 付费与配额:
    • AI Studio 免费额度:在 Studio 内查看用量提示;
    • 若已绑定 Google Cloud 项目 并按量计费:打开 https://console.cloud.google.com/billing ,选择对应结算账号 → 付款 / 关联付款资料 → 为项目启用结算。
  4. 用量:Cloud Console → APIs & ServicesEnabled APIsGenerative Language API(或实际启用的 API)→ 配额/指标。

常见问题

  • Key 无效:确认 Key 是在当前登录的 bucssatech@gmail.com 下创建。
  • 超出免费层:需在 Cloud Billing 绑定付款方式或升级方案。

Anthropic(Claude)

项目说明
用途claude-sonnet-4.5claude-haiku-4.5
控制台https://console.anthropic.com
本机环境变量ANTHROPIC_API_KEY

充值步骤

  1. 打开 https://console.anthropic.com ,用 bucssatech@gmail.com 登录。
  2. 进入 SettingsBilling(或 Plans & Billing)。
  3. 添加付款方式(信用卡)。
  4. 购买 Prepaid credits 或按控制台提供的 Auto-reload 设置自动充值。
  5. Usage 查看 token 消费。

常见问题

  • 401 / invalid x-api-key:Key 过期或被撤销,在 API Keys 页重新生成并更新服务器配置。
  • 预算告警:在 Billing 中设置 spend limit / 邮件通知。

DeepSeek

项目说明
用途deepseek-chatdeepseek-reasoner
控制台https://platform.deepseek.com
本机环境变量DEEPSEEK_API_KEY

充值步骤

  1. 打开 https://platform.deepseek.com ,使用 bucssatech@gmail.com 注册/登录(支持邮箱或第三方登录,以实际已绑定方式为准)。
  2. 进入 充值 / Balance / Billing(中文界面常见「账户余额」「充值」)。
  3. 按页面指引完成充值(常见为支付宝、微信或银行卡,以平台当前支持为准)。
  4. API Keys 管理密钥;用量在 Usage 或账单页查看。

常见问题

  • 余额不足:对话报错且 LiteLLM 日志含余额/配额相关提示,需先充值再测。
  • 国内访问:若控制台打不开,由运维网络环境排查,与 LiteLLM 配置无关。

智谱 Z.AI(GLM)

项目说明
用途glm-4.7glm-4.5-flash
控制台https://open.bigmodel.cn (智谱开放平台)
本机环境变量ZHIPU_API_KEY

充值步骤

  1. 打开 https://open.bigmodel.cn ,用 bucssatech@gmail.com 登录(或该邮箱绑定的手机号/微信,以账号实际绑定为准)。
  2. 进入 费用中心 / 充值 / 资源包(名称可能为「账户总览」「财务管理」)。
  3. 选择 按量充值 或购买 资源包(更划算时优先资源包)。
  4. API Key 页面查看/创建 Key,对应 ZHIPU_API_KEY

常见问题

  • 调用失败且返回余额相关错误:费用中心查看剩余额度。
  • 模型 ID 变更:需同时改 config.yamllitellm_params.model(如 zai/glm-4.7)。

充值后必做(运维)

仅在网页上充值不会自动修复已耗尽的 Key 或错误配置。建议流程:

# 1. 若轮换过 API Key,编辑(勿提交 Git)
nano /root/litellm/api_keys.env

# 2. 重建 LiteLLM
bash /root/litellm/operation.sh

# 3. 冒烟测试
curl -sS -H "Authorization: Bearer <LITELLM_MASTER_KEY>" \
-H "Content-Type: application/json" \
-d '{"model":"gpt-5-mini","messages":[{"role":"user","content":"ping"}]}' \
http://127.0.0.1:4001/v1/chat/completions

在 Open WebUI 再发一条测试消息确认。


厂商与配置对照表

厂商控制台api_keys.env 变量config.yaml 中典型 model_name
OpenAIhttps://platform.openai.comOPENAI_API_KEYgpt-5.1, gpt-5-mini, …
Googlehttps://aistudio.google.comGEMINI_API_KEYgemini-2.5-flash, gemini-2.5-pro
Anthropichttps://console.anthropic.comANTHROPIC_API_KEYclaude-sonnet-4.5, claude-haiku-4.5
DeepSeekhttps://platform.deepseek.comDEEPSEEK_API_KEYdeepseek-chat, deepseek-reasoner
智谱https://open.bigmodel.cnZHIPU_API_KEYglm-4.7, glm-4.5-flash

权限与分工建议

角色可做
Tech 负责人持有 bucssatech@gmail.com、付款、轮换 Key
普通运维更新 api_keys.env、重启 LiteLLM(需负责人提供新 Key)
普通用户不应 接触厂商控制台或 api_keys.env

若邮箱无法登录或付款失败,在 CSSA Tech 内部协调,勿在文档或聊天中粘贴完整 API Key。