31 July 2026 · 5 min read
Kortexio is now OpenAI-compatible — for real
Kortexio started as a memory proxy with an Ollama-shaped chat contract at /api/chat. That worked. It also created an awkward gap: marketing said “OpenAI-compatible,” but pointing the official OpenAI SDK at Kortexio did not work without adapters.
That gap is closed.
What changed
The public API now exposes a true OpenAI-compatible surface under /v1:
POST /v1/chat/completions— sync JSON and SSE streaming (data: …/[DONE])GET /v1/modelsandGET /v1/models/{id}— the BYOK model configured for your AppPOST /v1/embeddings— pass-through to your BYOK provider
/api/chat remains available and unchanged for Ollama-compatible clients. Both paths share the same API key, rate limits, session memory, and agentic loop.
Drop-in with the OpenAI SDK
import OpenAI from "openai";
const client = new OpenAI({
apiKey: process.env.KORTEXIO_API_KEY,
baseURL: "https://api.kortexio.io/v1",
});
const completion = await client.chat.completions.create({
model: "gpt-4o-mini",
user: "user-42", // or send X-User-Id
messages: [{ role: "user", content: "What did we decide last time?" }],
});
Kortexio injects compiled session memory before your BYOK model runs. Your app still speaks chat completions — memory is ambient.
Identity: header or user
OpenAI clients do not send X-User-Id. On /v1/chat/completions you can identify the end user with either:
- the
X-User-Idheader, or - the standard OpenAI
userfield in the request body
One of them is required so memory stays scoped per person. Ollama /api/chat still requires X-User-Id.
Embeddings are a proxy, not our memory engine
/v1/embeddings forwards to the LLM provider you configured for the App. It does not feed Kortexio session memory. That is intentional: conversational memory stays a structured wiki; embeddings stay available for your RAG over documents, catalogs, or search indices.
If your BYOK provider does not expose embeddings (Anthropic is the usual example), the upstream error is returned as-is.
Dashboard format picker
In the user dashboard (App overview and Getting started) you can toggle OpenAI vs Ollama. The preference only changes the URL and curl snippet shown — both APIs stay live. The choice is remembered in localStorage.
What stayed the same
- Bring Your Own Key — Kortexio never bills your model usage
- Session memory and Global Wiki
- Agentic tools / MCP when enabled
- EU-hosted infrastructure defaults
If you already integrated via /api/chat, keep shipping. If you want LiteLLM, Cursor-style OpenAI bases, or the official SDK — set baseURL to https://api.kortexio.io/v1 and go.