Kilo Code OpenAI compatible provider: security models in the extension and the CLI

Two ways to add the API to Kilo Code: the Custom provider dialog under Providers, or a kilo.jsonc block with the base URL, the key and each model id with its cost and limits. Extension and CLI, what an agent turn costs and the errors.

Steps checked November 2, 2026 · prices as of November 18, 2026

Kilo Code runs in the editor and in the terminal, which is where a tester lives during an engagement. The stock models behind it balk at offensive work, even when the target is in scope. So swap the model. Kilo accepts a custom OpenAI-compatible provider through a dialog in the extension’s Providers settings, or through a provider block in kilo.jsonc that the extension and the CLI both read. After either, a security-tuned or uncensored build answers in the chat panel and at the prompt, and it edits files and runs commands through tool calls. Reuse the ids in Cursor, OpenCode and Claude Code.

What you need

A key from the console with credit on it, Kilo Code as the editor extension or the kilo CLI, and a project you are cleared to work in: your own tooling, an engagement repository, a CTF challenge. Then pick one of two doors; both lead to the same place.

The extension’s door is Settings (the gear icon) → Providers → Custom provider, the last entry in the list. A dialog collects four things: which API format, the base URL, the key, the model ids. Kilo Code’s bundled providers are listed on the same screen.

The CLI’s door, and the only one for things the dialog never shows, is kilo.jsonc (kilo.json also works). The global copy is ~/.config/kilo/kilo.jsonc; a project copy is ./kilo.jsonc or any file under ./.kilo/. Kilo loads both, the project file wins when a key collides, and the CLI has to restart to see an edit. Per the Custom Models docs, a custom model’s context limit, tool-calling flag and variants live in this file whichever client you run.

Choosing a model works the same way on both sides. In the extension, use the selector in the chat prompt area or type /models; in the CLI, /models alone.

From a blank panel to a first answer

Make a key in the console before anything else. Then follow whichever path fits how you work.

In the extension

  1. Settings → Providers → Custom provider.
  2. Provider ID: pentestllm. Display name: PentestLLM.
  3. Provider API: OpenAI Compatible, because this API answers /v1/chat/completions. Skip the Responses and Messages options; they target other endpoint types.
  4. Base URL: https://api.pentestllm.ai/v1. API key: the full sk-ptl- key.
  5. Models: once the base URL and key are valid, Kilo Code pulls the list from /v1/models into a picker you can search. Check the ids you need, or add them manually by id and display name. These three are a good start:
model ids
1glm-5.3-uncensored
2glm-5.3-flash-uncensored
3deepseek-v4.1-flash-abliterated
  1. Leave Headers blank and press Submit. The ids now show in the chat’s model selector; choose one and send a message.

In kilo.jsonc

  1. Export the key in the shell that will launch Kilo:
shell
1export PENTESTLLM_API_KEY="sk-ptl-live-…"
  1. Paste this provider block into ~/.config/kilo/kilo.jsonc, the global file. Its provider key is the one Kilo’s docs use in their OpenAI-compatible sample. Names, prices and limits under models were read from the catalog when this page rendered; any other id on the models page takes an entry of the same shape:
~/.config/kilo/kilo.jsonc
1{
2 "$schema": "https://app.kilo.ai/config.json",
3 "model": "openai-compatible/glm-5.3-uncensored",
4 "provider": {
5 "openai-compatible": {
6 "options": {
7 "apiKey": "{env:PENTESTLLM_API_KEY}",
8 "baseURL": "https://api.pentestllm.ai/v1"
9 },
10 "models": {
11 "glm-5.3-uncensored": {
12 // "tool_call": true, once the model page lists tool calls
13 "name": "GLM-5.3 Uncensored",
14 "cost": { "input": 0.282, "output": 0.846, "cache_read": 0.0799 }
15 },
16 "glm-5.3-flash-uncensored": {
17 // "tool_call": true, once the model page lists tool calls
18 "name": "GLM-5.3 Flash Uncensored",
19 "cost": { "input": 0.10528, "output": 0.36848, "cache_read": 0.010528 }
20 },
21 "deepseek-v4.1-flash-abliterated": {
22 // "tool_call": true, once the model page lists tool calls
23 "name": "DeepSeek V4.1 Flash Abliterated",
24 "cost": { "input": 0.84875, "output": 1.6975, "cache_read": 0.1455 }
25 }
26 }
27 }
28 }
29}
  1. Run kilo in the project. The model line already selects glm-5.3-uncensored. For the rest of a session, /models switches to any other id under openai-compatible; for one run, kilo -m openai-compatible/glm-5.3-uncensored does it.

Kilo honours {env:PENTESTLLM_API_KEY} in trusted config alone, meaning the global file, a file named by KILO_CONFIG, or an organisation-managed one. Inside a project kilo.jsonc the reference is skipped with a warning. Either keep the whole block global, or commit a project file with everything except apiKey and leave the key in the global file. That split suits a shared engagement repo: the project file can be committed, the key never is.

A first task: ask the agent to read the proof of concept you have for a host in scope and explain each step before you run it, or hand it a packet capture summary and ask for the detection rule. To see how a build answers before any of this, the home page gives a few demo turns with no account and the playground runs the same catalog in a browser.

Each setting, one line

Provider API
OpenAI Compatible
the wire format the dialog speaks: Chat Completions, which this API serves
Base URL / options.baseURL
https://api.pentestllm.ai/v1
the address of every request, /v1 included; the dialog also accepts a full /chat/completions URL
API key / options.apiKey
{env:PENTESTLLM_API_KEY}
the full sk-ptl- key, entered in the dialog or pulled from the variable by the global file
Models / models
id → { name, … }
the ids the picker shows, spelled as the models page spells them; the config key is what goes to the API unless an `id` field says otherwise
tool_call
true
marks the model as accepting tool calls, which the agent needs to edit files and run commands; set it once the model page lists tool calls
limit
{ context, output }
context window and longest answer in tokens, from the model page. Leave context unset and Kilo never compacts the conversation
cost
{ input, output, cache_read }
USD per million tokens from the catalog, so kilo stats and the session cost line agree with the bill
model
openai-compatible/glm-5.3-uncensored
the default as provider key / model id; small_model and agent.<name>.model use the same shape

Choosing the build

Kilo Code’s OpenAI Compatible adapter sends OpenAI-format requests, and every build in the catalog answers them. Deep into a session, a single turn resends the whole conversation, each file Kilo opened and each tool result, so input tokens dominate the bill and the build with the cheapest input rate is cheapest per turn. The right-hand column shows whether a build accepts tool calls, the same fact as the tool_call flag above; without it the agent cannot edit a file or run a shell command.

ModelOne agent turnTool calls
GLM-5.3 Uncensored$0.01model page
GLM-5.3 Flash Uncensored$0.0047model page
DeepSeek V4.1 Flash Abliterated$0.04model page
DeepSeek V4 Pro Uncensored$0.04model page
GLM-5.3 Abliterated$0.09model page
GLM-5.3 Flash Code Uncensored$0.25model page

Costed at 40,000 input tokens and 1,200 output tokens, catalog prices of 2026-11-18. The tool-call column repeats what the catalog publishes; a link means the model page has the answer.

Uncensored models and their prices per million tokens
GLM-5.3 Uncensoredglm-5.3-uncensoredUncensored$0.282$0.846
GLM-5.3 Flash Uncensoredglm-5.3-flash-uncensoredUncensored$0.1053$0.3685
DeepSeek V4.1 Flash Abliterateddeepseek-v4.1-flash-abliteratedAbliterated$0.8488$1.6975
DeepSeek V4 Pro Uncensoreddeepseek-v4-pro-uncensoredUncensored$0.97$1.94
GLM-5.3 Abliteratedglm-5.3-abliteratedAbliterated$2.1825$4.365
GLM-5.3 Flash Code Uncensoredglm-5.3-flash-code-uncensoredUncensored$6.00$6.00

Prices per million tokens, read from the live catalog on 2026-11-18.

Kilo splits the work across roles: the main model, a Small Model for session titles and commit messages, and a Subagent Model for the task tool. Set all three under Settings → Models, or as small_model and subagent_model in kilo.jsonc. Put a fast build on the small model and a strong one on the main model and the housekeeping calls stay off the expensive id. For a day of tooling or exploit work, the uncensored coding AI guide lines the code builds up and prices a full day on each.

Prove it works

Ask the API which models your key may call. The dialog’s model picker makes this same request, so every id it offered has to be in the answer:

shell
1curl https://api.pentestllm.ai/v1/models -H "Authorization: Bearer sk-ptl-live-…"

Next, send one request shaped like Kilo Code’s. The -i flag prints the response headers, which carry the request id and, on a non-streamed reply, the charge in USD.

shell
1curl -i https://api.pentestllm.ai/v1/chat/completions \
2 -H "Authorization: Bearer sk-ptl-live-…" \
3 -H "Content-Type: application/json" \
4 -d '{"model": "glm-5.3-uncensored", "messages": [{"role": "user", "content": "Reply with the single word ok."}]}'

For the CLI, confirm the provider block was read:

shell
1kilo models openai-compatible

That prints the ids under models; kilo config check reports file errors. Now send Kilo a message on one of your ids and open the console’s usage page: the request is listed with its token counts and its charge.

When it breaks

  • 401 invalid_api_key (the dialog shows “Invalid API Key”): wrong or revoked key, or PENTESTLLM_API_KEY was never exported in the shell that launched Kilo and apiKey resolved to nothing. Copy the key from the console once more, or export it and relaunch.
  • 404 model_not_found (the dialog shows “Model Not Found”): no such id on the models page. Compare the spelling. In the file, Kilo sends the key under models, not the name value.
  • 402 insufficient_balance: not enough credit for this request; top up in the console. 402 monthly_limit_reached: the key reached the monthly cap you gave it.
  • 403 scope_denied: this key is restricted to a set of models and the one you asked for is outside it.
  • 429 rate_limited: the key is over its rate limit. Read retry-after on the response.
  • The dialog’s model list stays blank: the fetch only runs when both the base URL and the key are valid. Correct whichever is wrong and press Fetch models, or type the ids in yourself.
  • Kilo warns that {env:PENTESTLLM_API_KEY} was ignored: you put the reference in a project kilo.jsonc. Relocate the block to ~/.config/kilo/kilo.jsonc, or point KILO_CONFIG at the file.
  • kilo models omits the provider: the model line and the block’s provider key / model key disagree, or the CLI was not restarted after the edit. kilo debug config shows what actually loaded.
  • The agent describes an edit but never applies it: tool_call is missing on that model, so Kilo sends no tools. Once the model page lists tool calls, put "tool_call": true on the entry.
  • Requests start failing as the conversation grows: limit.context is unset, which Kilo reads as zero, and compaction never runs. Copy limit from the model page.
  • Connection errors after entering a full URL in Base URL: the path must end in /chat/completions. https://api.pentestllm.ai/v1 by itself is the easier form.

Questions

Yes. The Providers settings end in a Custom provider dialog whose Provider API field offers OpenAI Compatible for Chat Completions endpoints, and kilo.jsonc accepts the same provider as a block with baseURL and apiKey. This API is one of those endpoints, so either path on this page is the whole setup.

A key from this console, complete with its sk-ptl- prefix. The dialog takes it in the API key field; the file reads it from an environment variable through {env:…}, which Kilo honours only in the global config or a file named by KILO_CONFIG, never in a project file.

Yes. Providers appear side by side in the model selector and in /models, so the custom entry is an addition, not a replacement. A whitelist on the provider block trims what it offers, and the per-agent model keys can pin a subagent to a cheap id while the main agent stays on a strong one.

On the builds that accept tool calls, yes, and only when tool_call is true on the entry, because Kilo sends no tools otherwise. The table above shows which builds the catalog confirms; for the rest, check the model page and add the flag once it lists tool calls. See the models page.

Every model above is on the uncensored model list with its live price per million tokens. Per-token pricing sets the whole catalog side by side, and the family directory groups the builds by base model.

Get a keyPrepaid from $10, no subscription.

New models and price changes, once a month.

New uncensored builds with their prices, price moves, and what the daily model check found.

Help