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 :free variants and openrouter/*), 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:

EndpointShape
GET /api/v1/modelsOpenRouter's shape — {"data": [...]}, prices per token — for drop-in clients. See Drop-in from OpenRouter.
GET /api/modelsKhaBot'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" }
}
FieldMeaning
context_length, top_provider.context_lengthThe context window in tokens — input and output together
top_provider.max_completion_tokensThe most tokens one reply can contain
architecture.input_modalitiesWhat you can send — "image" means you can attach images
architecture.output_modalitiesWhat comes back
supported_parametersRequest parameters the model honours — check for tools, response_format or reasoning before using them
reasoningKhaBot 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.

A 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.