Models & pricing
KhaBot serves two tiers of language model through the same endpoints:
- KhaBot models — ids
khabot/<model>. Served by KhaBot at its published per-model prices, and covered by plans. - Pass-through models — OpenRouter's catalog under OpenRouter's own ids (minus
:freevariants andopenrouter/*), synced daily. Billed from credit at exactly the provider's cost, never covered by plans. See Drop-in from OpenRouter.
Browse both on the model list. For code, there are two catalog endpoints:
| Endpoint | Shape |
|---|---|
GET /api/v1/models | OpenRouter's shape — {"data": [...]}, prices per token — for drop-in clients. See Drop-in from OpenRouter. |
GET /api/models | KhaBot's shape — prices per million tokens, as below |
Both list KhaBot models first.
{
"models": [
{
"id": "khabot/glm-5.2",
"tier": "curated",
"name": "GLM 5.2",
"available": true,
"priced": true,
"input_per_mtok_usd": 3.0,
"output_per_mtok_usd": 5.0,
"cache_read_per_mtok_usd": 0.3,
"context_length": 200000,
"openrouter_url": null
},
{
"id": "openai/gpt-5.1",
"tier": "passthrough",
"name": "OpenAI: GPT-5.1",
"available": true,
"priced": true,
"input_per_mtok_usd": 1.25,
"output_per_mtok_usd": 10.0,
"context_length": 400000,
"openrouter_url": "https://openrouter.ai/openai/gpt-5.1"
}
]
}
Trimmed, with illustrative prices — entries also carry the model's modalities and more.
Model metadata
In GET /api/v1/models every KhaBot model carries the same OpenRouter-shaped fields as pass-through
models, so a client can size its context, cap its output and decide what to send:
{
"id": "khabot/glm-5.2",
"name": "GLM 5.2",
"context_length": 200000,
"top_provider": { "context_length": 200000, "max_completion_tokens": 32768 },
"architecture": { "input_modalities": ["text", "image"], "output_modalities": ["text"] },
"supported_parameters": ["max_tokens", "temperature", "tools", "tool_choice", "response_format", "reasoning", "include_reasoning"],
"reasoning": true,
"pricing": { "prompt": "0.000003", "completion": "0.000005" }
}
| Field | Meaning |
|---|---|
context_length, top_provider.context_length | The context window in tokens — input and output together |
top_provider.max_completion_tokens | The most tokens one reply can contain |
architecture.input_modalities | What you can send — "image" means you can attach images |
architecture.output_modalities | What comes back |
supported_parameters | Request parameters the model honours — check for tools, response_format or reasoning before using them |
reasoning | KhaBot extra: true when the model can think before it answers, false when it can't, null when unknown |
A field KhaBot doesn't know yet is null (or an empty list). The same details are on
the model list.
How billing works
KhaBot models are priced from KhaBot's own published per-model prices:
cost_billed = input_tokens/1e6 × input_price
+ output_tokens/1e6 × output_price
+ cache_read_tokens/1e6 × cache_read_price
+ cache_write_tokens/1e6 × cache_write_price
Cache prices fall back to the input price when unset. Prices are per million tokens (Mtok). The cost draws on your plan quota first, then on your credit as extra usage — see Quotas & plans.
khabot/* id that isn't in the catalog returns 404 model_not_found, as an OpenAI-compatible API would.Pass-through models bill exactly the cost the provider reports for each call, from credit. Their listed prices are the provider's own, refreshed by the daily sync.
Live prices are on the model list and in your dashboard.