> For the MDX source of any page, append .mdx to the page URL.
> For a complete documentation index, see https://docs.bitiful.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.bitiful.com/_mcp/server.
> If something on this page is wrong or missing, POST JSON {"page": "<page URL>", "message": "<what is wrong>"} to https://docs.bitiful.com/_biti/feedback/agent.

# 刷新与预热余量

`GET /cdn/cache/quota`

查询当天（北京时间）URL 刷新、目录刷新、URL 预热的剩余次数和额度，与控制台共用。`-1` 表示不限。

Base URL: https://api.bitiful.com

Authentication: API key in header `Authorization`

## Example request

```bash
curl https://api.bitiful.com/cdn/cache/quota \
     -H "Authorization: <apiKey>"
```

## Responses

### 200

当天的余量与额度。

Content type: `application/json`

| Field | Type | Required | Description |
|---|---|---|---|
| `url_remain` | integer | no | 今天还能刷新的 URL 个数，`-1` 为不限。 |
| `dir_remain` | integer | no | 今天还能刷新的目录个数，`-1` 为不限。 |
| `prefetch_remain` | integer | no | 今天还能预热的 URL 个数，`-1` 为不限。 |
| `url_limit` | integer | no | 每天的 URL 刷新额度，`-1` 为不限。 |
| `dir_limit` | integer | no | 每天的目录刷新额度，`-1` 为不限。 |
| `prefetch_limit` | integer | no | 每天的 URL 预热额度，`-1` 为不限。 |
| `dir_batch_limit` | integer | no | 单次目录刷新最多条数，`-1` 为不限。 |

### 401

API Token 缺失或无效。

Content type: `application/json`

| Field | Type | Required | Description |
|---|---|---|---|
| `message` | string | no | 结果或错误说明。 |

### 500

服务端错误，请稍后重试。

Content type: `application/json`

| Field | Type | Required | Description |
|---|---|---|---|
| `message` | string | no | 结果或错误说明。 |

### Example response (200)

```json
{
  "url_remain": 4980,
  "dir_remain": 100,
  "prefetch_remain": 4900,
  "url_limit": 5000,
  "dir_limit": 100,
  "prefetch_limit": 5000,
  "dir_batch_limit": 20
}
```
