Create a Mistral account at openrouter.ai, generate your API key, store it securely, then integrate with Bifrost for virtual keys, budgets, and cost governance. Complete setup in minutes.
Bifrost supports OpenRouter as a single OpenAI-compatible gateway to hundreds of models from many providers.
| Property | Details |
|---|---|
| Description | OpenRouter provides one API and key to access models from OpenAI, Anthropic, Google, Meta, Mistral, and others. |
| Provider route on Bifrost | openrouter/<model> |
| Provider doc | OpenRouter |
| API endpoint for provider | https://openrouter.ai/api/v1 |
| Supported endpoints | /v1/models, /v1/completions, /v1/chat/completions, /v1/responses, /v1/embeddings |
OpenRouter docs, keys dashboard, and model catalog.
Before you begin, you will need:
[ QUICK START ]
Copy the key immediately.
Click Create Key, name it, and copy the value into your secrets manager or .env file.
export OPENROUTER_API_KEY="..."
OpenRouter is OpenAI-compatible.
Use Bearer authentication with the OpenAI-compatible base URL:
$ curl https://openrouter.ai/api/v1/chat/completions -H "Content-Type: application/json" -H "Authorization: Bearer $OPENROUTER_API_KEY" -d '{ "model": "openai/gpt-4o-mini", "messages": [{"role":"user","content":"Hello from OpenRouter!"}] }'
[ MODELS ]
| Model | API ID | Best for |
|---|---|---|
| GPT-4o | openai/gpt-4o | OpenAI multimodal via OpenRouter. |
| GPT-4o mini | openai/gpt-4o-mini | Affordable OpenAI tier. |
| Claude Sonnet 4.5 | anthropic/claude-sonnet-4.5 | Anthropic agents and coding. |
| Claude Haiku 4.5 | anthropic/claude-haiku-4.5 | Fast Anthropic tier. |
| Gemini 2.5 Pro | google/gemini-2.5-pro | Google reasoning via OpenRouter. |
| Gemini 2.5 Flash | google/gemini-2.5-flash | Fast Google multimodal. |
| Llama 3.3 70B Instruct | meta-llama/llama-3.3-70b-instruct | Open model routing. |
| DeepSeek R1 | deepseek/deepseek-r1 | Reasoning model aggregation. |
| Mistral Large | mistralai/mistral-large | Mistral flagship routing. |
| Qwen 3 235B | qwen/qwen3-235b-a22b | Large Qwen via OpenRouter. |
Models and availability change over time. See the OpenRouter models directory 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. | Check request format and confirm model ID is valid. |
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 | Temporary Mistral service unavailability. | Retry after a delay. Check Mistral status page. Configure failover with Bifrost. |
[ PRODUCTION-READY ]
Bifrost is a drop-in replacement for OpenRouter SDKs: keep your client code and change the base URL to your gateway. Bifrost handles cost tracking, virtual keys, budgets, and failover automatically.
Run the Bifrost gateway and configure your Mistral 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 OpenRouter SDK client to route through the Bifrost gateway.
from openai import OpenAI client = OpenAI( api_key="sk-bf-your-virtual-key", base_url="http://localhost:8080/openai" ) response = client.chat.completions.create( model="openai/gpt-4o-mini", 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 ]
OpenRouter is a unified API that routes requests to many LLM providers through one key and OpenAI-compatible endpoints.
New accounts may receive trial credits. Check your dashboard for current promotions and balance.
Use provider/model IDs like openai/gpt-4o-mini. Browse the catalog at openrouter.ai/models.
Yes. Set base_url to https://openrouter.ai/api/v1 and pass your OpenRouter API key.
Configure OpenRouter in Bifrost and route through http://localhost:8080/openrouter.
OpenRouter bills per model at listed rates. Use Bifrost for aggregated cost tracking across providers.