Skip to main content
The Supertone API uses standard HTTP status codes. Errors return a JSON body describing the problem, and the SDKs surface them as typed exceptions you can catch and handle.

Status code reference

SDK error classes

Both SDKs map each status code to a typed error class. Catching the specific class is cleaner than parsing strings.
Every SDK error exposes:

What to do with each error

4xx — your side

5xx — our side

Common pitfalls

  • Content-Type: application/json missing on POST requests results in 400.
  • API key with leading/trailing whitespace (often from copy-paste) results in 401.
  • Calling a custom voice from a different account results in 403, even if you “know” the ID.
  • Sending text over 300 characters to the raw API results in 400. Use an SDK to auto-chunk longer text.

Retries and backoff

The right retry policy for 429 and 5xx.

Rate limits

Limits by account tier.