Skip to content
Field note 01Published Aug 31, 2026

What an API key can actually tell you

A key is not a tiny account database. It is an opaque credential that lets a provider look up an account, apply policy, and return a small, provider-specific slice of that account's state.

Identity

Does the credential authenticate, and what can it access?

Entitlement

Which models, tiers and free allowances apply?

Meter

What has been used, and what limit remains?

Capacity

Can the service accept work right now?

The request-to-status flow

user gives key
      ↓
provider adapter selects the right base URL and auth format
      ↓
safe metadata request: /key, /models, or a provider health endpoint
      ↓
HTTP status + response headers + JSON body
      ↓
normalize into: valid · tier · models · usage · limits · reset · unknowns
      ↓
display provider-reported facts separately from observed capacity

The adapter is the important part. There is no universal API for “balance” or “remaining capacity”; each provider chooses its own endpoint, header names, scopes and refresh behavior.

What the major providers expose

ProviderUseful response headersAccount APIs / surfacesKey can revealStill unknown
OpenRouterX-Generation-Id; optional cache and router metadataGET /api/v1/key; /api/v1/credits; management analyticsFree-tier flag, key usage, configured limit, remaining limit, expiry and BYOK usageLive provider capacity
OpenAIx-request-id; x-ratelimit-*; openai-organization; openai-processing-msOrganization Usage and Costs APIsAccessible models and per-response request/token limitsBilling history from an ordinary inference key
Anthropicanthropic-ratelimit-*; retry-after; workspace ID where availableRate Limits API and Admin usage reportsRequest, total-token and input-token limits and remaining amountsGuaranteed minimum serving capacity
Google GeminiNo universal remaining-quota header is documentedGoogle AI Studio and Cloud quota/billing surfacesProject-scoped model access and response usage metadataExact quota and live capacity from the key alone
Groqx-ratelimit-*; retry-after; 498 for Flex capacity exhaustionConsole Limits, Projects, Billing and metricsRemaining request and token limits in inference responsesOrganization billing without account permissions
MistralX-RateLimit-Remaining; 429 on request/token limit exhaustionAdmin rate-limit and spend-limit APIsObserved remaining limit and response usage where returnedFull organization limits from a normal key
FireworksX-Ratelimit-Limit-Tokens-Prompt; fireworks-* token headersAccount and project consolePrompt and cached-prompt token counts plus prompt-token limitA complete monetary balance in the inference response
Together AINo universal remaining-limit header prominently documentedProject and organization usage/cost analyticsProject scope, accessible models and response usagePer-key spend or rate cap; limits are organization-level
OpenCode ZenStructured status and usage responses; no stable public quota-header contractZen console, credits, auto-reload and workspace/member limitsGateway model access and request usageLive shared capacity or upstream provider identity unless exposed by the route
DeepSeekHTTP status and usage; balance/concurrency failures are primarily error-body signalsAccount billing and usage consoleModel access, request success and token usageA documented live-balance endpoint or stable limit-header scheme
NVIDIA NIMDeployment-specific; health and metrics endpoints are more important than quota headersNVIDIA cloud account or local deployment configurationIf self-hosted: liveness, readiness, metadata and Prometheus metricsOne quota policy covering hosted and self-hosted NIM
ElevenLabscharacter-cost, request-id and x-trace-idSubscription character allowance, reset and concurrency settingsAudio generation cost in characters and request correlationUSD cost without applying the account’s authoritative plan rate
DeepgramRequest IDs and typed service/model/region concurrency errorsProject usage, billing and concurrency configurationAudio request success, model/service and usage where returnedToken-style limits; audio is usually measured in duration and concurrency
Cartesia / Fish AudioProvider-specific request IDs and structured concurrency or wallet errorsConsole wallet, package allowance or concurrency settingsAudio request outcome and provider usage unitsThat credits or characters represent USD without a plan-specific conversion

Provider-reported

Limits and balances

Use an endpoint or header when the provider supplies one. Attach a timestamp and scope: key, project, workspace or organization.

Observed

A successful request

Record model, provider, latency, status, usage and generation ID. This describes what just happened, not a reservation.

Unknown

Live capacity

A 200 proves one request worked. It does not reveal how much shared GPU capacity remains five seconds later.

Implementation rule

Never label a model “free” only because its catalog price is zero. Check account entitlement, quota, reset policy and billing scope. Never label a provider “available” only because its model list contains the model.

Primary references: OpenRouter, OpenAI, Anthropic, Gemini, Groq, Mistral, OpenCode Zen, NVIDIA NIM, ElevenLabs.