> ## Documentation Index
> Fetch the complete documentation index at: https://docs.lithosai.com/llms.txt
> Use this file to discover all available pages before exploring further.

# 计费

LithosAI 推理服务采用预付费。每个请求按 token 精确计量，费用从所在组织的余额中扣除。

## 价格

每个模型按每百万 token 计价，分为输入、缓存命中输入和输出三项。缓存命中输入是输入 token 的一部分，不会重复计费。一个请求的费用由三部分组成：

* 未命中缓存的输入（`prompt_tokens - cached_tokens`）：按输入价格计费
* 命中缓存的输入（`cached_tokens`）：按缓存命中价格计费
* 输出（`completion_tokens`）：按输出价格计费

## 余额耗尽

余额为零时，请求返回 402，错误码为 `insufficient_quota`，并带有 `x-should-retry: false`。可以在 [计费](https://console.lithosai.cloud/billing?lang=zh) 页面充值，每次 \$5 到 \$5,000。

## 自动充值

平台支持自动充值。你需要设置一个阈值、一个目标金额和一个月度上限：余额低于阈值时，我们会从你绑定的卡扣款，把余额补到目标金额，一个自然月内扣款总额不超过上限。如果扣款失败，自动充值会自行关闭，并发邮件通知组织管理员，而不是无限次重试扣款。

## 用量报表

在 [计费](https://console.lithosai.cloud/billing?lang=zh) 和 [用量分析](https://console.lithosai.cloud/analytics?lang=zh) 页面可以按天、模型和 API key 查看费用和 token 用量明细。


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.