Build with 1Router
A single, OpenAI-compatible API for every model. Drop-in replacement — just change the base URL.
Quickstart
Make your first API call in under 5 minutes.
API Reference
Full OpenAI-compatible API documentation.
Self-Hosting
Deploy 1Router on your own infrastructure.
Providers
Configure and manage model providers.
Quickstart
1Router is fully OpenAI-compatible. Point your existing SDK at our API and it just works.
curl https://api.1router.com/v1/chat/completions \
-H "Authorization: Bearer $ROUTER_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "openai/gpt-4o",
"messages": [{"role": "user", "content": "Hello!"}]
}'from openai import OpenAI
client = OpenAI(
base_url="https://api.1router.com/v1",
api_key=os.environ["ROUTER_API_KEY"]
)
response = client.chat.completions.create(
model="openai/gpt-4o",
messages=[{"role": "user", "content": "Hello!"}]
)
print(response.choices[0].message.content)import OpenAI from "openai"
const client = new OpenAI({
baseURL: "https://api.1router.com/v1",
apiKey: process.env.ROUTER_API_KEY,
})
const response = await client.chat.completions.create({
model: "openai/gpt-4o",
messages: [{ role: "user", content: "Hello!" }],
})
console.log(response.choices[0].message.content)Key Concepts
Model Routing
AvailableThe current alpha resolves an explicit provider/model-name from the shared catalog and routes it to the configured provider. Automatic cost/latency routing is planned.
Fallbacks
RoadmapProvider pools, health-aware retries, and fallback models are planned. Today, each request is sent to the provider selected by its catalog model ID.
Rate Limiting & Usage
RoadmapPer-key limits, quotas, spend controls, and a usage ledger are planned for the next control-plane phase. The current API uses one server-level master key.
Ready to start building?
Configure the self-hosted alpha and make your first call in minutes.