> ## Documentation Index
> Fetch the complete documentation index at: https://docs.aixy-gateway.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Kimi Code

> Run Kimi Code CLI through Aixy's OpenAI-compatible API.

Kimi Code CLI can use an OpenAI-compatible provider. Add Aixy to its local `~/.kimi/config.toml`
and select the model alias from the CLI.

## Configure Aixy

```toml theme={null}
default_model = "aixy-coding"

[providers.aixy]
type = "openai"
base_url = "https://api.aixy-gateway.com/v1"
api_key = "gak_your_project_key"

[models.aixy-coding]
provider = "aixy"
model = "openai/gpt-4.1-mini"
max_context_size = 128000
```

Replace the model with an ID returned by Aixy's `/v1/models`, including an `aixy/<route>`. Restart
Kimi Code and use `/model` to choose the `aixy-coding` alias when it is not the default. Set
`max_context_size` to a verified limit for your selected model or every target behind its route;
128,000 is an example. Test a message and inspect it in [Activity](/observe/activity).

<Warning>
  `~/.kimi/config.toml` contains the API key in this setup. Keep it outside the repository and
  restrict its local file permissions.
</Warning>

See [Kimi Code's provider configuration](https://moonshotai.github.io/kimi-code/en/configuration/providers.html)
for capabilities such as thinking and image input.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.