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 https://openrouter.ai/settings/keys 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

Reduce max_tokens (Quick Fix)

Set a lower max_tokens value in your OpenRouter node:

  1. Click on your Open Router node

  2. Go to Options → Maximum Tokens

  3. Set it to 50,000 or lower (to stay under your 51,722 limit)

This should work immediately without changing your API key.

Try this immediately:

  1. Edit your Open Router node

  2. Add under Options: Maximum Tokens = 8000

  3. Re-run your workflow

This should work right away since 8,000 < 51,722 (your current limit).

Does this help!

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

Glad that fixed it, set it to 8,000.

Kindly mark as the solution if it helped.

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