$1 a day: stay below your API key’s rate limits
01 / Start with a $1 daily target, not faster requests
On a tiny budget, your first goal is predictable spending. Use $1 per day as an example planning target, not a claim about what any model costs or a cap the provider automatically enforces. Rate limits control traffic; they do not necessarily control your bill.
CheapRelay is a pay-as-you-go AI API relay with no monthly fee or subscription. Billing follows real token usage, including cache reads and writes. That makes request size and retry behavior worth watching alongside request counts.
02 / Find the limits attached to your key
A per-key rate limit measures traffic associated with an API key. Two scripts using that key may compete for the same allowance. Limits can also exist at the account, model or upstream-provider level, so creating another key is not a reliable workaround.
Check the documented limits for your account and chosen model. Inspect response headers when available, but do not assume every route exposes the same information. The numbers below are hypothetical teaching examples, not CheapRelay’s published limits.
- ■ Requests per minute, or RPM: how many calls you can start within a defined window.
- ■ Tokens per minute, or TPM: the token traffic allowed within a window. The provider determines exactly what counts.
- ■ Concurrent requests: how many calls may remain in progress together.
03 / Turn 20 RPM into one request every four seconds
Suppose your key allows 20 RPM and 10,000 TPM. Sending one request every three seconds averages 20 RPM, leaving no headroom. Start instead with one every four seconds: about 15 requests per minute, or 75% of the request allowance.
If each call uses 600 counted tokens, 15 calls consume 9,000 tokens per minute. If calls grow to 900 tokens, that becomes 13,500, exceeding the hypothetical token allowance even though request frequency stays unchanged.
This arithmetic is a planning aid, not a guarantee. Providers may use rolling windows, burst restrictions or output-token reservations. Confirm their counting rules before treating your estimate as an enforcement boundary.
04 / Put one queue in front of the shared key
For a beginner, a queue with one active worker is easier to reason about than several independent scripts. Each job waits its turn. The worker checks the next permitted start time, sends the request, records usage and schedules the next job.
Keep the spacing rule even when responses finish quickly. One active request alone does not prevent excessive RPM: a fast response could otherwise trigger another call immediately. If several applications share your key, they need a shared limiter, not separate timers.
CheapRelay’s OpenAI-compatible routes use https://api.cheapapirelay.com/v1. When connecting an OpenAI SDK, configure the base URL and inspect its retry defaults before adding your own retry loop.
05 / Handle a 429 without paying for a retry storm
A 429 response signals rate limiting, but its message may identify a different constraint than you expected. Read it before retrying. Honor Retry-After when supplied. Otherwise, use increasing delays with a little randomness and a finite retry count.
For example, allow at most three retries, waiting roughly 2, 4 and 8 seconds when no server guidance is available. These are starter settings, not provider requirements. Avoid stacking SDK retries with application retries. For timeouts or ambiguous failures, remember that the server may already have processed the request; repeating it can duplicate work and cost.
06 / Track dollars separately from the traffic ceiling
Record request time, model, reported token usage, retries and estimated charge. Estimate charges using current prices for the relevant token categories, then reconcile against billed usage. Shorten prompts, trim unnecessary conversation history and set a reasonable output ceiling.
For the hypothetical $1 daily target, stop admitting jobs before reaching it and leave room for in-flight requests and delayed usage reporting. A local estimate is not a guaranteed billing cap.
Sign up for CheapRelay when you are ready to test with a small token budget. Start with one worker, inspect actual usage, and increase traffic only when both your rate allowance and spending target have room.
Sign up Try the prices yourself, sign-up credit included.
More reading
| Date | Aisle | Written in | Title |
|---|---|---|---|
| 2026-10-28 | API pipes and fittings | EN | $0 monthly: Go and Rust API clients A tiny-budget guide to sending OpenAI-compatible requests from Go and Rust without monthly fees or framework overhead. |
| 2026-10-28 | API pipes and fittings | EN | $1 Test Budget: OpenAI Node SDK Through a Relay Connect the OpenAI Node SDK to CheapRelay, make one small request, and estimate token costs before scaling beyond a $1 test budget. |
| 2026-10-28 | API pipes and fittings | EN | $0 Monthly Fee: Set Your Python SDK Base URL Configure the OpenAI Python SDK for CheapRelay, avoid doubled /v1 paths, and make a small first request without wasting tokens. |
| 2026-10-28 | API pipes and fittings | EN | $0 in extra software: rotate API keys safely A beginner-friendly API key rotation plan using overlapping credentials, a small test request, and a rollback window—without buying more tools. |
| 2026-10-28 | API pipes and fittings | EN | $2 Budget: Handle 401, 402 and 429 Without Waste A beginner’s guide to API errors: fix authentication, stop on payment issues, and retry rate limits without exhausting a tiny budget. |
| 2026-10-27 | API pipes and fittings | EN | $1 test budget: Anthropic Messages for OpenAI users Learn Anthropic’s Messages format, translate OpenAI chat requests, and keep your first API experiments within a $1 budget. |