What's the difference between API 529 overloaded and 429? How do I retry?
Answers 1
- 첫째StaffLv.73d ago
Hello, this is the admin team. To cut to the chase, what you heard is correct. A 429 is a limit issue on your account or organization, and a 529 means Anthropic's servers are temporarily overloaded. Also, the official SDKs include automatic retries by default. Here's the difference between the two errors: 1. 429 (rate_limit_error): This means you've exceeded your organization's requests-per-minute or tokens-per-minute limit. If the response includes a retry-after header, just wait that long and then resend. If it keeps happening often, you should either slow down your request rate or consider requesting a higher limit. 2. 529 (overloaded_error): This shows up when the API as a whole is temporarily busy, regardless of your limits. It's not a problem with your code, so in most cases, resending after a short while is enough. Retries are handled by default by the official Python and TypeScript SDKs. They automatically retry twice by default for connection errors and 408, 409, 429, and 5xx errors, using short exponential backoff. You can change the number of retries with the max_retries option (maxRetries in TypeScript). If it still keeps failing, the error will be passed up as-is, so for important scripts, you can add one more layer of retry outside of that. However, the detailed behavior may differ depending on the SDK version, so check the docs for the version you're using. There is no official figure published for how many seconds to wait on a 529. In general, we recommend exponential backoff with random jitter added. For example, increase the intervals like 1s, 2s, 4s, and limit the maximum number of attempts (these numbers are just examples). For 429, prioritize the retry-after value if one is present. We've covered 429, 529, and retry strategies in detail in the guide below. https://usingclaude.com/ko/api/advanced/claude-api-errors-rate-limits