Effect CommunityEC
Effect Community2mo ago
3 replies
Izak Filmalter

How to Handle Rate Limit Errors in API Requests

What is the right move for dealing with rate limit errors?
HttpResponseError: StatusCode: {"error":{"message":"Rate limit reached for text-embedding-3-small in organization org-xxxx on tokens per min (TPM): Limit 1000000, Used 967202, Requested 44360. Please try again in 693ms. Visit https://platform.openai.com/account/rate-limits to learn more.","type":"tokens","param":null,"code":"rate_limit_exceeded"}} (429 POST https://api.openai.com/v1/embeddings)
  
  Rate Limited - Implement exponential backoff or reduce request frequency.
  
  Response Body: {
    "error": {
      "message": "Rate limit reached for text-embedding-3-small in organization org-xxxxx on tokens per min (TPM): Limit 1000000, Used 967202, Requested 44360. Please try again in 693ms. Visit https://platform.openai.com/account/rate-limits to learn more.",
      "type": "tokens",
      "param": null,
      "code": "rate_limit_exceeded"
    }
  }
Was this page helpful?