Getting started
1. Create an account
Register — every new account starts on the Free plan. Verify you can see your dashboard.
2. Create an API key
Open Dashboard → API Keys and click New key. Optionally give it spending limits (per day, week, month or in total), an expiry date, and a set of models and services it may use. The full key is shown once — copy it.
Handing the key to an app? Leave Account management off and narrow it to what that app actually calls — see Authentication.
3. Make your first request
Use the OpenAI-compatible endpoint:
curl https://khabot.com/api/v1/chat/completions \
-H "Authorization: Bearer kb_YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "khabot/glm-5.2",
"messages": [{"role": "user", "content": "Hello!"}]
}'
The response is standard OpenAI shape. Set "stream": true for token-by-token SSE.
KhaBot's own models use
khabot/ ids (e.g. khabot/glm-5.2); any OpenRouter model id works too, billed from credit at the provider's cost. See Models & pricing for both tiers, and Drop-in from OpenRouter if you're moving over.