A startup building an internal chatbot has completely different requirements than an enterprise running AI-assisted workflows across 50 business units. The topology you choose determines your security posture, cost visibility, operational complexity, and how well you can scale.
Here are the three architectures I see deployed most often, when each one makes sense, and the tradeoffs nobody tells you about.
Topology 1: Direct API
The simplest possible deployment. Your application calls Azure OpenAI directly.
Internal tools where security requirements are basic
Less than $2,000/month in estimated spend (low enough that a single quota is fine)
What you get:
Zero infrastructure overhead
Single endpoint, single API key
No latency added by intermediate layers
Easy to debug (no middleman)
What you lose:
No rate limiting per team or per user
No request logging beyond what Azure provides
No failover if the region has an outage
No cost visibility per application or cost center
The most common mistake: Using a single API key shared across multiple applications. When you hit a rate limit, you can't tell which app caused it. Rotate one key and you break all apps.
Fix: One Azure OpenAI resource per major application. Separate managed identities instead of API keys where possible.
Topology 2: Azure API Management Gateway
APIM sits in front of one or more Azure OpenAI endpoints and handles everything you'd otherwise build yourself.
Regulated industry (healthcare, finance, government)
Data residency or sovereignty requirements
Policy prohibits traffic over public internet
ExpressRoute-connected Azure environment
The DNS gotcha that breaks 80% of first deployments:
When you create a Private Endpoint for Azure OpenAI, the FQDN yourresource.openai.azure.com must resolve to the private IP — but only from within your VNet.
If DNS resolves to the public IP, traffic bypasses the private endpoint entirely. The request still works but goes over public internet — which defeats the entire point.
Fix: Create a Private DNS Zone and link it to all VNets that need access:
# Create the private DNS zoneaz network private-dns zone create \ --resource-group rg-networking \--name"privatelink.openai.azure.com"# Link to your VNetaz network private-dns link vnet create \ --resource-group rg-networking \ --zone-name "privatelink.openai.azure.com"\--name link-hub-vnet \ --virtual-network hub-vnet \ --registration-enabled false# Create DNS record for the private endpointaz network private-endpoint dns-zone-group create \ --resource-group rg-ai \ --endpoint-name pe-openai \--name openai-dns-group \ --private-dns-zone "privatelink.openai.azure.com"\ --zone-name openai
After this, nslookup yourresource.openai.azure.com from inside the VNet should return a 10.x.x.x address, not a public IP.
Outbound rule requirement: If your App Service or AKS uses VNet integration, confirm the NSG on the subnet allows outbound HTTPS (port 443) to your private endpoint subnet. Missing this rule causes silent failures — the TCP handshake never completes but no useful error is logged.
Choosing the Right Topology
Requirement
Direct API
APIM Gateway
Private VNet
Fastest to deploy
✓
Per-app rate limiting
✓
✓
Cost allocation per team
✓
✓
Multi-region failover
✓
✓
No public internet
✓
Compliance / regulated
✓
Shared capacity management
✓
✓
Monthly cost overhead
None
$50–300
VNet + PE costs
Decision tree:
Are you in a regulated industry or have public internet restrictions? → Private VNet
Do you have 3+ teams sharing OpenAI capacity? → APIM Gateway
Are you early-stage, single team, moving fast? → Direct API (migrate to APIM when you have 2+ apps)
Most enterprise deployments end up at Topology 3 overlaid with Topology 2 — APIM deployed inside the VNet, sitting in front of private endpoints. You get rate limiting, logging, and failover — all without any public internet exposure.
What to Do Next
If you're on Direct API today and want to migrate to APIM without breaking existing apps:
Deploy APIM with the same backend (your existing OpenAI endpoint)
Update one app to point at APIM instead of OpenAI directly
Validate behavior and logs
Migrate remaining apps one at a time
Revoke direct API keys once all apps route through APIM
The migration takes a day. The operational improvements last years.