Skip to content

Why FoundryGate?

In plain words

Your company runs AI models in Microsoft’s cloud, and developers use them through tools on their laptops. The problem: out of the box there’s no way to give each developer their own key, their own monthly budget, or their own usage meter — it’s one shared pool, and one person can drain it for everyone. FoundryGate fixes that. Each developer automatically gets a personal key and a monthly AI budget; every request is counted; when the budget runs out, requests stop instantly; and asking for more is one click to request, one click to approve. Budgets come in a few set sizes — a standard one, a bigger one for heavy users, and unlimited — so “more” means moving up a size, not haggling over a number.

The rest of this page explains the same idea in more technical terms. For the next level of detail, see the system overview, or the whole system in one picture.

What happens to one request

Here is the entire life of a single request, from the developer’s terminal to the model and back. The tier numbers are read out of the infrastructure at build time, so they are whatever the deployment actually enforces.

  1. 1 The tool sends a request Claude Code or Codex CLI, with the developer's own key in the header it already sends.
  2. 2 Whose key is this? The key belongs to exactly one of 3 plans — an APIM subscription scoped to that plan's product. No plan, no service.
  3. 3 Is this model allowed here? Each plan names the models it carries — 4 short model names across the plans. Anything else is refused before it costs a token.
  4. 4 Is there budget left? Two counters, both on this developer alone: 20K–100K tokens a minute, and the monthly budget their plan carries.
  5. 5 The model answers Sent on to an Azure AI Foundry account — the nearest region first, another region if that one is busy. No account keys are involved.

…and one of three answers comes back, decided right there:

200 Answered Headers come back saying what it cost and what is left.
429 Slow down Too fast this minute. Retry-After tells the tool how long to wait; it waits by itself.
403 Stopped Monthly budget spent, or a model this plan does not carry. It says which, and when it comes back.
Every one of those checks happens at the gate, on the request itself — nothing is decided after the fact, and no database is asked.

The gap, technically

Azure AI Foundry is excellent at what it does: hosting model deployments and exposing them through Azure API Management. But when you move from a single team’s prototype to an org-wide AI platform, you hit a wall — Foundry was designed for deployment management, not developer access governance.

What Foundry gives you out of the box

When you set up Azure AI Foundry with APIM today, you get:

  • Deployment-level TPM/RPM limits — throttling that applies to all callers combined, not per user
  • Azure RBAC — coarse-grained roles: Cognitive Services User gets access to everything, or nothing
  • A shared API key or Entra auth — either one key that all developers share (no attribution), or RBAC that grants blanket access with no quota
  • Azure Monitor metrics — aggregate token consumption across the deployment, not broken down by who consumed what

That works fine when you have three engineers sharing a dev environment. It breaks when you have 200 developers across 12 teams, each expecting a fair share of a limited TPM budget.

The gaps FoundryGate fills

Per-developer token budgets

Azure AI Foundry has no concept of “alex@company.com gets 5 million tokens in June.” FoundryGate assigns each developer a monthly budget tier — Standard, Power or Unlimited — enforced at the APIM subscription level, not as a soft warning.

Individual APIM subscription keys

Instead of a shared key or RBAC access, every developer gets their own APIM subscription key. Usage is attributed per person. Keys can be rotated or revoked per person without affecting anyone else.

Entra-synced access

Access follows your directory. Being given access to FoundryGate in Entra is what creates a developer’s account and issues their key; losing it is what revokes them. Team groups are synced separately — moving somebody into a team’s Entra group moves their budget to that team’s, without anyone editing a spreadsheet.

Self-service for developers

Developers sign in with their Entra account, see their current quota and usage, rotate their own key, and request a quota increase with a justification — all without contacting IT.

The comparison

CapabilityAzure AI Foundry aloneWith FoundryGate
Per-developer token budget❌ Deployment-level only✅ Per user, per month
Individual API keys❌ Shared key or RBAC✅ One APIM subscription per developer
Hard quota enforcement❌ No blocking mechanism✅ Real-time 403 at the gateway when the monthly budget is spent
Per-developer burst control❌ One developer can saturate the deployment✅ Per-developer TPM cap → targeted 429 + Retry-After
Entra-based auto-provisioning❌ Manual RBAC assignment✅ Assigned in Entra → account + key
Team budgets from the directory❌ Nothing to sync✅ Entra group membership → that team’s budget tier
Automatic deprovisioning❌ Manual RBAC removal✅ Access removed in Entra → key deleted
Monthly reset❌ Manual✅ Azure Function runs at 00:01 UTC on the day you set (the 1st by default)
Quota increase workflow❌ None✅ Submit → admin approves → quota applied
Per-developer usage visibility❌ Aggregate only✅ Dashboard + audit log per user
Model deployment management❌ Portal only✅ Claude models are set up by the infrastructure deploy; admins manage OpenAI model deployments from the FoundryGate UI
Which models a team may use❌ Everything on the deployment, or nothing✅ Admins choose which models each budget tier is allowed to use, from the FoundryGate UI — anything else is refused at the gateway
Deployment-level rate limits (TPM/RPM)⚠️ Shared ceiling, 429s passed to callers⚠️ Mitigated — backend pools + circuit breakers reroute around saturated deployments; the platform ceiling itself remains

How it works

FoundryGate sets up the gateway (Azure API Management) and the AI model deployments (Azure AI Foundry) for you, inside your own Azure subscription, and then governs access to them.

👤Developerpersonal APIM key
HTTPS + personal key▶
🔀APIMbudget tier · limits
forwards▶
🤖Azure AI Foundrymodel deployments

FoundryGate tracks usage · enforces budgets · manages the key lifecycle

Key provisioning: When a developer first signs in, FoundryGate calls the APIM Management API to create an APIM subscription under the developer’s budget tier (Standard, Power or Unlimited). The key is issued to the developer. Foundry never knows about individual developers — APIM does.

Quota enforcement: The gateway itself enforces each developer’s budget in real time. A budget is one of the configured tiers — the tier product’s policy carries the monthly token quota, which is why quotas come in set sizes rather than arbitrary numbers. APIM’s llm-token-limit policy, keyed on the developer’s subscription, carries their monthly token quota (requests return 403 the moment it’s spent — no polling lag) and a per-minute token cap (bursts get 429 + Retry-After, which coding CLIs back off on automatically). Budgets reset with the UTC calendar month on their own. A reconciliation Function keeps the dashboard’s usage figures authoritative from the gateway’s request logs.

Cost: the dashboard can show an estimated cost per developer, from a rate card an admin fills in at /config — Azure bills Claude as one aggregate meter, so nobody but you can split it per person. It is a reporting figure, always labelled an estimate, and absent entirely until those prices are configured. The gateway enforces tokens, never dollars.

Entra sync: FoundryGate reads your Entra directory through the Microsoft Graph API using the app’s own identity — no passwords or secrets to manage. There are two separate syncs, and it is worth keeping them apart:

  • Who has an account. Whoever is given access to FoundryGate in Entra gets a FoundryGate user record, and a key on their first sign-in. Take that access away and they are deactivated and their key is deleted. This is joining and leaving the company, or the project.
  • Which team’s budget they get. A FoundryGate team can be linked to an Entra group; syncing it copies that group’s membership across, so people land on the right team’s budget tier without an admin editing anything. Moving somebody between teams only changes the size of their budget — it never creates or closes their account, and never touches their key.

Both syncs run on demand and are safe to repeat; running one twice with nothing changed in the directory does nothing the second time.

Who it’s for

FoundryGate is for platform and infrastructure teams who want to:

  • Roll out Azure AI Foundry access to the whole organisation without a quota free-for-all
  • Give individual developers accountability over their AI usage
  • Automate the access lifecycle instead of managing RBAC spreadsheets
  • Let developers self-serve without opening up the Azure portal to everyone