FreightCake

Handle Rate Limits

Respect FreightCake API request limits and retry 429 responses safely.

FreightCake applies a one-minute sliding-window limit per API key. The limit depends on the organization's plan.

PlanRequests per minute
Free100
Pro1,000
Enterprise10,000

Rate-Limited Response

A limited request returns 429 Too Many Requests with a rate_limit_error envelope and a Retry-After header.

{
  "error": {
    "type": "rate_limit_error",
    "message": "Too many requests"
  }
}

Retry Strategy

  1. Read Retry-After.
  2. Wait at least that many seconds.
  3. Retry idempotent requests with exponential backoff and jitter.
  4. Reuse the same Idempotency-Key when retrying a mutation.

The TypeScript SDK retries 429 and 5xx responses up to maxRetries times by default.

const freightcake = new FreightCake({
  apiKey: process.env.FREIGHTCAKE_API_KEY!,
  maxRetries: 3,
})

On this page