Part of the ContextMemory docs. Back to README.
The fastest path: no build, no database, no Ollama to run.
Create a free account at kortexio.io and copy your API key (starts with cmk_live_).
Kortexio Cloud is bring-your-own-key: Kortexio orchestrates memory and agentic — text generation always uses your provider. In your app's LLM provider tab on the dashboard, pick a provider (OpenAI, Azure OpenAI, Anthropic, your own Ollama, …), set the model id, and paste your own provider key — no markup on tokens. Use Test connection to verify it before you ship. The model you send in each request must match the one configured there.
If you already call an OpenAI-compatible POST /v1/chat/completions, change one URL and keep the same body and response parsing:
- POST http://localhost:11434/v1/chat/completions
+ POST https://api.kortexio.io/v1/chat/completionsComing from Ollama native /api/chat? Switch to /v1/chat/completions and parse choices[0].message.content.
# Turn 1 — teach it something
curl -X POST https://api.kortexio.io/v1/chat/completions \
-H "Content-Type: application/json" \
-H "X-User-Id: user-42" \
-H "X-Session-Id: sess-abc" \
-H "Authorization: Bearer cmk_live_..." \
-d '{
"model": "gpt-4o-mini",
"messages": [{ "role": "user", "content": "Remember: KORTEX-PINEAPPLE" }]
}'# Turn 2 — same X-Session-Id, memory recalled automatically
curl -X POST https://api.kortexio.io/v1/chat/completions \
-H "Content-Type: application/json" \
-H "X-User-Id: user-42" \
-H "X-Session-Id: sess-abc" \
-H "Authorization: Bearer cmk_live_..." \
-d '{
"model": "gpt-4o-mini",
"messages": [{ "role": "user", "content": "What was the secret word?" }]
}'Response (OpenAI schema — same as self-host):
{
"id": "chatcmpl-...",
"object": "chat.completion",
"model": "gpt-4o-mini",
"choices": [{
"index": 0,
"message": { "role": "assistant", "content": "The secret word is KORTEX-PINEAPPLE." },
"finish_reason": "stop"
}]
}That's the entire integration. Session memory works on the next turn automatically — no embeddings, no vector DB, no retrieval logic to write.
Required headers: X-User-Id, Authorization: Bearer cmk_live_...
Optional: X-Session-Id (generated by the API if omitted). Your tenant is inferred from the key — you do not send X-App-Id on Cloud.
model: required in the body, and it must match the provider/model you configured in the LLM provider tab (BYOK).