DEV Community

John Medina
John Medina

Posted on

Don't Trust OpenAI's Billing Alerts Alone

PLATAFORMA: Dev.to

You set a hard budget limit in your OpenAI dashboard. You think you're safe. Then at the end of the month, you get a bill for 2x what you expected.

Happens all the time. Saw a few devs complaining about it again this week.

The "hard limit" isn't hard. It's a notification threshold that can be minutes or even hours delayed. By the time it triggers and you get the email, a runaway script or a high-traffic feature could have already burned through a lot more cash.

The issue is that usage data isn't processed in real-time. It's batched. So the dashboard you're looking at is always slightly in the past.

It's not a bug, it's how their billing infra is designed. But it's a problem if you're bootstrapping or giving per-user access to an LLM feature. One user having a field day can blow your whole month's budget.

The only real fix is to monitor costs on your end, request-by-request.

I built a simple open-source tool, LLMeter (llmeter.org), to deal with this. It tracks costs as they happen and has its own alerting system that's much closer to real-time. It also helps attribute costs per-user or per-feature, which is something OpenAI's dash doesn't do.

fwiw, whatever you use, don't rely on the official billing alerts alone for cost protection. You'll get burned eventually.

Top comments (0)