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

# Kilo Code BetterToken setup guide

> Connect BetterToken to Kilo Code with Codex group model IDs.

Kilo Code is a VS Code extension. To connect BetterToken, choose the OpenAI Compatible provider and use a model ID from the Codex group.

## Prerequisites

* VS Code installed
* BetterToken API Key (register here (`https://www.bettertoken.ai/register`))

## Setup

<Steps>
  <Step title="Clear conflicting environment variables">
    ```bash theme={null}
    unset OPENAI_API_KEY
    unset OPENAI_BASE_URL
    ```
  </Step>

  <Step title="Open Kilo Code settings">
    Open the Kilo Code settings UI.
  </Step>

  <Step title="Configure the API provider">
    Fill in:

    * **API Provider** → `OpenAI Compatible`
    * **Base URL** → `https://www.bettertoken.ai/v1`
    * **API Key** → your BetterToken API Key
    * **Model** → a **Codex group** model ID copied from the model plaza (`https://www.bettertoken.ai/pricing`)
  </Step>

  <Step title="Only configure extra headers when the official docs explicitly require them">
    The official Kilo Code material we checked mentions optional custom headers for OpenAI-compatible providers, but it does not treat `User-Agent` as a required BetterToken setup step.

    If you are also using a custom gateway, tenant routing, observability, or caching layer, add headers only according to that upstream service's official docs.
  </Step>

  <Step title="Restart Kilo Code">
    After changing the config, restart VS Code or reload the Kilo Code extension so the new settings take effect.
  </Step>
</Steps>

<Note>
  If you need extra headers, follow the current Kilo Code docs or your upstream gateway requirements instead of assuming `User-Agent` is mandatory for BetterToken.
</Note>
