Documentation
Introduction
Openbase is a single OpenAI-compatible endpoint in front of every major model provider. You keep the SDK you already use and change where it points.
What the gateway does
Every request arrives at one endpoint, is authenticated against your API key, priced against your balance, and routed to a provider that can serve the model you named. If that provider rate limits or fails, the request is retried against the next one before an error ever reaches you.
- One API surface. The request body, the response body, the streaming format and the error envelope all match OpenAI.
- One balance. Credit is drawn down per request across every provider, so there is no per-vendor account to top up.
- One log. Model, provider, tokens, latency and exact cost are recorded for every call.
The shortest possible example
Point the base URL at Openbase, pass an Openbase key, and name a model by its provider-prefixed slug.
curl https://api.openbase.ai/v1/chat/completions \
-H "Authorization: Bearer $OPENBASE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "anthropic/claude-sonnet-5",
"messages": [{"role": "user", "content": "Hello"}]
}'Base URL
Use https://api.openbase.ai/v1. Running locally, the API listens on http://localhost:3001/v1.
Where to go next
QuickstartSend your first request in under two minutes.AuthenticationHow API keys work, and how to keep them safe.ModelsAddressing models, capabilities, and how routing picks a provider.StreamingServer-sent events, chunk framing and usage on stream close.SDKsUsing the official OpenAI clients and popular frameworks.ErrorsEvery error type, what causes it and how to respond.Billing and usageHow requests are priced, metered and invoiced.Rate limitsPer-key limits, headers and how to handle a 429.