默认限制
默认情况下,每个 API 密钥允许:- 每 10 秒最多 20 个新请求
- 支持 100+ 个并发任务同时运行
按密钥配置
在创建或更新 API 密钥时,你可以设置自定义限制:
这三项限制均独立执行。只要超出其中任意一项限制,请求就会被拒绝。
触发限制时
超出速率限制的请求会被拒绝,并返回:额度限制(安全消费)
除速率限制外,你还可以为每个密钥设置基于额度的上限:
这些设置有助于在密钥泄露或被滥用时防止成本失控。
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
了解并配置 API 密钥的速率限制。
| Field | Description |
|---|---|
rate_limit_rpm | 每分钟最大请求数 |
rate_limit_tph | 每小时最大请求数 |
rate_limit_tpd | 每天最大请求数 |
HTTP 429 Too Many Requests
{ "code": 429, "message": "Rate limit exceeded" }
| Field | Description |
|---|---|
hourly_credit_limit | 每小时最大消耗额度 |
daily_credit_limit | 每天最大消耗额度 |
total_credit_limit | 该密钥的终身上限 |