# Kilo Code

<Callout type="info" title="Note">
  AI Gateway is part of [AI Governance](/beta-docs/ai-coder/ai-governance/), which is
  included with a Premium license.
</Callout>

Kilo Code allows you to configure providers via the UI and can be set up to use AI Gateway.

## Centralized API Key [#centralized-api-key]

<Tabs items="[&#x22;OpenAI Compatible&#x22;, &#x22;Anthropic&#x22;]" groupId="coder-docs-tab:anthropic-openai-compatible" persist="true">
  <Tab value="OpenAI Compatible">
    1. Open Kilo Code in VS Code.
    2. Go to **Settings**.
    3. **Provider**: Select **OpenAI**.
    4. **Base URL**: Enter `https://coder.example.com/api/v2/ai-gateway/openai/v1`.
    5. **API Key*&#x2A;: Enter your &#x2A;*[Coder API token](/beta-docs/admin/users/sessions-tokens/#generate-a-long-lived-api-token-on-behalf-of-yourself)**.
    6. **Model ID**: Enter the model you wish to use (e.g., `gpt-5.2-codex`).

    ![Kilo Code OpenAI Settings](/beta-docs/images/aibridge/clients/kilo-code-openai.png)
  </Tab>

  <Tab value="Anthropic">
    1. Open Kilo Code in VS Code.
    2. Go to **Settings**.
    3. **Provider**: Select **Anthropic**.
    4. **Base URL**: Enter `https://coder.example.com/api/v2/ai-gateway/anthropic`.
    5. **API Key**: Enter your **Coder API token**.
    6. **Model ID**: Select your desired Claude model.

    ![Kilo Code Anthropic Settings](/beta-docs/images/aibridge/clients/kilo-code-anthropic.png)
  </Tab>
</Tabs>

## BYOK (Personal API Key) [#byok-personal-api-key]

<Callout type="info" title="Note">
  Kilo Code supports sending custom headers, but the integration does not currently work reliably with AI Gateway.
</Callout>

**References:** [Kilo Code Configuration](https://kilocode.ai/docs/ai-providers/openai-compatible)
