llm
resource_error
ai_generated
true
openai.RateLimitError: You exceeded your current quota, please check your plan and billing details.
ID: llm/embeddings-api-quota-exceeded
85%Fix Rate
88%Confidence
1Evidence
2023-06-15First Seen
Version Compatibility
| Version | Status | Introduced | Deprecated | Notes |
|---|---|---|---|---|
| openai>=1.0.0 | active | — | — | — |
| openai==0.28.0 | active | — | — | — |
Root Cause
The API usage has exceeded the paid tier's token or request quota for the billing period, or the account has insufficient credits.
generic中文
API使用量已超出当前付费层的令牌数或请求配额,或账户余额不足。
Official Documentation
https://platform.openai.com/docs/guides/error-codes/api-errorsWorkarounds
-
90% success Check billing dashboard at https://platform.openai.com/account/billing and add funds or upgrade plan. Then monitor usage via API: import openai usage = openai.Usage.retrieve() print(usage)
Check billing dashboard at https://platform.openai.com/account/billing and add funds or upgrade plan. Then monitor usage via API: import openai usage = openai.Usage.retrieve() print(usage)
-
80% success Implement a fallback to a different embedding model or provider when quota is exceeded: if 'quota' in str(e): model = 'text-embedding-ada-002' # Fallback to cheaper model response = openai.Embedding.create(input=text, model=model)
Implement a fallback to a different embedding model or provider when quota is exceeded: if 'quota' in str(e): model = 'text-embedding-ada-002' # Fallback to cheaper model response = openai.Embedding.create(input=text, model=model)
中文步骤
在https://platform.openai.com/account/billing检查账单仪表板并添加资金或升级套餐。然后通过API监控使用量: import openai usage = openai.Usage.retrieve() print(usage)
当超出配额时,实现回退到不同的嵌入模型或提供商: if 'quota' in str(e): model = 'text-embedding-ada-002' # 回退到更便宜的模型 response = openai.Embedding.create(input=text, model=model)
Dead Ends
Common approaches that don't work:
-
70% fail
The error is a quota exhaustion, not a rate limit. Retrying will keep failing until the billing period resets or more credits are added.
-
50% fail
The quota is based on total usage, not request size. Reducing batch size doesn't help if the total quota is exhausted.