Skip to content
Documentation menu

Getting startedDraft

First request

Set your key and send a chat completion.

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.

Store your key in an environment variable called KOLDOS_API_KEY.

macOS and Linux
export KOLDOS_API_KEY="kd_your_api_key"
Windows (PowerShell)
$env:KOLDOS_API_KEY = "kd_your_api_key"

Send the request

Draft request
curl /chat/completions \
  -H "Authorization: Bearer $KOLDOS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "koldos-7b",
    "messages": [{ "role": "user", "content": "What is VRAM?" }]
  }'

Read the response

Response shape
{
  "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 }
}

The reply is in choices[0].message.content. The usage object reports the tokens counted for the request. Credits are charged per use by function, not per token.