Kilo Code API Setup — Connect APIClaw as Your AI Backend
Kilo Code is a VS Code extension that brings AI-assisted coding into your editor. It supports configuring a custom OpenAI-compatible API endpoint, which means you can route all its model calls through APIClaw. You get access to Claude, GPT-4o, Gemini, and every other model APIClaw supports from within Kilo Code, billed at a flat monthly rate instead of per token.
What is Kilo Code?
Kilo Code adds an AI chat panel, inline code completion, and agentic task execution to VS Code. It works by sending requests to an AI model API and displaying the results directly in the editor. Like similar tools, it supports using your own API key and a configurable base URL, which is the integration point APIClaw uses.
Because Kilo Code is OpenAI-compatible at the API level, it works with any gateway that speaks the same format. APIClaw does exactly that—it translates requests to any supported provider's native format and returns a standardized OpenAI-shaped response. From Kilo Code's perspective, it is talking to a standard API.
Step-by-step configuration
Open VS Code and access the Kilo Code settings. The extension typically exposes a provider selection and fields for API key and base URL. Set the provider to "OpenAI Compatible" and fill in the APIClaw endpoint:
# In Kilo Code extension settings:
# Provider: OpenAI Compatible
# Base URL: https://apiclaw.biz/v1
# API Key: sk-your-apiclaw-key
# Model: claudeSave the settings and open the Kilo Code chat panel. Send a test prompt to confirm the connection is working. If Kilo Code surfaces an error, check that the API key starts with sk- and that the base URL ends with /v1.
Testing the API connection directly
Before or after configuring Kilo Code, you can verify the credentials work independently with a curl request. This is useful for isolating whether an issue is with the credentials, the extension configuration, or the extension itself:
curl https://apiclaw.biz/v1/chat/completions \
-H "Authorization: Bearer sk-your-apiclaw-key" \
-H "Content-Type: application/json" \
-d '{
"model": "claude",
"messages": [
{
"role": "user",
"content": "Write a Python function to reverse a linked list."
}
]
}'A successful response returns a JSON object with a choices array containing the model's reply. You can also confirm the request appeared in the APIClaw dashboard under Logs, where you will see the model, latency, and key used.
Using the same credentials from your own code
The API key you configure in Kilo Code works identically from any OpenAI-compatible client. If you are building custom tooling, scripts, or automation alongside your Kilo Code workflow, you can reuse the same credentials:
import openai
client = openai.OpenAI(
base_url="https://apiclaw.biz/v1",
api_key="sk-your-apiclaw-key",
)
# Same credentials Kilo Code uses
response = client.chat.completions.create(
model="claude",
messages=[
{"role": "system", "content": "You are a helpful coding assistant."},
{"role": "user", "content": "Explain async/await in JavaScript."},
],
)
print(response.choices[0].message.content)This is useful for batch processing tasks, pre-commit hooks that analyze code, or CI steps that use an AI model for linting or documentation generation. All requests from all consumers are visible in the same APIClaw dashboard.
Switching models inside Kilo Code
Once the endpoint is set to APIClaw, you can change the model field in Kilo Code's settings to any model APIClaw supports. You might use Claude for complex reasoning tasks—architecture questions, debugging tricky failures, writing specifications—and a faster model for inline completions or quick lookups where response latency matters more than depth.
APIClaw also supports model fallbacks configured at the gateway level. If the model Kilo Code requests is temporarily unavailable at the provider, APIClaw routes to the fallback and returns a response. The extension never sees an error from provider-side availability issues, only from actual credential or quota problems.
Managing usage across the team
If you have a team of developers each running Kilo Code, APIClaw's virtual key system lets you issue each developer a distinct key that routes through the same plan. Each key shows up separately in the Logs view, so you can see who is making requests and to which models. You can set per-key request budgets to ensure one developer's heavy Kilo Code session does not exhaust the daily allowance for the rest of the team.
Virtual keys are created and revoked from the API Keys section of the APIClaw dashboard. Each developer adds their own virtual key to Kilo Code settings. When someone leaves the team, you revoke their key in the dashboard without touching any other configuration.
Why flat-rate billing matters for an IDE extension
Coding tools like Kilo Code are interactive: they fire requests as you type, as you ask questions, and as they verify their own suggestions. The request pattern is bursty and hard to predict. Per-token billing turns active coding sessions into unpredictable cost events. A productive afternoon debugging a hard problem with AI assistance can generate thousands of tokens.
With APIClaw's daily request ceiling, the maximum cost of a day of heavy Kilo Code use is your plan price divided by thirty. There is no scenario where one session generates an unexpected overage. This makes it reasonable to use Kilo Code as aggressively as it is useful, rather than conservatively to avoid a surprise bill.
Observability and request logs
Every request Kilo Code sends through APIClaw appears in the Logs dashboard with the model selected, response latency, and which virtual key triggered the request. This is useful for understanding your Kilo Code usage patterns—which models you use most, when during the day you are most active, and whether you are approaching the daily ceiling. No external logging setup is required; it is built into the gateway.
Getting started
Sign up at apiclaw.com/ui/signup/. Every new account includes 50 free requests—enough to configure Kilo Code, test a few prompts, and confirm the integration works before choosing a plan. Copy your API key from the dashboard, enter it in Kilo Code settings alongside the APIClaw base URL, and start using the extension immediately.
Ready to get started?
Every new account includes 50 free requests. No card required.
Create your free account