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

# Credits 与用量

> 速率限制、credits,以及当前版本的用量机制。

## 套餐与 credits

Hosted execution 以 credits 计价。每个套餐都包含每月的 credits 额度,并在你的账单日重置:

| 套餐      | 价格    | Credits / 月 |
| ------- | ----- | ----------- |
| Free    | \$0   | 1,000       |
| Starter | \$49  | 15,000      |
| Pro     | \$149 | 60,000      |

Enterprise 套餐以定制价格覆盖更高用量。详情见 [pricing](https://hermai.ai/pricing)。

### credits 如何计算

* 标准请求消耗 **1 credit**。
* 部分成本更高的站点(例如大型消费类电商平台,以及某些房产或旅行类门户)消耗 **5 credits**。
* 少数多结果端点按返回的每条结果计费。
* 只有成功的请求才计费。失败的请求免费。
* 每次响应都会报告其确切消耗的 credits(`meta.credits_used`)。

Hosted fetch 使用 credits。响应的 `meta` 对象包含 `credits_used` 和 `credits_remaining`,方便 agent 跟踪用量:

```json theme={null}
{
  "success": true,
  "data": {},
  "meta": {
    "credits_used": 1,
    "credits_remaining": 999
  }
}
```

## 速率限制

Runtime API 请求在 credits 额度之上还有速率限制。限制取决于你的套餐:

| 层级            | 每分钟 | 每小时   | 每天     | 身份跟踪方式      |
| ------------- | --- | ----- | ------ | ----------- |
| 匿名(无 API key) | -   | 5     | -      | 按 IP 地址     |
| Free          | 20  | 1,000 | 1,000  | 按用户账号       |
| Starter       | 60  | 3,000 | 15,000 | 按 workspace |
| Pro           | 100 | 5,000 | 60,000 | 按 workspace |

超过任何限制都会收到 `429 Too Many Requests` 响应。速率限制用于突发保护;每月 credits 额度才是主要的用量预算。

获取 API key 免费 - 到 [hermai.ai/register](https://hermai.ai/register) 注册并在 dashboard 创建。

## 社区奖励

你也可以通过贡献与社区活动赚取 credits:

| 行为        | Credits   |
| --------- | --------- |
| 第一次发起请求   | +50       |
| 推荐朋友      | 每位受邀 +100 |
| 贡献 schema | 每个网站 +50  |

Credits 会累积在账号中,并显示在 dashboard。

## 哪些算一次请求?

以下端点每次调用都计入速率限制:

* `GET /v1/catalog/{domain}`(catalog 查询)
* `POST /v1/fetch`(hosted execution)

以下**不**计入速率限制:

* `GET /v1/schemas`(浏览/搜索 registry)
* `GET /v1/schemas/{site}`(公开 schema 卡片)
* `GET /v1/schemas/{site}/package`(schema 下载)
* `GET /v1/trending`、`GET /v1/categories`(探索接口)
* `POST /v1/schemas`(推送 schema)
* `GET /v1/health`

## 用量 dashboard

你的 [dashboard](https://hermai.ai/dashboard) 会显示:

* **今日请求数** - 累计调用次数
* **Schema 命中率** - 查询命中已缓存 schema 的比例
* **平均延迟** - 请求的平均响应时间
* **已获得 credits** - 累计的 credits 余额
* **活动记录** - 每条请求的 URL、状态、延迟、时间戳

## 计费和限制

你可以不绑定信用卡就注册并创建 API key。速率限制和 credits 控制自助用量。如果账号没有足够 credits 用于 hosted execution,`POST /v1/fetch` 会返回 `402 INSUFFICIENT_CREDITS`。
