LLM API 429 限流处理指南
OpenRouter Blog 发布指南,介绍如何诊断和处理 OpenAI、Anthropic 与 OpenRouter 返回的 429 Too Many Requests 错误。指南建议读取限流响应头,在服务端指定的重置时间重试,或使用模型回退和跨提供商路由;Python 与 TypeScript 示例均通过 OpenRouter API 测试。
OpenRouter 的测试显示,OpenAI Python SDK 的默认重试后,60 个请求仍有 23 个失败;遵循重置响应头重试、模型回退和提供商故障转移则完成了测试工作负载,未报告失败。
LLM API Rate Limits: How to Fix OpenAI and Claude 429 Errors
OpenRouter ·11/11/2026


A 429 Too Many Requests error means you sent more requests or tokens than your limit allows in the current time window. OpenAI, Anthropic and OpenRouter all return it, and it usually shows up the first time an app runs under real load or a batch job fans out across several workers.
Most people reach for a retry, and with default settings that often isn’t enough. When we ran a 60-prompt batch through the OpenAI Python SDK against a per-minute limit, 23 requests still failed after the SDK’s retries. The window reset 4 to 8 seconds after the SDK gave up on each one.