# openai.RateLimitError: You exceeded your current quota, please check your plan and billing details.

- **ID:** `llm/embeddings-api-quota-exceeded`
- **Domain:** llm
- **Category:** resource_error
- **Verification:** ai_generated
- **Fix Rate:** 85%

## 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.

## Version Compatibility

| Version | Status | Introduced | Deprecated |
|---------|--------|------------|------------|
| openai>=1.0.0 | active | — | — |
| openai==0.28.0 | active | — | — |

## Workarounds

1. **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)** (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)
   ```
2. **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)** (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)
   ```

## Dead Ends

- **** — The error is a quota exhaustion, not a rate limit. Retrying will keep failing until the billing period resets or more credits are added. (70% fail)
- **** — The quota is based on total usage, not request size. Reducing batch size doesn't help if the total quota is exhausted. (50% fail)
