Skip to content

OpenRouter 402 Insufficient Credits for Jev

Last checked · Independent guide, not affiliated with TypeSafe AI

ANSWER

OpenRouter returns HTTP 402 with 'Insufficient credits. Add more using https://openrouter.ai/credits' when your account balance cannot pay for the request. Jev (typesafe/jev-1.13) has no free tier on OpenRouter, so a new account needs credits before the first call. A few dollars covers tens of thousands of typical Jev requests.

OpenRouter’s API reference for the Decisions endpoint documents the 402 response like this:

HTTP 402
{
"error": {
"code": 402,
"message": "Insufficient credits. Add more using https://openrouter.ai/credits"
}
}

OpenRouter describes 402 as “Payment Required”: insufficient credits or quota to complete the request.

  • No free tier. Some models on OpenRouter have free variants. Jev does not; it is billed at $0.042 per million input tokens and $0 for output, so every call needs a positive balance.
  • A new account. OpenRouter accounts start with no credit unless you add some.
  • A spending limit on the key. OpenRouter lets you cap how much an individual API key may spend. A key that has reached its cap can fail even when the account still has money. Check the key’s limit as well as the account balance.
  1. Add credits at openrouter.ai/credits.
  2. If the account has credit but the error continues, check the spending limit on the specific key you are using, or create a new key.
  3. Retry the request. A 402 is not temporary, so automatic retries will not help until the balance changes.

Very little. At Jev’s price, a request with a short message and three questions (about 450 input tokens in our tests on TypeSafe’s API) costs about $0.000019. OpenRouter’s documented example, 476 input tokens, costs $0.000019992. Five dollars of credit covers roughly 250,000 requests of that size, a little less after the payment fees OpenRouter adds when you buy credits.

Each OpenRouter response includes usage.cost, so you can track spending per call.

Sources

  1. Submit a Decisions request: 402 response (OpenRouter API reference)
  2. Jev 1.13 on OpenRouter: pricing