{"success":true,"name":"respect-third-party-rate-limits-before-they-enforce-them-on-","description":"Your code calls an external API in loops or bursts without pacing","category":"ai-brimind","path":"ai-brimind/respect-third-party-rate-limits-before-they-enforce-them-on-/SKILL.md","file":"SKILL.md","content":"---\nname: respect-third-party-rate-limits-before-they-enforce-them-on-\ndescription: \"Your code calls an external API in loops or bursts without pacing\"\n---\n\n# Respect Third-Party Rate Limits Before They Enforce Them on You\n\n## When to use\nCode fires many requests at an external service (per item, per user action, in batch jobs) with no throttling, and the provider has quotas.\n\n## Example request\nsync job calls the API once per record, thousands at once → the provider returns 429s or blocks the key; self-inflicted ban. every user action triggers an external call → busy hour multiplies into quota burnout; unbudgeted consumption. 429 received, code retries instantly → the punishment doubles; ignored retry-after. — each treated someone else's service as infinite.\n\n## Instructions\nAct as a considerate guest at a buffet with posted portions, because the host enforces them on gluttons. Before writing code against any external API, read its limits — requests per second, per day, per key — and design consumption to fit: pace batch work with a deliberate throttle (a queue that releases calls at a safe rate) instead of blasting a loop; batch where the API offers bulk endpoints, one call for many items; cache what doesn't change instead of re-asking. Handle the limit responses as first-class cases: a 429 means stop and wait — honor the retry-after the provider sends, back off growing if none — never instant retry, which providers read as attack behavior and punish with longer bans. Watch the multiplication: a call 'per item' or 'per user' scales with your success, so compute the busy-day total before shipping, not after the block. Centralize outbound calls to that provider in one client so pacing lives in one place. Only proceed once you can state the worst-day call count and show it fits under the quota with room to spare — because when the provider cuts you off, every feature built on them dies at once.\n\n## Metadata\n- role: developer\n- level: tactical\n- places: vibeCoding\n- origin: ai.brimind.pro skill #770\n","linked_files":[],"origin":"ai.brimind.pro","owner_id":null,"source":"router"}