Synapse
Esc
  • Docs
    Make your first request↵
  • Streaming
  • Function calling
  • Errors and rate limits
  • Pages
    Home
  • Models
  • Pricing and cost calculator
  • Rate limits by tier
  • Enterprise, SOC 2 and data retention
  • Changelog

docs · reference

Errors and rate limits

Every error has a JSON body with a stable code you can branch on, and a human-readable message you shouldn't.

Status codes#

StatusCodeWhat to do
400invalid_requestFix the request. The message names the field.
401invalid_api_keyCheck SYNAPSE_API_KEY is set and not revoked.
404model_not_foundCheck the model ID against the catalogue.
429rate_limitedBack off and retry after retry-after seconds.
500server_errorRetry with backoff. Check the status page if it persists.
503overloadedRetry with backoff, or fall back to a smaller model.

Rate-limit headers#

Every response tells you where you stand, so you can slow down before you're limited.

bash
x-ratelimit-limit-requests: 500
x-ratelimit-remaining-requests: 482
x-ratelimit-limit-tokens: 400000
x-ratelimit-remaining-tokens: 391220
retry-after: 2

Limits depend on your tier and apply across all models. See the rate limit table.

Retrying#

The SDKs retry 429, 500 and 503 twice with exponential backoff and jitter. To change that:

javascript
const client = new Synapse({ maxRetries: 5, timeout: 30_000 });