Skip to content

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

  1. 01Create an account

    Sign up, then start on a plan or top up your prepaid wallet.

    Create an account
  2. 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 keys
  3. 03Follow 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

  1. 01Install Kimi Code CLI
  2. 02Export TOKENSAPIKEY
  3. 03Configure /.kimi-code/config.toml
  4. 04Switch models
  5. 05Verify it works
  6. 06Troubleshooting

Ready to try Kimi Code CLI on Tokens?

Create an account, make a key and send your first request in a couple of minutes.

Create an account