Skip to content

Rate limits

Lane.Chat rate-limits requests with fixed windows generous enough that normal usage — including busy widgets and high-traffic apps — never gets near them. When a limit is exceeded the response is an HTTP 429 with a Retry-After header and rate-limit metadata (see Error codes).

The widget and the SDKs pace themselves; you don't need to do anything for them. The guidance below is for automated clients you build yourself.

Handling 429

  • Respect the Retry-After header (seconds) before retrying.
  • Use exponential backoff with jitter for automated clients.
  • Read X-RateLimit-Remaining to slow down before you hit the wall.
js
async function postWithRetry(url, body, headers, attempt = 0) {
  const res = await fetch(url, {
    method: 'POST',
    headers: { 'Content-Type': 'application/json', ...headers },
    body: JSON.stringify(body),
  })
  if (res.status === 429 && attempt < 5) {
    const wait = Number(res.headers.get('Retry-After') || 2 ** attempt)
    await new Promise((r) => setTimeout(r, wait * 1000))
    return postWithRetry(url, body, headers, attempt + 1)
  }
  return res.json()
}

Limits can change

These values reflect the current server configuration. Treat 429 + Retry-After as the source of truth in production rather than hard-coding assumptions.

Lane.Chat — AI customer support, multichannel CRM, and roleplay AI.