速率限制
了解请求配额和速率限制。
月度配额系统
Traceline API使用月度配额系统而非每秒速率限制。每个方案在计费周期内有固定的请求数量。
配额在每个计费周期开始时重置. 未使用的请求不会累积.
方案限制
| 方案 | 月度配额 | 价格 |
|---|---|---|
| Free | 100 requests/month | $0 |
| Pro | 10,000 requests/month | $200/month |
| Enterprise | Unlimited | Custom |
跟踪配额
每个API响应都包含显示当前配额状态的标头:
X-Monthly-Quota-Limit— 您的月度总配额X-Monthly-Quota-Remaining— 本月剩余请求数
响应标头示例
HTTP/1.1 200 OK
Content-Type: application/json
X-Monthly-Quota-Limit: 100
X-Monthly-Quota-Remaining: 58配额超限
当月度配额超限时,API返回402状态码:
{
"error": {
"code": "quota_exceeded",
"message": "Monthly quota exceeded. Upgrade your plan or wait for the next billing period."
}
}