OpenAI-Compatible API
Kiomon exposes an OpenAI-compatible surface at /v1: any tool that speaks the OpenAI protocol can point at your brain by changing the base URL and API key. No custom SDKs, no glue code.
Supported endpoints
Section titled “Supported endpoints”| Endpoint | What it does |
|---|---|
GET /v1/models |
List available models: kiomon-rag and kiomon-embed |
POST /v1/chat/completions |
Grounded Q&A over your saved library (stream + non-stream, numbered citations attached) |
POST /v1/embeddings |
Embed text via the vector service (when enabled) |
Authentication
Section titled “Authentication”Authorization: Bearer <your-kiomon-api-key>Keys are managed in Dashboard → Settings → API Keys. Requests are rate-limited per key/plan via the same sliding-window middleware used everywhere else.
Point any OpenAI client at Kiomon
Section titled “Point any OpenAI client at Kiomon”from openai import OpenAI
client = OpenAI( api_key="kiomon-api-key", base_url="https://api.kiomon.com/v1",)
resp = client.chat.completions.create( model="kiomon-rag", messages=[{"role": "user", "content": "How do I create a checkout session in Dodo Payments?"}],)print(resp.choices[0].message.content)The same pattern works with curl, the openai Node SDK, LangChain, and any OpenAI-compatible agent framework.
curl https://api.kiomon.com/v1/chat/completions \ -H "Authorization: Bearer <key>" \ -H "Content-Type: application/json" \ -d '{ "model": "kiomon-rag", "messages": [{"role": "user", "content": "Summarize what I saved about Cloudflare Workers"}], "stream": true }'What chat/completions gives you
Section titled “What chat/completions gives you”- Grounded answers — the RAG system prompt is always applied: the model answers only from your saved documents, with numbered inline
[1]…[4]citations in the text. - Streaming — SSE-style token stream (
stream: true). - Model allow-list — you request
kiomon-rag; clients can’t request an arbitrary model. - Stateless — send the full context each turn (OpenAI semantics); nothing is persisted to a conversation store on this path. Use the dashboard chat or
/api/rag/askfor persisted multi-turn conversations.
Using it with n8n / Make
Section titled “Using it with n8n / Make”- Add an OpenAI node and set:
- Base URL:
https://api.kiomon.com/v1 - API Key: your Kiomon key
- Base URL:
- Model:
kiomon-rag - Send the user’s question as a message — the node returns the grounded answer with sources.
Exactly the same for LangChain:
from langchain_openai import ChatOpenAI
llm = ChatOpenAI( model="kiomon-rag", api_key="kiomon-api-key", base_url="https://api.kiomon.com/v1",)Embeddings
Section titled “Embeddings”/v1/embeddings returns semantic embeddings for your text using the same model that powers Kiomon’s semantic search.
Use it to:
- Embed your own content before storing it elsewhere
- Compare documents semantically
- Build retrieval pipelines that share Kiomon’s embedding space
Safety & constraints
Section titled “Safety & constraints”- Multimodal parts are dropped — this is a text-only brain
- System-message coercion is prevented — a client-supplied
systemmessage becomes “instruction flavor”; it can never override answer only from saved documents - Context is scoped — answers cite and quote your library, never hallucinated web content
Rate limits
Section titled “Rate limits”Free/Pro daily caps per key: chat and embedding quotas are separate. See Plans & Quotas for numbers.