Skip to main content
Route every model call Kimi Code makes through the Orq.ai AI Gateway by editing a single configuration file. Requests appear in Traces automatically.

Prerequisites

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

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:
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. 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:
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 with the model identifier you selected.