Create an Azure OpenAI resource in the Azure portal, copy your key and endpoint, deploy a model in Azure OpenAI Studio, then integrate with Bifrost for enterprise routing, virtual keys, and cost governance.
Bifrost supports Azure OpenAI through OpenAI-compatible HTTP APIs. Route requests as azure/<deployment> using your deployment name from Azure OpenAI Studio.
| Property | Details |
|---|---|
| Description | Azure OpenAI provides GPT, o-series, and embedding models via regional Azure resources with deployment-based routing. |
| Provider route on Bifrost | azure/<deployment> |
| Provider doc | Azure OpenAI documentation |
| API endpoint for provider | https://{resource}.openai.azure.com/openai/deployments/{deployment} |
| Supported endpoints | /v1/models, /v1/completions, /v1/chat/completions, /v1/responses, /v1/images/generations, /v1/images/edits, /v1/embeddings, /v1/audio/speech, /v1/audio/transcriptions, /v1/files, /v1/batches |
Use these Microsoft-hosted links for console access, API documentation, and authentication details.
Before you begin, you will need:
[ QUICK START ]
Use the Azure Portal.
Go to portal.azure.com and sign in with your work, school, or personal Microsoft account. Create or select a subscription for billing.
In the portal, search for Azure OpenAI, click Create, and choose your subscription, resource group, region, and name. Wait for deployment to finish.
Open the resource, then launch Azure OpenAI Studio from the overview blade to manage models and deployments.
Find both values under Keys and Endpoint in your resource.
In your Azure OpenAI resource, open Keys and Endpoint. Copy KEY 1 (or KEY 2) and the Endpoint URL. Store them as environment variables:
export AZURE_OPENAI_API_KEY="your-key-here" export AZURE_OPENAI_ENDPOINT="https://your-resource.openai.azure.com/" export AZURE_OPENAI_API_VERSION="2024-10-21"
Deployments map a friendly name to a model in your region.
In Azure OpenAI Studio, go to Deployments → Create new deployment. Pick a model (for example gpt-4o) and set a deployment name such as gpt-4o. You will use this name in API URLs.
Azure uses deployment-scoped URLs and an api-version query parameter.
Replace your-deployment with your deployment name. Use the api-key header:
$ curl "$AZURE_OPENAI_ENDPOINT/openai/deployments/your-deployment/chat/completions?api-version=$AZURE_OPENAI_API_VERSION" \ -H "Content-Type: application/json" \ -H "api-key: $AZURE_OPENAI_API_KEY" \ -d '{ "messages": [{"role":"user","content":"Hello from Azure OpenAI!"}] }'
[ MODELS ]
| Model | API ID | Best for |
|---|---|---|
| GPT-4.1 | gpt-4.1 | Latest GPT-4.1 when deployed in your resource. |
| GPT-4.1 mini | gpt-4.1-mini | Cost-efficient GPT-4.1 deployment. |
| GPT-4o | gpt-4o | Multimodal production workloads. |
| GPT-4o mini | gpt-4o-mini | High-volume chat and assistants. |
| o3 | o3 | Reasoning models for complex analysis. |
| o3-mini | o3-mini | Faster reasoning tier. |
| o4-mini | o4-mini | Compact reasoning on Azure OpenAI. |
| GPT-4 Turbo | gpt-4-turbo | Prior-gen turbo with vision support. |
| GPT-3.5 Turbo | gpt-35-turbo | Legacy economical chat (where still available). |
| text-embedding-3-large | text-embedding-3-large | Embeddings for RAG on Azure. |
| whisper | whisper | Transcription when deployed. |
| DALL-E 3 | dall-e-3 | Image generation deployments. |
Models and availability change over time. See the Azure OpenAI model documentation for the latest list and pricing.
[ TROUBLESHOOTING ]
| Error | Likely Cause | What to Do |
|---|---|---|
401 Unauthorized | Invalid or missing API key. | Verify your API key is correct. Generate a new key if needed. |
400 Bad Request | Invalid request format or unsupported model. | Wrong deployment name, missing api-version, or invalid JSON body. |
404 DeploymentNotFound | Deployment name in URL does not exist in this resource. | Confirm the deployment name in Azure OpenAI Studio matches your API path. |
429 Rate Limited | Rate limit exceeded for your plan. | Upgrade your plan or implement exponential backoff. Use Bifrost for intelligent load distribution. |
502/503 Service Error | Azure region outage or deployment not ready. | Retry with backoff. Check Azure status. Configure failover with Bifrost. |
[ PRODUCTION-READY ]
Bifrost is a drop-in replacement for Azure OpenAI SDKs. Update your base URL and keep your client code. Bifrost handles cost tracking, virtual keys, budgets, and intelligent failover.
Run the Bifrost gateway and configure your Azure OpenAI credentials in the Web UI.
$ npx -y @maximhq/bifrost
✓ Bifrost started ├─ HTTP server listening on http://localhost:8080 ├─ Web UI available at http://localhost:8080 └─ Configure providers and virtual keys in the dashboard
Update your SDK to route through Bifrost's OpenAI-compatible gateway.
from openai import AzureOpenAI # BEFORE # client = AzureOpenAI( # api_key=os.environ["AZURE_OPENAI_API_KEY"], # azure_endpoint=os.environ["AZURE_OPENAI_ENDPOINT"], # api_version=os.environ["AZURE_OPENAI_API_VERSION"], # ) # AFTER: route via Bifrost + virtual key client = AzureOpenAI( api_key="sk-bf-your-virtual-key", azure_endpoint="http://localhost:8080/azure", api_version="2024-10-21", ) response = client.chat.completions.create( model="gpt-4o", messages=[{"role": "user", "content": "Hello from Bifrost!"}], ) print(response.choices[0].message.content)
x-bf-vk or Authorization: Bearer sk-bf-* per the Bifrost documentation.[ WHAT'S NEXT ]
You have your API key. Add governance, guardrails, and MCP controls for production.
[ BIFROST FEATURES ]
Everything you need to run AI in production, from free open source to enterprise-grade features.
01 Governance
SAML support for SSO and Role-based access control and policy enforcement for team collaboration.
02 Adaptive Load Balancing
Automatically optimizes traffic distribution across provider keys and models based on real-time performance metrics.
03 Cluster Mode
High availability deployment with automatic failover and load balancing. Peer-to-peer clustering where every instance is equal.
04 Alerts
Real-time notifications for budget limits, failures, and performance issues on Email, Slack, PagerDuty, Teams, Webhook and more.
05 Log Exports
Export and analyze request logs, traces, and telemetry data from Bifrost with enterprise-grade data export capabilities for compliance, monitoring, and analytics.
06 Audit Logs
Comprehensive logging and audit trails for compliance and debugging.
07 Vault Support
Secure API key management with HashiCorp Vault, AWS Secrets Manager, Google Secret Manager, and Azure Key Vault integration.
08 VPC Deployment
Deploy Bifrost within your private cloud infrastructure with VPC isolation, custom networking, and enhanced security controls.
09 Guardrails
Automatically detect and block unsafe model outputs with real-time policy enforcement and content moderation across all agents.
[ SHIP RELIABLE AI ]
Change just one line of code. Works with OpenAI, Anthropic, Vercel AI SDK, LangChain, and more.
[ FAQ ]
Azure OpenAI runs OpenAI models in your Azure subscription with regional deployments, private networking, and Microsoft enterprise controls. You use deployment names in URLs instead of model IDs on api.openai.com.
Yes. Most subscriptions must request access before creating an Azure OpenAI resource. Apply in the Azure portal under Azure OpenAI and wait for approval before deploying models.
Yes. Use the AzureOpenAI client from the openai package with your resource endpoint, API key, and api-version. Bifrost also accepts OpenAI-compatible requests routed to azure/<deployment>.
A deployment is your named instance of a model in Azure OpenAI Studio (for example gpt-4o). API calls use the deployment name in the URL path, not the raw model name from the catalog.
Use Azure Cost Management and metrics in the portal. For unified tracking across providers, route traffic through Bifrost to aggregate spend per team and virtual key.
Yes. Register your Azure OpenAI credentials in the Bifrost Web UI and route SDK calls to http://localhost:8080/azure with a virtual key for governance and failover.