Q&A: 429 Too Many Requests — who exactly is rate-limiting you
A 429 can come from upstream limits, gateway limits, or a spend cap. Read Retry-After and the rate-limit headers first to find the bottleneck, then decide: wait, slow down, or top up.
Entry-level questions and plain-language concepts.
A 429 can come from upstream limits, gateway limits, or a spend cap. Read Retry-After and the rate-limit headers first to find the bottleneck, then decide: wait, slow down, or top up.
Classify 400, 401, 403, 404, 413, 429 and 5xx before fixing, slowing down, funding or waiting.
A token is not a character count; English approximations do not transfer mechanically to Chinese, and history/tools consume budget.
Use the API root as base_url; do not duplicate /v1 or put a resource path in it.
The first request should validate auth, path, model, response and usage before tools or long history.
The window includes input, history, tools and output; max_tokens is an output budget, not extra space.
The SalpX gateway is OpenAI-SDK compatible. Point base_url at https://www.salpx.com/v1 and you are done.