Denial of wallet is a denial of service attack aimed at your bill instead of your uptime.
It exists because inference is metered, so every request a stranger sends costs you real money.
Traditional denial of service tries to exhaust servers until the service stops responding.
Here the service keeps responding perfectly, and that is precisely what makes it hard to spot.
Availability monitoring stays green, latency looks normal, and no alert fires anywhere.
The first signal is very often the invoice at the end of the month.
Cost is driven by tokens, so an attacker maximises tokens rather than request count.
Very long inputs are the simplest lever, especially where retrieved documents are pasted into the prompt.
Prompts engineered to force long outputs multiply it further, since generated tokens usually cost more than input.
An agent is the worst case, because a single request can fan out into many model calls and tool calls.
Rate limit per authenticated user rather than per IP address, which an attacker rotates trivially.
Cap input and output tokens explicitly on every call instead of relying on provider defaults.
Bound agent loops with a maximum step count and a maximum spend for each task.
Set billing alerts and a hard ceiling at the provider, so the worst outcome is an outage rather than a debt.
Cache aggressively, because a repeated question answered from cache costs nothing at all.