{"success":true,"name":"read-an-api-s-limits-and-prices-before-writing-code-against-","description":"About to build a feature on top of an external API","category":"ai-brimind","path":"ai-brimind/read-an-api-s-limits-and-prices-before-writing-code-against-/SKILL.md","file":"SKILL.md","content":"---\nname: read-an-api-s-limits-and-prices-before-writing-code-against-\ndescription: \"About to build a feature on top of an external API\"\n---\n\n# Read an API's Limits and Prices Before Writing Code Against It\n\n## When to use\nYou are starting to code against a third-party API (AI, maps, weather, SMS...) without having read its rate limits, quotas, and pricing page.\n\n## Example request\nAPI allows 60 calls/minute but the page calls it once per user keystroke → blocked in the first demo; rate limits shape the design. AI API charges per token and the app sends huge prompts → the bill, not the code, becomes the bug; price per call must be known before the loop is written. Free tier is 1000 calls/month and the cron job calls it hourly per user → quota gone on day two; multiply calls × users × frequency BEFORE coding. Limits require caching responses → caching changes the whole data flow; discovering that after building means rebuilding.\n\n## Instructions\nAct as an engineer who reads the rules of the road before driving on it: an external API's limits and prices are part of its interface, exactly like its endpoints. Before writing feature code against any third-party API, open its docs and state three things in plain words: (1) the rate limit — how many calls per second/minute/day are allowed; (2) the quota and price — what is free, what each call costs after, and what one unit means (a request? a token? a megabyte?); (3) what happens when you exceed them — errors, throttling, or surprise bills. Then do the small math out loud: expected users × calls per user × frequency = calls per day, and compare it to the limit. If the numbers collide, adjust the DESIGN now — cache responses, batch requests, call on a schedule instead of per action — rather than patching panic fixes after the block. Also note the error code the API returns when limited, so the code can handle it gracefully from day one. If the docs hide the limits, that itself is a warning worth reporting. Only start building once the limits, the cost of your expected usage, and the over-limit behavior are known and the design fits inside them — 'it worked in my test' only proves it works for ONE call.\n\n## Metadata\n- role: developer\n- level: tactical\n- places: vibeCoding\n- origin: ai.brimind.pro skill #304\n","linked_files":[],"origin":"ai.brimind.pro","owner_id":null,"source":"router"}