账户管理
- 额度、账单、Key 与团队协作
- 账户层与 Key 层的区别最容易混淆
- 每条都给出对应的查询接口
余额与额度分三层
账户余额
└── Key A 上限
└── Key B 上限
└── 单次请求扣费- 账户余额是整个账号的总钱数
- Key 上限是单个 Key 的额度天花板,不能超过账户余额
- 单次请求扣费按 token 用量或按次计算
查账户余额用 GET /v1/dashboard/billing/usage,查 Key 额度用 GET /v1/dashboard/billing/subscription。
Account balance
└── Key A limit
└── Key B limit
└── Per-request charge- Account balance is the total money on the account
- Key limit is the ceiling for a single key and can't exceed the account balance
- Per-request charge is calculated from token usage or per call
Use GET /v1/dashboard/billing/usage to check the account balance and GET /v1/dashboard/billing/subscription to check a key's limit.
一个 Key 还是多个
| 场景 | 建议 |
|---|---|
| 个人试用 | 一个 Key 就够 |
| 多项目隔离 | 每个项目一个 Key,便于归因 |
| 多人协作 | 每人一个 Key,出问题好定位 |
| 高并发 | 多个 Key 分担,绕开单 Key 限流 |
删 Key 后不可恢复,正在使用它的程序会立刻开始报 401。轮换时先建新的、切过去、确认稳定,再删旧的。
| Scenario | Recommendation |
|---|---|
| Personal trial | One key is enough |
| Project isolation | One key per project, so usage is easy to attribute |
| Team collaboration | One key per person, so problems are easy to trace |
| High concurrency | Several keys to spread load and dodge per-key rate limits |
Deleting a key is irreversible, and any program still using it starts getting 401s immediately. When rotating, create the new key, switch over, confirm it's stable, then delete the old one.
账单什么时候结算
调用发生即扣费,不是月底统一结算。额度是实时扣减的,所以并发高时两次查询之间可能有小幅偏差。
失败的任务会自动退款。图像、视频这类异步任务,退款发生在任务进入 failed 状态时。
You're charged as calls happen, not in a month-end settlement. Balance is deducted in real time, so under high concurrency two queries may differ slightly.
Failed tasks are refunded automatically. For async tasks like images and video, the refund happens when the task enters the failed state.
用量怎么看
GET /v1/dashboard/billing/usage 支持按日、按模型、按 Key 聚合。单次查询最多跨 31 天,更长的区间要分段查。
数据按小时批次落库,最近几分钟的用量可能还没计入。做日结对账时查昨天的数据。
GET /v1/dashboard/billing/usage aggregates by day, by model, and by key. A single query spans at most 31 days; query longer ranges in segments.
Data lands in hourly batches, so the last few minutes of usage may not be counted yet. For daily reconciliation, query yesterday's data.
充值后没到账
先确认支付是否真的成功,再看账户余额接口。跨境支付有时会有延迟,通常几分钟内到账。超过一小时仍未到账,带上支付凭证联系支持。
First confirm the payment actually succeeded, then check the account balance endpoint. Cross-border payments sometimes lag, usually arriving within minutes. If it still hasn't arrived after an hour, contact support with your payment receipt.
团队协作怎么做
目前没有组织级别的成员管理。常见的做法是:
- 主账号持有余额
- 给每个成员建独立 Key,设各自的额度上限
- 用
group_by=api_key查用量,按 Key 做成本归集
这样既共享额度,又能分清谁用了多少。
There's no organization-level member management right now. The usual approach:
- The main account holds the balance
- Create a separate key for each member with its own limit
- Query usage with
group_by=api_keyto attribute costs per key
That way you share a balance but can still tell who used how much.
额度用完了会怎样
所有请求开始返回 402 payment_required。已经在跑的任务不受影响,会正常完成(这部分在提交时已扣费)。
建议在控制台设置余额告警,别等完全用完再充。
All requests start returning 402 payment_required. Tasks already running are unaffected and complete normally (that part was charged at submission).
Set a balance alert in the console so you top up before it runs out completely.