OpenRouter max_tokens error

Hey all, I’m getting the error below even though my OpenRouter account has funds and does not have a token limit set as far as I can tell. I have used the account for much larger requests than the one I’m currently processing but for some reason it’s giving me this output. Not sure why this is happening!

ERROR: This request requires more credits, or fewer max_tokens. You requested up to 65536 tokens, but can only afford 51722. To increase, visit Sign In | OpenRouter and create a key with a higher total limit

What is the error message (if any)?

Please share your workflow

Information on your n8n setup

  • n8n version

    2.4.8 (Cloud)

    Time

    2/19/2026, 4:53:18 PM

  • Database : Supabase

  • n8n EXECUTIONS_PROCESS setting (default: own, main):

  • Running n8n via n8n cloud

  • Operating system: Mac OS

That worked! Thanks. Any advice on if I should make this Token limit 8000 vs 50000. Is this limiting the depth of the answer? I’m still not sure why the issue has only just come up

Hi, it worked but then the next day it gives a new error: Payment required - perhaps check your payment details?

This request requires more credits, or fewer max_tokens. You requested up to 8000 tokens, but can only afford 7786. To increase, visit https://openrouter.ai/settings/keys and create a key with a higher total limit… but the key has lots of space left. I created a new key and tried again and it’s the same issue. No clue what’s going on to cause this. I’ve tried with different models within Open Router too.

It works if I set the limit to <7786 — but why is this even occurring? I don’t want it to keep coming up and breaking my automation requiring me to go in and adjust the max_tokens