Home · Designing an AI Gateway for Enterprises · Part 2 of 17
Nobody can tell you who spent what
Why AI access needs a front door, and a control room beside it.
Give a team access to a large language model and the first week goes well. In the second week somebody asks a simple question: who is using this, and how much?
Nobody knows. The keys were shared in a chat. The spend arrives on one invoice. And when a request fails, the user sees an error while you see nothing at all.
Three questions every AI platform eventually faces
- Who? Which person, which team, which application.
- How much? In money, not just in tokens.
- What went wrong? Which part of the journey, and why.
If your setup can't answer these on a Monday morning, you don't have a platform. You have a shared password.
These aren't exotic questions. Each one comes from a real meeting: a finance lead who wants an invoice explained, a manager who wants to know whether a team's usage is healthy, an engineer who wants to know why their request failed. The product exists to answer all three from one place, in the language each person already uses.
The front door
A gateway is a single, deliberate entry point. Every request passes through it, which makes it the one place that can know who asked, apply a rule, and write down what happened. Everything else in this series is about making that one place trustworthy.
One product, two halves
I didn't build a gateway and then bolt a dashboard onto it. I built one product with two halves. The gateway is the door: it decides, in the moment, whether a request goes through. The portal is the control room: it tells you what happened, lets you change the rules, and shows whether the whole thing is healthy.
Neither half is much use alone. A door with no control room is a black box that happens to work. A control room with no door is a dashboard about nothing. Every post in this series is about one half, or about the join between them, and I'll keep calling it one product because that's how it behaves.
What it's built on
Four building blocks carry most of the weight, and I'll name them once so I don't have to again:
- Azure API Management is the door.
- Microsoft Foundry is where the models live.
- Azure Container Apps runs the control room.
- PostgreSQL remembers what happened.
The real picture has more parts than that. These are the ones that matter for the story.
Who walks through the door
The people on the other side aren't using one tool. They're using Claude Desktop, Claude Code, GitHub Copilot in VS Code, OpenAI Codex, and applications that call the models with an API key. Same company, same budget, very different habits. A front door that suits only one of them isn't a front door, it's a side door. A later post is about serving all of them as one.
What a gateway is not
It isn't a proxy that forwards bytes. Forwarding is the easy part. The value is in the decisions made while the request passes through: should this person be allowed, what will it cost, what do we record? And it isn't a dashboard either. A dashboard describes the past. A gateway with a control room changes the next request.
If you can't name the person behind a request, you can't govern it, bill it, or help them when it breaks.
Want to discuss this? Connect with me on LinkedIn.
Next: one door for every kind of consumer.