Billing Flow
Chuizi.AI uses post-pay billing — you are charged after each request completes, based on actual upstream usage. This is the same model used by OpenAI, Anthropic, and other major providers.
Billing Flow
Request arrives │ ▼ ① Auth — verify ck-xxx API key │ ▼ ② Balance check │ balance > 0 → proceed │ balance ≤ 0 → return 402 Insufficient Balance │ ▼ ③ Forward request to upstream provider │ ▼ ④ Receive upstream response, extract usage field │ Contains actual input_tokens, output_tokens, etc. │ ▼ ⑤ Async billing │ ├─ Calculate cost: actual usage × model price × 1.05 │ └─ Deduct actual cost from balance │ ▼ ⑥ Write billing records
Next Steps
- Generation API — Query billing details for a single request
- Billing Model — Overview of the three billing types
- Balance Alerts — Set up notifications before your balance runs low