Kilo Code supports a built-in OpenAI Compatible provider. You need the current extension, your own API key, a compatible Base URL, and a current Model ID. Restart the extension after saving the provider, send one short prompt, and verify the model, status, and token usage in the Dashboard.
Want to repeat the setup? Create a BetterToken account and API key, then keep the current Kilo Code guide open. This article leaves the Model ID as a placeholder because model availability can change.
Prerequisites
You need VS Code, the current Kilo Code extension from an official source, your own BetterToken API key, a current Model ID, and an empty test project.
BetterToken covers the API endpoint. It does not guarantee access to the Kilo Code website, VS Code Marketplace, downloads, or updates. The BetterToken API endpoint can be reached from Russia without a VPN; that statement does not apply to third-party sites.
1. Install Kilo Code
Open Extensions in VS Code, find Kilo Code, and install it from the official listing. If Marketplace is unavailable, use only an alternative documented by Kilo Code, such as an official release source. Do not download a VSIX from an unknown mirror.
Open the Kilo Code panel. If it does not appear, run Developer: Reload Window from the Command Palette.
2. Create a dedicated API key
Sign in to your BetterToken Workspace and create a key for the test. Do not paste it into a prompt, issue, screenshot, or repository file. Check whether old OPENAI_API_KEY or OPENAI_BASE_URL variables from another provider could override the extension, but never print secret values to a public log.
3. Add the provider
Open Kilo Code settings and enter:
- API Provider:
OpenAI Compatible. - Base URL:
https://www.bettertoken.ai/v1. - API Key: your BetterToken key.
- Model: the exact current Model ID from the model catalog.
Do not append /chat/completions or /responses; Kilo Code builds the resource path. Extra headers are not part of the basic BetterToken setup. Add them only when a documented upstream service requires them.
Save the provider and fully reload VS Code or the extension.
4. Send a first request
Use an empty test folder and a prompt with an easily checked result:
Return only JSON: {"tool":"kilo-code","sum":4}. Do not change files.
The connection is confirmed when Kilo Code returns valid JSON, the selected Model ID is used, the BetterToken Dashboard contains a successful request, and the record shows applicable input, output, and cache tokens with the corresponding charge.
Common errors
For 401 or Unauthorized, copy the key again and remove accidental spaces. For 404, verify that the Base URL is exactly https://www.bettertoken.ai/v1 and contains no full resource path. For model not found, copy the current Model ID rather than a name from an old article or screenshot. If settings appear unchanged, save the provider, reload the VS Code window, start a new Kilo session, and check for old environment overrides.
This test confirms the model API through the OpenAI-compatible provider. It does not confirm every Kilo Code feature, Marketplace service, account flow, MCP server, or update path. Diagnose those layers separately.