API reference

ogger.ai exposes an OpenAI-compatible REST API. If you already use the OpenAI SDK, you only need to change base_url and your API key.

Quickstart

Get up and running in under a minute:

  1. Sign in at ogger.ai/login
  2. Create an API key in your dashboard
  3. Use the key in any OpenAI-compatible SDK
bash
pip install openai  # or: npm install openai
python
from openai import OpenAI

client = OpenAI(
    base_url="https://ogger.ai/api/v1",
    api_key="og_live_YOUR_KEY_HERE",
)

response = client.chat.completions.create(
    model="ogger",
    messages=[{"role": "user", "content": "Hello!"}],
)
print(response.choices[0].message.content)

Authentication

All API requests require an Authorization header:

http
Authorization: Bearer og_live_YOUR_KEY_HERE

Keys are prefixed with og_live_. The full key is shown once at creation — copy it immediately. You can create up to 10 active keys per account.

Chat completions

POST/api/v1/chat

Request body (JSON):

ParameterTypeRequiredDescription
modelstringyesAny value — the engine answers regardless. Prefix raw/ to bypass it
messagesarrayyesArray of {role, content} objects
streambooleannoStream the response (default: false)
temperaturenumbernoSampling temperature 0–2
max_tokensintegernoMax completion tokens
json
{
  "model": "ogger",
  "messages": [
    {"role": "system", "content": "You are a coding assistant."},
    {"role": "user", "content": "Explain async/await in Python"}
  ],
  "stream": false,
  "temperature": 0.2
}

Available models

ogger is is the whole assistant, and it answers every request whatever model name your tool sends — you do not need to change the model your editor is configured with. Simple turns come straight back from a fast model. Turns that need real work — evidence to reason over, an investigation, a tool loop, anything you have asked it to remember — are routed to the bio-symbolic engine: grounded retrieval, symbolic planning and persistent memory.

Every response carries an X-Ogger-Routeheader saying which path answered it. To choose yourself, prefix the model withdeep/to force the engine orraw/to reach a provider's plain model — or sendX-Ogger-Route: engineon the request.

The engine runs a bounded number of turns at once. If it is saturated, your request is served by the underlying model instead of failing — you always get an answer. Themodelfield in the response always names whichever actually answered.

Model IDProviderContext
oggerOgger engine (default)1M
raw/glm-5.2Z.ai1M
raw/glm-5.1Z.ai200K
raw/glm-5Z.ai200K
raw/glm-4.5Z.ai128K
raw/gpt-4oOpenAI128K
raw/gpt-4o-miniOpenAI128K
raw/claude-3-5-sonnetAnthropic200K
raw/claude-3-5-haikuAnthropic200K

List models programmatically: GET /api/v1/models

Streaming

Set stream: true to receive server-sent events:

python
stream = client.chat.completions.create(
    model="ogger",
    messages=[{"role": "user", "content": "Write a REST API in FastAPI"}],
    stream=True,
)
for chunk in stream:
    print(chunk.choices[0].delta.content or "", end="", flush=True)

Error codes

HTTP StatuscodeMeaning
401missing_api_keyNo Authorization header provided
401invalid_api_keyKey not found or revoked
400invalid_jsonRequest body is not valid JSON
400invalid_requestMissing or invalid parameters
429rate_limitedToo many requests
502model_errorUpstream model provider error

SDK examples

typescript
import OpenAI from "openai";

const client = new OpenAI({
  baseURL: "https://ogger.ai/api/v1",
  apiKey: process.env.OGGER_API_KEY,
});

const stream = await client.chat.completions.create({
  model: "ogger",
  messages: [{ role: "user", content: "Refactor this function for readability" }],
  stream: true,
});

for await (const chunk of stream) {
  process.stdout.write(chunk.choices[0]?.delta?.content ?? "");
}
bash
curl https://ogger.ai/api/v1/chat \
  -H "Authorization: Bearer og_live_..." \
  -H "Content-Type: application/json" \
  -d '{
    "model": "ogger",
    "messages": [{"role": "user", "content": "Hello"}]
  }'

Ready to start building?