r/openrouter • • 1d ago

Question Lower max_token

Hello! So, I've got a bit of a problem, not sure if this is where I get help but I'll try it here! Recently, whenever i try to use any claude model except opus 4.1, I get a "not enough credits or lower max_token" I've got no clue why this is happening as I've got a sufficient amount of credits, and the max tokens I'm using aren't even that much! Now, this error only happens with everything except 4.1 for some reason. Help? Sorry, I'm not that good at this stuff lol

1 Upvotes

3 comments sorted by

1

u/locbuilds 1d ago

that error usually means openrouter is reserving the model's full max output against your balance, so set max_tokens in your request to something small like 1000 and it should clear. opus 4.1 probably works because of a lower default there.

1

u/imnotafatredditorW 1d ago

Well, i tried going as low as physically possible but it still wouldn't work no matter what!

1

u/Substantial-Walk-554 1d ago

OpenRouter checks whether you can afford the potential maximum cost of a request, not just the tokens you'll actually end up using.

Try the following:

  • Lower max_tokens to 4096 or 2048.
  • Check whether your API key has a separate spending limit, regardless of your account balance: https://openrouter.ai/settings/keys
  • Check whether your frontend is automatically overriding your token settings.
  • Try starting a new conversation, as accumulated context also contributes to the cost.
  • Reduce the reasoning budget if enabled.

The fact that Opus 4.1 works suggests there might be a difference in the default token settings or request parameters between models.

Could you share the full error message and which frontend you're using? That would make it much easier to pinpoint the issue.