XuanShu API

How should I retry 429 and 5xx errors?

Use bounded exponential backoff with jitter for 429 and retryable 5xx responses.

Last verified:

How should I retry 429 and 5xx errors?

Use bounded exponential backoff with jitter for 429 and retryable 5xx responses.

Steps

  1. Read the status, Retry-After, and request ID.
  2. Retry only idempotent or safely replayable requests.
  3. After the limit, degrade, queue, or investigate manually.

Limits and exceptions

A streaming interruption or non-idempotent tool call may already have partial output and cost; never replay forever.