Integration
Use Kimi Code CLI with Tokens
Add Tokens to Moonshot's Kimi Code CLI as an openai provider in ~/.kimi-code/config.toml, read the key from TOKENS_API_KEY, and map local model aliases to Tokens model ids.
Set it up in three steps
02Create a key for Kimi Code CLI
Give the key its own monthly spending cap, so a runaway session stops at the cap.
Open your keys03Follow the guide
Point Kimi Code CLI at Tokens with the settings in the guide, then pick any model from the catalog.
Read the guide
What Kimi Code CLI connects to
- OpenAI-compatible base URL
- https://tokens.bd/v1
- Anthropic-compatible base URL
- https://tokens.bd
- API key
- One Tokens key (tok_live_…), with its own spending cap
- Models
- Any id from the model catalog
What the guide covers
4 min read
Ready to try Kimi Code CLI on Tokens?
Create an account, make a key and send your first request in a couple of minutes.
