OpenRouter insufficient credits
OpenRouter 402: Insufficient Credits
TL;DR: OpenRouter 402 is a billing or credits problem. The model endpoint may be healthy, but your account cannot pay for the request.
What this error means
OpenRouter 402 means the request cannot be billed because the account lacks credits, has a payment issue, or is blocked by spend controls.
billing your key or account
Is it code, key, rate limit, or server-side?
| Signal | Diagnosis |
|---|---|
| Provider | OpenRouter |
| Error | 402 |
| Likely category | billing |
| Likely fault area | your key or account |
Immediate checklist
- Check OpenRouter account credits and payment status.
- Verify the API key belongs to the account you funded.
- Confirm the selected model price fits your remaining balance.
- Look for app-level spend caps or budget guards in your own code.
cURL test command
curl https://openrouter.ai/api/v1/models \ -H "Authorization: Bearer $OPENROUTER_API_KEY"
Run this from your server or terminal. llmping does not collect API keys and does not send this command for you.
Common fixes
- Add credits or switch to a cheaper model for background jobs.
- Use a preflight account/balance check before starting expensive batch work.
- Keep billing errors separate from retryable provider errors.
- Alert on 402 immediately because retries will not fix missing credits.