All providers
"Request too large" / "Payload too large" (413) — trimming an oversized request
Matches these upstream messages
request too largepayload too large
What you actually see
HTTP 413 Payload Too Large
{"error":{"message":"Request body too large"}}What does "request too large" mean?
The HTTP body exceeded the provider's size cap. This is a transport limit measured in bytes, which is not the same thing as the model's token context window — you can trip it with a large attachment even on a short conversation.
Why does it happen?
Base64 images, long file attachments, or a large tool-result payload being sent back into the conversation.
How do I fix it?
Shrink or resize attached images before sending them.
Send a summary of a large tool result instead of the raw output.
Split the work into several turns rather than one very large one.
Is it really this error?
These get mistaken for each other, and chasing the wrong one is where the time goes.
Looks like: Context length exceeded.
Actually: This is bytes on the wire, not tokens in the window. A single base64 image can trip it during an otherwise short conversation.
What will not fix it
Reasonable-sounding fixes that do not apply here — worth ruling out before you spend an afternoon on them.
Trimming the conversation history.
If one attachment is the bulk of the body, removing text barely moves the total.
What kRouter does automatically
It does NOT try your other accounts, because the same request would fail identically on all of them — the error is returned to you straight away instead of burning every credential you have.
Stop hitting this error
kRouter routes your AI coding tools across every provider and account you own, so a limit on one does not stop your work. It is free, MIT-licensed and runs on your machine.
Install kRouter