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:
- Sign in at ogger.ai/login
- Create an API key in your dashboard
- Use the key in any OpenAI-compatible SDK
pip install openai # or: npm install openaifrom 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:
Authorization: Bearer og_live_YOUR_KEY_HEREKeys 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
Request body (JSON):
| Parameter | Type | Required | Description |
|---|---|---|---|
| model | string | yes | Any value — the engine answers regardless. Prefix raw/ to bypass it |
| messages | array | yes | Array of {role, content} objects |
| stream | boolean | no | Stream the response (default: false) |
| temperature | number | no | Sampling temperature 0–2 |
| max_tokens | integer | no | Max completion tokens |
{
"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 ID | Provider | Context |
|---|---|---|
| ogger | Ogger engine (default) | 1M |
| raw/glm-5.2 | Z.ai | 1M |
| raw/glm-5.1 | Z.ai | 200K |
| raw/glm-5 | Z.ai | 200K |
| raw/glm-4.5 | Z.ai | 128K |
| raw/gpt-4o | OpenAI | 128K |
| raw/gpt-4o-mini | OpenAI | 128K |
| raw/claude-3-5-sonnet | Anthropic | 200K |
| raw/claude-3-5-haiku | Anthropic | 200K |
List models programmatically: GET /api/v1/models
Streaming
Set stream: true to receive server-sent events:
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 Status | code | Meaning |
|---|---|---|
| 401 | missing_api_key | No Authorization header provided |
| 401 | invalid_api_key | Key not found or revoked |
| 400 | invalid_json | Request body is not valid JSON |
| 400 | invalid_request | Missing or invalid parameters |
| 429 | rate_limited | Too many requests |
| 502 | model_error | Upstream model provider error |
SDK examples
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 ?? "");
}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"}]
}'