If you work with AI-assisted coding tools in Visual Studio Code, managing access to different AI providers can quickly become complicated. The video “How to Setup Token Router in Vscode” demonstrates a practical solution: using Token Router as a single API gateway for multiple AI models.
This guide walks through the process in a beginner-friendly way and explains why this setup can simplify your development workflow.
Why Use Token Router?
Token Router acts as a unified access layer for AI models. Instead of configuring separate APIs for each provider, you connect VS Code to Token Router once and then choose from the available models inside your coding extension.
Benefits
- One API for multiple models
- Simpler configuration management
- Easy switching between models
- Centralized billing and usage tracking
- Compatible with OpenAI-style integrations
For developers who frequently experiment with different large language models, this can save a significant amount of setup time.
Step 1: Create a Token Router Account
Start by visiting tokenrouter.com.
Sign-up options
- Email and password
- Google account
- X (formerly Twitter) account
After registering, log in to access the console dashboard.
The dashboard is where you manage API keys, monitor usage, and configure access to supported AI models.
Step 2: Generate Your API Key
Once inside the dashboard:
- Open the API Key section.
- Click Create New Key.
- Give the key a recognizable name, such as VSCode-KiloCode.
After creation, Token Router provides two important values:
- API Key
- Base URL
Copy both of these values and keep them secure. You will need them when configuring VS Code.
Tip: Treat your API key like a password. Avoid committing it to Git repositories or sharing it publicly.
Step 3: Install the Kilo Code Extension
Open Visual Studio Code and install the Kilo Code extension from the Extensions Marketplace.
To install
- Press Ctrl+Shift+X (Windows/Linux) or Cmd+Shift+X (macOS).
- Search for Kilo Code.
- Click Install.
After installation, the extension will appear in the VS Code sidebar.
Step 4: Configure Token Router in VS Code
Now connect Kilo Code to Token Router.
Open Kilo Code Settings
- Open the Kilo Code extension.
- Navigate to Settings.
- Find the Provider section.
Add a Custom Provider
Choose:
- Provider:
Custom Provider - Click Connect
Fill in the configuration:
| Setting | Value |
|---|---|
| Display Name | Token Router |
| API Type | OpenAI compatible |
| Base URL | Paste the Token Router Base URL |
| API Key | Paste your Token Router API Key |
Save the configuration.
This works because Token Router exposes an OpenAI-compatible API, allowing tools designed for OpenAI integrations to communicate with it seamlessly.
Step 5: Select AI Models
After connecting successfully, you can choose which AI models to use.
The video mentions models such as Kimmy K3, but the available list may change over time as Token Router adds new providers and models.
Add a model
- Open the Model Selection area in Kilo Code.
- Browse the available models.
- Click Add for the models you want to use.
You can typically switch between models directly from the extension interface without changing your API configuration again.
Understanding Pricing and Credits
One important point highlighted in the video is that Token Router uses a pay-as-you-go pricing model.
What this means
- You purchase API credits.
- Credits are consumed based on the model you use and the number of tokens processed.
- Different models may have different costs.
The creator also notes that Token Router may occasionally offer developer bonus credits when you make an initial purchase, which can be useful for testing the service before committing to larger usage.
Always check the current pricing and credit policies in the Token Router dashboard, as these offers can change.
Common Troubleshooting Tips
“Connection Failed”
- Verify the Base URL is copied exactly.
- Ensure there are no extra spaces before or after the URL.
- Confirm that OpenAI compatible is selected as the API type.
“Unauthorized” Error
- Double-check the API key.
- Make sure the key has not been deleted or regenerated in the dashboard.
Models Not Appearing
- Refresh the Kilo Code extension.
- Reopen VS Code after saving the provider settings.
- Confirm that your Token Router account has sufficient credits.
Why This Setup Is Useful
Using Token Router with VS Code provides a flexible development environment:
For experimentation
You can compare responses from different AI models without reconfiguring your editor each time.
For teams
A shared Token Router setup can standardize how developers access AI services across projects.
For productivity
Switching models becomes a matter of selecting a different option in the extension rather than managing multiple API integrations manually.
This is especially valuable for developers working with:
- Code generation
- Refactoring assistance
- Documentation writing
- Test creation
- AI-powered debugging workflows
Final Thoughts
The “How to Setup Token Router in Vscode” video presents a straightforward method for connecting Token Router to Visual Studio Code through the Kilo Code extension. The process can be summarized in five simple steps:
- Create a Token Router account.
- Generate an API key and copy the Base URL.
- Install the Kilo Code extension in VS Code.
- Configure a Custom Provider using the OpenAI-compatible API settings.
- Select the AI models you want to use and start coding.
With a single configuration, you gain access to multiple AI models through one unified API endpoint, making VS Code a more powerful and flexible AI-assisted development environment.
If you regularly use AI tools for coding, documentation, or debugging, this setup is worth trying because it reduces configuration overhead and makes switching between models much more convenient.