Getting started
Authentication
Send your key as a Bearer token, and keep it safe.
Bearer token
Every request carries your API key in the Authorization header, with the Bearer scheme. There is no other way to sign in, and no cookies or sessions.
Header
http
Authorization: Bearer ob_sk_000000000000000000000000000000000000000000000001
OpenAI SDKs send this header for you: pass the key as api_key (Python) or apiKey (JavaScript), with the base URL https://openllmbuddy-proxy.openllmbuddy.workers.dev/v1.
Headers
| Header | Required | Value | Notes |
|---|---|---|---|
| Authorization | Yes | Bearer <YOUR_API_KEY> | An ob_sk_… key from Console → API Keys. Each key is tied to one instance. |
| Content-Type | Yes | application/json | For POST requests. The body must be JSON. |
Keep your key safe
- Call the API from your server. A key in a web page or a mobile app can be read by anyone who has it.
- Keep the key in an environment variable or a secrets manager, for example
OLB_API_KEY, and never commit it to git. - Use one key per app, so you can revoke one without stopping the others.
- Think a key has leaked? Revoke it on API Keys and create a new one (Get an API key).
When authentication fails
| Status | Why |
|---|---|
| 400 | No Authorization header was sent. |
| 401 | The key is wrong, mistyped or revoked, or its instance has ended. |
| 403 | Identity verification is needed before this instance can be used (code kyc_required). Finish it under Settings → Verification. |
Note
The full list is under Errors.