Kimi Code CLI Configuration Guide

1. Obtain an API Key

Open the qiyaov application list, enter an available application, and copy the API Key.

Obtain qiyaov API Key

2. Install Kimi Code

macOS / Linux:

curl -fsSL https://code.kimi.com/kimi-code/install.sh | bash

Windows PowerShell:

irm https://code.kimi.com/kimi-code/install.ps1 | iex

You can also install it via npm:

npm install -g @moonshot-ai/kimi-code

3. Configure qiyaov

Edit ~/.kimi/config.toml and add the following configuration:

default_model = "acedatacloud/MODEL_ID"

[providers.acedatacloud]
type = "openai"
base_url = "https://api.qiyaov.com/v1"
api_key = "your API Key"

[models."acedatacloud/MODEL_ID"]
provider = "acedatacloud"
model = "MODEL_ID"

Go to the model catalog to view model names (for example, claude-opus-5, gpt-6-sol), and replace all MODEL_ID values with the same name; for precise validation, use the id value in the /v1/models response. This value is the model name used by the API model parameter, not the UUID of the service or API. type = "openai" uses the OpenAI Chat Completions protocol.

The configuration file contains the Key; on macOS / Linux, it is recommended to restrict permissions:

chmod 600 ~/.kimi/config.toml

4. Verify and Start

kimi doctor
kimi provider list
kimi -p "Reply only OK"

Run kimi after entering the project to start using it. If it returns 401, check the API Key; if it indicates model not found, confirm that default_model, the model table name, and the model field use the same ID.

Official References