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 capacityThe 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
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 ↗.