Using the API

Errors and rate limits


Our API follows a predictable HTTP error code format:

  • 400 - Invalid request: there was an issue with the format or content of your request.
  • 401 - Unauthorized: there's an issue with your API key.
  • 403 - Forbidden: your API key does not have permission to use the specified resource.
  • 429 - Your account has hit a rate limit.
  • 500 - An unexpected error has occurred internal to Anthropic's systems.

On any error we return a JSON object with an "error" key describing the issue. When using a streaming response via SSE, it's possible that an error can occur after returning a 200 response, in which case error handling wouldn't follow these standard mechanisms.

Rate limits

Our rate limits are currently measured in number of concurrent requests, and will default to 1 while you're evaluating the API. If you exceed the rate limit you will get a 429 error. If you'd like to upgrade your API keys and raise your rate limit, contact

Was this page helpful?