Kimi Provider
CCS provides two distinct Kimi offerings:| Command | Auth | Endpoint | Use Case |
|---|---|---|---|
ccs kimi | OAuth via CLIProxy (device code) | http://127.0.0.1:8317/api/provider/kimi | Multi-account, no API key needed |
ccs km | API key direct | https://api.kimi.com/coding/ | Single API key, Kimi for Coding |
kimi, moonshot both route to the same CLIProxy provider.
Quick Start
Authentication
ccs kimi — OAuth Mode (CLIProxy)
Device Code Flow: Polling-based authentication — no local callback server required. Works in headless/server environments.
ccs km — API Key Mode (Kimi for Coding)
ccs km connects directly to https://api.kimi.com/coding/. Default model: kimi-k2-thinking-turbo. The --preset kimi flag auto-maps to km for backward compatibility.Multi-Account Support
- Add Account
- List Accounts
- Switch Account
~/.ccs/cliproxy/accounts.json — aliases kimi and moonshot both map to the same provider.
Model Configuration
Available Models
ccs kimi (CLIProxy OAuth)
| Model | Context | Notes |
|---|---|---|
kimi-k2.5 | 262K | Default — latest multimodal |
kimi-k2-thinking | — | Extended reasoning |
kimi-k2 | — | Flagship coding model |
ccs km (API key direct)
| Model | Notes |
|---|---|
kimi-k2-thinking-turbo | Default model for km |
vision-model placeholder in settings.
Settings Template
Settings saved to~/.ccs/km.settings.json from base-km.settings.json:
These env vars are injected automatically by CCS. Manual override is rarely needed.
Commands Reference
Troubleshooting
Device Code Expired
Symptom: “Device code expired” error during login Solution: Device codes have a short TTL. Re-run login and complete quickly:API Key Rejected (km mode)
Symptom: 401 errors when usingccs km
Solution: Verify key format (sk-...) and permissions on Moonshot AI platform.
Wrong Account Active
Symptom: Unexpected account being used Solution:Storage Locations
| Path | Description |
|---|---|
~/.ccs/cliproxy/auth/kimi-*.json | OAuth tokens (one per account) |
~/.ccs/cliproxy/accounts.json | Account registry, nicknames |
~/.ccs/km.settings.json | Kimi for Coding model config |
Cost Information
| Model | Input/M | Output/M | Cache/M |
|---|---|---|---|
kimi-k2.5 | $0.60 | $3.00 | $0.10 |
kimi-k2-thinking | $0.60 | $2.50 | $0.15 |
kimi-k2-thinking-turbo | $1.15 | $8.00 | $0.15 |
kimi-k2 | $0.60 | $2.50 | $0.15 |
Next Steps
Multi-Account Setup
Manage multiple Kimi accounts
API Preset (km)
Configure direct API key access
Remote Proxy
Connect to external CLIProxy server
All Providers
Explore other supported providers
