Skip to content

Kimi Code

The default configuration file is located at ~/.kimi/config.toml. On first run, if the configuration file does not exist, the Kimi Code CLI will automatically create a default one.

You can specify a different configuration file using the --config-file argument (both TOML and JSON formats are supported):

kimi --config-file /path/to/config.toml

The configuration file contains the following top-level settings:

Configuration ItemTypeDescription
default_modelstringThe default model to use; must be a model defined in models
default_thinkingbooleanWhether to enable Thinking mode by default (defaults to false)
default_yolobooleanWhether to enable YOLO (auto-approval) mode by default (defaults to false)
providerstableAPI provider configuration
modelstableModel configuration
loop_controltableAgent loop control parameters
servicestableExternal service configuration (search, crawling)
mcptableMCP client configuration

Compatible with the OpenAI Chat Completions API format.

[providers.openai]
type = "openai_legacy"
base_url = "https://api.4allapi.com/v1"
api_key = "sk-xxx"

Used to connect to the Anthropic Claude API.

[providers.anthropic]
type = "anthropic"
base_url = "https://api.4allapi.com"
api_key = "sk-xxx"

Used to connect to Google Gemini-style models.

[providers.gemini]
type = "gemini"
base_url = "https://api.4allapi.com"
api_key = "sk-xxx"

4All API · One-stop AI large model API aggregation platform | Pricing | Contact Us

© 2025 4All API. All rights reserved.