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

# Kimi Code | AI Gateway

> Route Kimi Code model calls through Orq.ai AI Gateway for unified observability, cost tracking, and model governance.

Route every model call Kimi Code makes through the [**Orq.ai AI Gateway**](/docs/ai-gateway/get-started/quickstart) by editing a single configuration file. Requests appear in [Traces](/docs/ai-gateway/traces) automatically.

## Prerequisites

* [Kimi Code](https://code.kimi.com) installed:

<CodeGroup>
  ```bash macOS / Linux theme={"theme":{"light":"github-light","dark":"github-dark"}}
  curl -fsSL https://code.kimi.com/kimi-code/install.sh | bash
  ```

  ```bash Homebrew theme={"theme":{"light":"github-light","dark":"github-dark"}}
  brew install kimi-code
  ```

  ```powershell Windows theme={"theme":{"light":"github-light","dark":"github-dark"}}
  irm https://code.kimi.com/kimi-code/install.ps1 | iex
  ```
</CodeGroup>

* Active **Orq.ai** account with **AI Gateway** access
* [Orq.ai API key](/docs/ai-gateway/api-keys)

## Setup

Kimi Code is OpenAI-compatible. Edit `~/.kimi-code/config.toml` to add an **Orq.ai** provider pointed at the router, and register each model as its own `[models."..."]` block:

```toml theme={"theme":{"light":"github-light","dark":"github-dark"}}
default_model = "orq/claude-sonnet-4-6"

[providers.orq]
type = "openai"
api_key = "<ORQ_API_KEY>"
base_url = "https://api.orq.ai/v3/router"

[models."orq/claude-sonnet-4-6"]
provider = "orq"
model = "anthropic/claude-sonnet-4-6"
max_context_size = 200000
max_output_size = 64000
capabilities = ["thinking", "tool_use"]
display_name = "Claude Sonnet 4.6"

[models."orq/gpt-4o"]
provider = "orq"
model = "openai/gpt-4o"
max_context_size = 128000
max_output_size = 16384
capabilities = ["tool_use"]
display_name = "GPT-4o"
```

Replace `<ORQ_API_KEY>` with an [API key](/docs/ai-gateway/api-keys). If `~/.kimi-code/config.toml` does not exist yet, create it. Each `model` value is an identifier from the **AI Gateway** catalog, so add a `[models."..."]` block for every model you want. `default_model` sets the one loaded at startup; switch between registered models at any time with `/model` inside Kimi Code.

Launch Kimi Code:

```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
kimi
```

To configure the provider through the interactive manager instead of editing the file, run `/provider` inside Kimi Code.

## Verification

Once configured, send a prompt in Kimi Code. The response appears in the terminal and the trace appears in [**Orq.ai** Traces](/docs/ai-gateway/traces) with the model identifier you selected.
