API referenceDraft
Chat completions
Generating replies for a conversation, with or without streaming.
Draft
The hosted API is a planned service with a draft specification. The local API described alongside it already exists and runs on your own machine.
POST
/v1/chat/completionsRuns one KOLDOS turn for the last user message: routing, context, tools and verification, not just the model.Request body
| Field | Type | Required | Description |
|---|---|---|---|
model | string | Yes | Model ID, for example koldos-7b. |
messages | array | Yes | Conversation so far. KOLDOS takes the last user message as the request for the turn. |
temperature, max_tokens, top_p | number | No | Accepted so standard clients keep working, and ignored: KOLDOS sets its own budgets for each turn. |
stream | boolean | No | Send the reply as server-sent events while it is generated. |
{
"model": "koldos-7b",
"messages": [
{ "role": "user", "content": "What does src/app.py do?" }
]
}{
"id": "chatcmpl_example",
"object": "chat.completion",
"created": 1767225600,
"model": "koldos-7b",
"choices": [
{
"index": 0,
"message": { "role": "assistant", "content": "..." },
"finish_reason": "stop"
}
],
"usage": { "prompt_tokens": 0, "completion_tokens": 0, "total_tokens": 0 }
}What a request becomes
KOLDOS reads the last user message as the request for one turn. The turn decides its own route, context and tool budget, so there is no system prompt or sampling setting to tune from the request.
temperature, max_tokens, top_p are accepted so that standard clients keep working, and ignored.
Streaming
Set stream to true to receive server-sent events while the reply is generated. Each event carries a small delta; the stream ends with data: [DONE].
data: {"id":"chatcmpl_example","choices":[{"index":0,"delta":{"content":"..."}}]}
data: {"id":"chatcmpl_example","choices":[{"index":0,"delta":{},"finish_reason":"stop"}]}
data: [DONE]