Read rate-limit headroom from API response headers
Which providers send remaining-requests headers, which send credit headers, and which send nothing, so you know before the 429.
x-ratelimit-remaining-requests and -tokens, Anthropic sends anthropic-ratelimit-requests-remaining and -tokens-remaining, and data providers like People Data Labs and LeadMagic send credit headers too. 20 of 28 common APIs send no rate-limit header at all, including Gemini, Perplexity and DeepSeek.Headers by provider
| Provider | Rate-limit headers | Credit headers |
|---|---|---|
| Anthropic | anthropic-ratelimit-tokens-remaining, anthropic-ratelimit-requests-remaining | None |
| Apify | None | None |
| Apollo.io | None | None |
| Bright Data | None | None |
| Coresignal | None | x-credits-remaining |
| Crunchbase | None | None |
| Crustdata | x-ratelimit-limit, x-ratelimit-remaining, x-ratelimit-reset | None |
| DeepSeek | None | None |
| Exa | None | None |
| Firecrawl | None | None |
| Google Gemini | None | None |
| Google Places | None | None |
| HubSpot Breeze | None | None |
| Hunter.io | None | None |
| Instantly | None | None |
| LeadMagic | RateLimit-Remaining | X-Credits-Remaining, X-Credits-Cost |
| MillionVerifier | None | None |
| OpenAI | x-ratelimit-remaining-requests, x-ratelimit-remaining-tokens | None |
| OpenRouter | X-RateLimit-Limit, X-RateLimit-Remaining | None |
| Parallel | None | None |
| People Data Labs | x-ratelimit-remaining | x-call-credits-spent, x-totallimit-remaining, x-totallimit-overages-remaining |
| Perplexity | None | None |
| Postmark | None | None |
| Prospeo | None | None |
| SecurityTrails | None | None |
| SendGrid | None | None |
| Tavily | retry-after | None |
| WhoisXML API | X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset | None |
Capture them at your egress
The only way to see headroom is to read it off responses as they come back. A fetch wrapper does it in one place:
const watched = ["x-ratelimit-remaining-requests", "anthropic-ratelimit-requests-remaining",
"x-ratelimit-remaining", "x-credits-remaining", "x-totallimit-remaining"];
const original = globalThis.fetch;
globalThis.fetch = async (input, init) => {
const res = await original(input, init);
const host = new URL(input instanceof Request ? input.url : String(input)).host;
for (const h of watched) {
const v = res.headers.get(h);
if (v !== null) record(host, h, Number(v)); // your metrics sink
}
return res;
};The Argus SDK is this wrapper with every provider's header names built in, and it never reads bodies or auth headers. Argus turns the readings into headroom per provider, raises rate_limit_low at 10% or less, and answers get_rate_limit_status for your coding agent over MCP.
For providers that send nothing
Count your own requests per window against the published limit on each integration page, and treat the 429 rate as the signal. A rising 429 rate is the warning those providers won't give you.
Questions
- Which OpenAI headers show remaining rate limit?
- x-ratelimit-remaining-requests and x-ratelimit-remaining-tokens, on every API response.
- Which Anthropic headers show remaining rate limit?
- anthropic-ratelimit-requests-remaining and anthropic-ratelimit-tokens-remaining, on every API response.
- Does Gemini send rate-limit headers?
- No. Gemini responses carry no rate-limit headers; limits are per model and tier and only visible in the console. You find out with a 429 RESOURCE_EXHAUSTED.
Related
The status code and error each provider returns at zero balance. Several look like rate limits or bad keys, so they get retried instead of fixed.
Give Claude Code, Cursor or Codex a read-only view of every metered API you build with, so it can check what a run cost, spot a leak, and notice a provider running dry.
Connect a provider key, point Claude Code or Cursor at the Argus MCP server, and ask what the last run cost.