Skip to content
Relaykit
DocsKilo Code

Extension guide

Kilo Code setup: add a custom OpenAI-compatible provider

Add our gateway to Kilo Code as a custom OpenAI Compatible provider in VS Code or in kilo.jsonc for the CLI, with model ids, auto-fetched models and fixes.

Updated OpenAI formatExtensionView .md
On this page
https://api.oneaiapikey.com/v1

Kilo Code is an open-source coding agent available as a VS Code extension and a CLI. It has first-class support for custom providers, including any endpoint that speaks the OpenAI Chat Completions format. Add our gateway once and every model in the catalogue becomes available in Kilo, billed from one prepaid balance.

What you need

  • Kilo Code installed (the VS Code extension, the CLI, or both).
  • A funded account; top-ups start at $3: create an account.
  • An API key from the API keys page (it starts with sk-).

Option A: VS Code extension

  1. Open Kilo Code’s Settings (gear icon) and go to the Providers tab.
  2. Scroll to the bottom and click Custom provider.
  3. Fill in the dialog:
Custom provider dialog
Provider ID:   relaykit
Display name:  Relaykit
Provider API:  OpenAI Compatible
Base URL:      https://api.oneaiapikey.com/v1
API key:       sk-your-key-here
Models:        pick from the fetched list, or add ids manually
  1. Click Submit to save.

A few details matter here:

  • Provider API must be OpenAI Compatible. Kilo also offers “OpenAI Responses” and “Anthropic Messages” options; stick with OpenAI Compatible for this setup, since it works for every model we serve, Claude included.
  • Base URL is the /v1 root, not a full endpoint such as /v1/chat/completions.
  • Once the URL and key are valid, Kilo fetches the model list from our /v1/models endpoint automatically. If the list stays empty, fix the key or URL and click Fetch models again.

Option B: CLI and config file

The CLI (and any extra model tuning) uses a kilo.jsonc config file. Put the provider in your global config at ~/.config/kilo/kilo.jsonc:

~/.config/kilo/kilo.jsonc
{
  "$schema": "https://app.kilo.ai/config.json",
  "model": "relaykit/claude-sonnet-5",
  "provider": {
    "relaykit": {
      "npm": "@ai-sdk/openai-compatible",
      "name": "Relaykit",
      "options": {
        "baseURL": "https://api.oneaiapikey.com/v1",
        "apiKey": "{env:RELAYKIT_API_KEY}"
      },
      "models": {
        "claude-sonnet-5": { "name": "Claude Sonnet 5", "tool_call": true },
        "gpt-6.1-sol": { "name": "GPT-6.1 Sol", "tool_call": true },
        "deepseek-v4-flash": { "name": "DeepSeek V4 Flash", "tool_call": true }
      }
    }
  }
}

Then store the key in the environment variable the config refers to:

macOS / Linux / Git Bash
export RELAYKIT_API_KEY="sk-your-key-here"
Windows (open a new terminal afterwards)
setx RELAYKIT_API_KEY "sk-your-key-here"

The model key uses the provider-id/model-id format. Keep the {env:...} reference in the global file: Kilo doesn’t resolve environment references in a project-level kilo.jsonc, and you should never commit a raw key to a repository anyway.

Prices are USD per 1M tokens and come straight from our catalogue:

Model idGood forInputOutput
claude-sonnet-5Daily coding, Code review, Writing$2.20$11
claude-opus-5-5Agentic coding, Large refactors, Complex reasoning$4.40$22
gpt-6.1-solCodex CLI, Tool calling, Long context$2.20$11
grok-4.6Fast answers, Research, Chat$2.20$6.60
deepseek-v4-flashBudget coding, Sub-agents, Batch jobs$0.24$0.96

Kilo’s agents lean on tool calls, so mark models with "tool_call": true in the config file. claude-sonnet-5 is a dependable default; deepseek-v4-flash is the budget pick for sub-tasks. The full list lives on the models page.

Verify it works

In VS Code, select one of the gateway’s models in the Kilo model picker and ask a simple question about your project. On the CLI, start Kilo and send a short prompt. A normal reply, plus a matching entry in your console’s usage log, confirms the setup.

To test the key on its own:

curl
curl -sS https://api.oneaiapikey.com/v1/models -H "Authorization: Bearer sk-your-key-here"

Troubleshooting

401 Unauthorized. The key is wrong, disabled, or (in the CLI) the environment variable isn’t set in the terminal that launched Kilo. Re-copy the key and open a fresh terminal after setx.

No models appear in the picker. Auto-fetch failed, which nearly always means a bad key or base URL. Fix it and click Fetch models, or add the ids manually.

404 Not Found. Check the base URL is exactly https://api.oneaiapikey.com/v1, with no trailing slash.

“Model not found” or “no available channel”. The model id doesn’t match the catalogue. In the config file the key under models must be the exact id, such as claude-sonnet-5.

Request timed out. Kilo streams responses, so long generations normally stay alive. For your own scripts, use "stream": true on long outputs, because proxies cut idle non-streaming requests at roughly 100 seconds.

Wrong provider API selected. If you picked “OpenAI Responses” or “Anthropic Messages” by mistake, requests go to the wrong path. Edit the provider and switch it to OpenAI Compatible.

Next steps

See the Cline and OpenCode guides for similar tools, or browse every tool guide. Current per-model rates are on the pricing page.

↑ ↓ moveEnter openEsc close