Kimi Code CLI
Connect Kimi Code CLI to Divyam for reading files, editing code and running project commands.
You need a Divyam account and an API key. If you don't have them yet, follow Getting Started first.
Replace the shortened divyam-sw-v1-... shown in examples with your complete API key.
The examples use divyam-as/gpt-6-sol. For another model, select its current ID in your harness or copy it from Models and pricing, and check its context limit and supported features.
1. Install Kimi Code CLI and set your key
Install Kimi Code CLI using the official instructions, then set your key in the terminal where you will run it:
export DIVYAM_API_KEY="divyam-sw-v1-..."
2. Configure the provider and model alias
Model ID: divyam-as/gpt-6-sol. Context window: 1,050,000 tokens. Models and pricing
Merge these settings into ~/.kimi-code/config.toml. Update existing Divyam tables rather than duplicating them:
[providers.divyam]
type = "openai"
base_url = "https://api.preview.divyam.ai/v1"
api_key_env = "DIVYAM_API_KEY"
[models.divyam]
provider = "divyam"
model = "divyam-as/gpt-6-sol"
max_context_size = 200000
capabilities = ["tool_use"]
api_key_env reads your exported key without saving it in the config. divyam is the local model alias, and model is the ID sent to Divyam.
3. Start an interactive session
From your project folder, run:
kimi -m divyam
Hello, what are your capabilities?
Run /compact to condense earlier messages.
This configuration enables tool_use and leaves image input disabled.
Check your requests
Open the Divyam console and select Logs. Your requests appear there within a few seconds, newest first, with their status, token counts and latency. Usage and Credits & Billing catch up within a few minutes.
Some clients display zero when model prices are missing. Check Credits & Billing for Divyam charges. Local dollar limits depend on the client's price and usage data.
For filters, cached-token counts and the requested-versus-routed view, see Logs and usage.