Menu

1 / 4

Who Is Paying for This? Token Metering at the LLM Gateway

DEV Community: azure·Manoj Kumar Kagitha·about 7 hours ago
#B3GPqL7r
#devtoazure#devto#dev#team#metering
Reading 0:00
15s threshold

Once you put a large language model behind a company API gateway, someone asks a simple question.

Who is paying for this?

The model bill arrives as one number. Finance sees one number. Every team in the company sees one endpoint. Nobody can tell you which team burned forty percent of the budget, which use case is growing, or which experiment someone forgot to shut off six weeks ago. That gap between one bill and one endpoint is where metering lives.

We built metering into our LLM gateway before we scaled usage, and it changed how teams behaved. Here is what we learned.

Why LLM metering is not like API metering

With a normal REST API, metering is easy. One request costs one request. You count requests per subscription key, and you are done.

LLM calls do not work that way. One request to a chat endpoint can cost five tokens or five thousand. A prompt injection test script someone ran in a loop overnight can spend more than an entire product team's monthly budget in eight hours.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.