I run a multi-provider LLM gateway in production (OpenAI, Anthropic, Google, DeepSeek and a dozen others behind one endpoint) with prepaid, per-token billing. Getting the metering correct took more iterations than the entire proxy itself. Here is what I wish someone had told me.

Source: [Dev.to](https://dev.to/kral-ai/billing-llm-usage-per-token-the-pitfalls-nobody-warns-you-about-oge)

Sponsored