Kilo Code Setup Tutorial
This tutorial will guide you through adding your CheapTokenRouter API key to the Kilo Code extension in VSCode.
Prerequisites
Before you begin, make sure you have:
- A CheapTokenRouter API key
- VSCode installed
- Kilo Code extension installed in VSCode
Step 1: Get Your CheapTokenRouter API Key
- Navigate to your CheapTokenRouter dashboard
- Goto the API Keys module [https://cheaptokenrouter.com/dashboard/keys]
- Click Create Key and give it a nickname / alias memorable to you
- Copy down this API key and store it securely until you need to use it
Step 2: Install Kilo Code (if necessary)
- Open VSCode
- Goto Extension, search for Kilo Code and install it if you haven't already
- Click on the Kilo Code icon once installed, and if using a fresh install, click on Use your own API key.
Step 3: Go To Kilo Code Settings / API Configuration
- In the icon list at the top right, click on the Gear for Settings
Step 4: Add Your Chosen Model
- Under Configuration Profile, click the + icon and enter a profile name for the model you want to save and use. In the example above, we choose GLM 4.5
- Select the API Provider type as OpenAI Compatible
- For the Base URL, use the following URL:
https://api.cheaptokenrouter.com/v1
- Enter in your API Key from Step 1 in the API Key input section
- Select the model you desire in the Model Drop down
Step 5: Configure Your Model
- We recommend clicking Enable streaming and Include max output tokens.
- For the Context Window Size, it should be pre-filled in with the amount that's in the Model card on the website. If not, feel free to input it or override.
- Make sure you put in the Input Price and Output Price that corresponds to the pricing on the CheapTokenRouter model page so Kilo Code can accurately track your costs.
- If you want the model to operate at a specific temperature, click on Advanced settings and then check the "Use custom temperature" checkbox and enter the temperature that you like. By default, we try to tweak each model's temperature to be good for coding out of the box so you don't need to do this step, but it varies by model and what you're trying to build.
- Click the blue Save button at the top to save all this info
Troubleshooting
API Key Not Working
- Double-check that you copied the entire API key
- Ensure your API key is still active in your CheapTokenRouter account
- Try regenerating your API key if needed