Skip to main content
Send a bad call and see what an error looks like. No key needed.
Every error has this shape, and a failed call costs nothing. Read retryable before you do anything else.

Decide what to do

Every code is listed in Errors.

A retry loop

Common cases

  • 401 unauthorized means the key is missing or wrong. Send Authorization: Bearer <key>.
  • 402 insufficientCredits means your balance is too low. The error says how many credits the call needs and how many you have. Add credits and try again.
  • 429 rateLimited or tooManyInFlight means you are over your rate limits. Wait, then retry.
  • 400 invalidRequest means the input is not valid. The message names the field. Check the endpoint’s input in the API reference.
  • 404 notFound means the thing you asked for does not exist. Don’t retry.

Timeouts

Every call answers or fails within 25 seconds. Set your client timeout a little above that, such as 30 seconds.