How to set up the Kilo Code coding agent in VS Code with Ozeki AI Gateway
This guide demonstrates how to configure Kilo Code, an AI-powered coding assistant for Visual Studio Code, to work with Ozeki AI Gateway. You'll learn the complete installation process and configuration steps needed to integrate Kilo Code with your Ozeki AI Gateway setup.
What is Kilo code?
Kilo Code is an AI-powered coding assistant extension for Visual Studio Code that helps developers write code faster and more efficiently. It provides intelligent code completion, generation, and refactoring suggestions powered by large language models. When connected to Ozeki AI Gateway, you authenticate using API keys created in the gateway and access only the AI models that have been configured for your specific provider and routed to your user account. This setup provides significant advantages: you can switch models without reconfiguring Kilo Code (especially useful for teams with multiple developers), view the Kilo system prompt, and track token usage and costs to monitor which developer used how many credits on which model.
Steps to follow
We assume Ozeki AI Gateway is already installed on your system. You can install it on Linux, Windows or Mac.
- Install Kilo Code VS Code extension
- Choose "Use your own API key" on welcome page
- Select OpenAI compatible API provider
- Enter Ozeki AI Gateway URL and user API key
- Select LLM model
- Save configuration
- Test Kilo Code
Create API key for Kilo Code video
Before configuring Kilo Code, you need to create an API key in Ozeki AI Gateway. This video demonstrates how to navigate to the Users section, create a new API key for Kilo Code, and copy it for use in the configuration process. The API key serves as the authentication credential that allows Kilo Code to communicate with your Ozeki AI Gateway.
Create route for Kilo Code video
After creating the API key, you must establish a route in Ozeki AI Gateway that connects your user account to an AI provider. This video shows how to create a route that links your Kilo Code user to a provider like OpenRouter, enabling access to the AI models you've configured.
How to set up the Kilo Code with Ozeki AI Gateway video
The following video demonstrates how to set up Kilo Code with Ozeki AI Gateway step-by-step. The video covers installing the extension, configuring the API connection, and testing the integration with a sample coding task.
Step 1 - Install Kilo Code VS Code extension
Open Visual Studio Code and click on the Extensions icon in the left sidebar. In the search bar, type "Kilo Code" to find the AI coding assistant extension (Figure 3).
Locate the Kilo Code extension in the search results and click the "Install" button. Visual Studio Code will download and install the extension. Wait for the installation to complete before proceeding (Figure 4).
After installation, the Kilo Code icon will appear in the VS Code sidebar. Click on the Kilo Code icon to open the extension's interface. This will display the welcome screen where you can configure the AI provider connection (Figure 5).
Step 2 - Choose "Use your own API key" on welcome page
On the Kilo Code welcome screen select "Use your own API Key" to configure a custom API endpoint. This option allows you to connect Kilo Code to Ozeki AI Gateway (Figure 6).
Step 3 - Select OpenAI compatible provider
From the provider list, select "OpenAI Compatible" as your API provider type. This option works with any API that follows the OpenAI API format, including Ozeki AI Gateway (Figure 7).
Step 4 - Enter Ozeki AI Gateway URL and user API key
Enter your Ozeki AI Gateway base URL in the API endpoint field. Then, enter your Ozeki AI Gateway API key in the API key. Kilo Code authenticates to the gateway using this key (Figure 8).
Step 5 - Select LLM model
Kilo Code will fetch the list of available models from your Ozeki AI Gateway based on your API key. The models shown are those that have been enabled in your provider configuration and routed to your user account. Select the LLM model you want to use for code assistance from the dropdown list (Figure 9).
Step 6 - Save configuration
After entering all the configuration details, scroll down and click the "Let's Go" button to save your settings (Figure 10).
Step 7 - Test Kilo Code
To verify that Kilo Code is working properly with your Ozeki AI Gateway, test it with a simple coding task. The AI will generate code based on your request (Figure 11).
Kilo Code will generate the requested code and display it in the interface. You can review the generated code, insert it into your project, or ask for modifications (Figure 12).
View Kilo Code transaction log video
One of the key advantages of using Ozeki AI Gateway is the ability to monitor usage. This video demonstrates how to access the transaction log in Ozeki AI Gateway to view information about Kilo Code requests, including which developer made requests, which models were used, token consumption, and associated costs.
Final thoughts
You have successfully configured Kilo Code to work with Ozeki AI Gateway, giving you an AI-powered coding assistant that routes through your own on-premises infrastructure. Use it to accelerate your development workflow with code generation, debugging assistance, and documentation creation. All interactions are authenticated through your gateway API key and limited to the providers and models configured for your account.