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