Руководства
What is an OpenAI-compatible API gateway?
Category explainer: one Base URL and key for many models — hosted vs self-host.
Обновлено: 2026-10-27 · Проверка: docs_checked (документы; не E2E)
Quick answer
An OpenAI-compatible AI API gateway lets clients keep the OpenAI request shape while the gateway routes to multiple upstream model providers behind one Base URL and key.
Hosted vs self-host
- Hosted (bnrouter, OpenRouter): operations and routing managed for you.
- Self-host (LiteLLM, Bifrost): you run the proxy and upstream keys.
When bnrouter fits
You want OpenAI-compatible chat without running your own gateway fleet, with unified quotas and a merchant console.
curl example
curl https://console.bnrouter.com/v1/chat/completions \
-H "Authorization: Bearer YOUR_BNROUTER_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "YOUR_MODEL_ID",
"messages": [{"role": "user", "content": "Hello from bnrouter"}],
"stream": false
}'Checklist
- Use https://console.bnrouter.com/v1 for bnrouter inference.
FAQ
- Does bnrouter store prompts?
- Requests are forwarded to providers; prompts and completions are not stored — only usage metadata for billing.
Sources
- bnrouter docs (checked 2026-10-27)