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

# 速率限制

> 速率限制的工作方式及处理方法。

为确保平台稳定性，可能会应用速率限制。如果超出 API 密钥的限制，您将收到 `429` 响应。

```json theme={null}
{
  "success": false,
  "error": {
    "code": 429,
    "timestamp": "2024-01-01T00:00:00.000Z",
    "message": "Rate limit exceeded",
    "details": "error/rate_limit_exceeded"
  }
}
```

## 处理速率限制

如果收到 `429` 响应，请等待一段时间后重试。使用指数退避策略以避免再次触发限制。

如果您使用 [TypeScript SDK](https://github.com/legitmark-eng/legitmark-typescript)，`withRetry()` 工具会自动处理：

```typescript theme={null}
import { withRetry } from 'legitmark';

const result = await withRetry(() => legitmark.sr.create(request));
```

如果您有特定的吞吐量需求，请联系 [accounts@legitmark.com](mailto:accounts@legitmark.com)。
