Nbility logoNbility Docs

Search documentation

Search guides and API reference content

Terminal & Agents

Kimi Code CLI with Nbility

Kimi Code CLI accepts custom OpenAI-compatible providers. This configures CLI inference, not the Kimi web account or subscription.

Configure a provider and model alias

Use /provider and Add New Platform for interactive credential setup. For manual configuration, edit ~/.kimi/config.toml:

default_model = "nbility-chat"

[providers.nbility]
type = "openai_legacy"
base_url = "https://api.nbility.ai/v1"
api_key = "YOUR_API_KEY"

[models.nbility-chat]
provider = "nbility"
model = "YOUR_MODEL_ID"
max_context_size = 8192

Replace the key, model ID, and context limit. 8192 is illustrative. This file contains credentials; keep it in your user directory with restricted access and out of Git.

default_model refers to the local alias nbility-chat; model is the ID sent to the gateway. Quote TOML names containing dots, for example [models."my.model"].

Choose the protocol

  • Chat Completions uses openai_legacy.
  • Responses uses openai_responses and a compatible model.
  • Do not reuse the built-in Moonshot provider’s assumptions for this gateway.

Verify

Start kimi, confirm the alias with /model, send a short message, and inspect Usage logs. Check saved keys for authentication failures and context limits for early compaction. Never exceed the actual model window.

Table of Contents