Skip to main content
Every error has the same shape, and failed calls cost nothing.

Decide what to do

The full list of codes is in Errors.

A retry loop

Common cases

  • 401 unauthorized: the key is missing or wrong. Check the Authorization: Bearer <key> header.
  • 402 insufficientCredits: your balance is too low. Nothing was charged. Top up and try again.
  • 429 rateLimited or tooManyInFlight: you are over your rate limits. Wait, then retry.
  • 400 invalidRequest: the input is not valid. The message names the field. Check the endpoint’s input in the API reference.

Timeouts

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