Kimi Code CLI Configuration Guide

1. Obtain API Key

Open the Lingxi AI Plaza application list, access the available applications, and copy the API Key.

Get Lingxi AI Plaza 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 via npm:

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

3. Configure Lingxi AI Plaza

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

default_model = "acedatacloud/MODEL_ID"

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

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

Replace the two instances of MODEL_ID with the same model ID currently provided by Coding Plan. type = "openai" uses the OpenAI Chat Completions protocol.

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

chmod 600 ~/.kimi/config.toml

4. Verify and Start

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

After entering the project, run kimi to start using it. If it returns 401, check the API Key; if it prompts model not found, ensure that default_model, the model table name, and the model field use the same ID.

Official References