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

  1. Check OpenRouter account credits and payment status.
  2. Verify the API key belongs to the account you funded.
  3. Confirm the selected model price fits your remaining balance.
  4. 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.

Run diagnosis

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.

Related errors

Markdown version

Optional site analytics

Allow anonymous usage counts with Umami. Error text, API keys, prompts and generated commands are never sent. The tools work with analytics off. Analytics settings

Optional Umami analytics is off.