---
title: "Kilo Code OpenAI compatible setup for uncensored models"
canonical: https://unrestrictable.ai/guides/kilo-code
generated: 2026-11-16T02:57:37.224Z
source: https://unrestrictable.ai/guides/kilo-code
base_url: https://api.unrestrictable.ai/v1
---

# Run an uncensored model in Kilo Code

Add this API to Kilo Code as a custom OpenAI-compatible provider, through the dialog or a kilo.jsonc block, with model ids, limits and cost. Errors included.

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

Kilo Code, the editor extension and its CLI, accepts any OpenAI-compatible endpoint as a custom provider. Add this API once, through the Custom provider dialog or a block in `kilo.jsonc` that both clients read, and the uncensored builds appear in the model selector and can edit files and run commands through tool calls. The identical ids also work in [Cursor](https://unrestrictable.ai/guides/cursor), [OpenCode](https://unrestrictable.ai/guides/opencode) and, behind a router, [Claude Code](https://unrestrictable.ai/guides/claude-code).

## What you need

Three things: a `sk-unr-` key from the [console](https://app.unrestrictable.ai/console), the base URL `https://api.unrestrictable.ai/v1`, and one or more ids from the [models page](https://unrestrictable.ai/models). Nothing else is downloaded or installed.

Kilo Code reads providers from two places. The extension has a **Custom provider** entry at the foot of the list under **Settings** (gear icon) → **Providers**, beside the providers it ships with; the dialog collects the provider, base URL, key and model ids. The CLI, and every setting the dialog leaves out, uses `kilo.jsonc` (`kilo.json` also works): globally at `~/.config/kilo/kilo.jsonc`, per project as `./kilo.jsonc` or a file under `./.kilo/`. Kilo loads both; on a duplicate key the project file wins; the CLI has to be restarted to see an edit. Per the Custom Models docs, a custom model's token limits, tool-calling flag and variants are set in this file whichever client you run.

Switching models: in the extension, the selector above the prompt box or `/models`; in the CLI, `/models`.

## Shortest path: the extension dialog

1. Open **Settings** → **Providers** → **Custom provider**.
2. Type `unrestrictable` as **Provider ID** and `Unrestrictable` as **Display name**.
3. Set **Provider API** to **OpenAI Compatible**. That option speaks Chat Completions, and this API serves `/v1/chat/completions`. The Responses and Messages options target other endpoint shapes.
4. **Base URL** is `https://api.unrestrictable.ai/v1`; **API key** is the full `sk-unr-` key.
5. Under **Models**, once the URL and key check out, Kilo pulls `/v1/models` into a searchable picker. Tick what you want or enter ids and display names yourself. These three are a good first set:

```
glm-5.3-uncensored
glm-5.3-flash-uncensored
deepseek-v4.1-flash-abliterated
```

1. Skip **Headers**, press **Submit**. The ids now sit in the model selector of the chat prompt area. Choose one and send something.

To try a build before touching the editor, [/chat](https://unrestrictable.ai/chat) runs the same models in the browser with three free turns a day and no account, and the [Telegram bot](https://unrestrictable.ai/telegram) gives three free replies a day.

## The kilo.jsonc route for the CLI

1. Export the key in the shell Kilo will start from:

```bash
export UNRESTRICTABLE_API_KEY="sk-unr-live-…"
```

1. Drop this provider block into the global `~/.config/kilo/kilo.jsonc`. The `provider` key copies the Kilo docs’ OpenAI-compatible example. Names, prices and limits under `models` come from the live catalog; any other id on the [models page](https://unrestrictable.ai/models) takes the same shape:

```
{
  "$schema": "https://app.kilo.ai/config.json",
  "model": "openai-compatible/glm-5.3-uncensored",
  "provider": {
    "openai-compatible": {
      "options": {
        "apiKey": "{env:UNRESTRICTABLE_API_KEY}",
        "baseURL": "https://api.unrestrictable.ai/v1"
      },
      "models": {
        "glm-5.3-uncensored": {
          // add "tool_call": true when the model page confirms tool calls
          "name": "GLM-5.3 Uncensored",
          "cost": { "input": 0.282, "output": 0.846, "cache_read": 0.0799 }
        },
        "glm-5.3-flash-uncensored": {
          // add "tool_call": true when the model page confirms tool calls
          "name": "GLM-5.3 Flash Uncensored",
          "cost": { "input": 0.10528, "output": 0.36848, "cache_read": 0.010528 }
        },
        "deepseek-v4.1-flash-abliterated": {
          // add "tool_call": true when the model page confirms tool calls
          "name": "DeepSeek V4.1 Flash Abliterated",
          "cost": { "input": 0.84875, "output": 1.6975, "cache_read": 0.1455 }
        }
      }
    }
  }
}
```

1. Run `kilo` inside the project. `model` makes `glm-5.3-uncensored` the default, `/models` swaps in another id under **openai-compatible** for that session, and `kilo -m openai-compatible/glm-5.3-uncensored` sets one for a single run.

Kilo resolves `{env:UNRESTRICTABLE_API_KEY}` only in config it trusts: the global file, a file named in `KILO_CONFIG`, or one managed by an organization. Put the same reference in a project `kilo.jsonc` and Kilo warns and ignores it. So either the global file gets the whole block, or the project file keeps the block minus `apiKey` and only the key sits in the global file.

## Each setting, explained

- Provider API: OpenAI Compatible the wire format the dialog speaks, Chat Completions, which is the one this API answers
- Base URL / options.baseURL: https://api.unrestrictable.ai/v1 the destination of every request; keep the trailing /v1. A full /chat/completions URL is also accepted by the dialog
- API key / options.apiKey: {env:UNRESTRICTABLE_API_KEY} the complete sk-unr- key, pasted into the dialog or pulled from the variable by the global file
- Models / models: id → { name, … } what the picker lists, each id spelled as on the models page; the object key is what reaches the API unless an `id` field says otherwise
- tool_call: true marks the model as able to take tool calls; without it the agent cannot edit files or run commands. Set it when the model page lists tool calls
- limit: { context, output } context window and maximum reply, in tokens, as the model page gives them. Leave context unset and Kilo stops compacting
- cost: { input, output, cache_read } USD per million tokens from the catalog, so kilo stats and the session cost line agree with your bill
- model: openai-compatible/glm-5.3-uncensored the default in provider key / model id form; small_model and agent.<name>.model use the same notation

## Which build to put in the config

Through the OpenAI Compatible adapter Kilo sends plain OpenAI-format requests, which every build on the models page accepts. Each agent turn resends the whole conversation plus every file and tool result Kilo has gathered, so the bill is mostly input tokens, and a low input price is what makes a turn cheap. The last column shows whether the catalog confirms tool calls for the build; that is the `tool_call` flag, which the agent loop needs before it can edit or run anything.

| Model | One agent turn | Tool calls |
| --- | --- | --- |
| [GLM-5.3 Uncensored](https://unrestrictable.ai/models/glm-5.3-uncensored) | $0.01 | [model page](https://unrestrictable.ai/models/glm-5.3-uncensored) |
| [GLM-5.3 Flash Uncensored](https://unrestrictable.ai/models/glm-5.3-flash-uncensored) | $0.0047 | [model page](https://unrestrictable.ai/models/glm-5.3-flash-uncensored) |
| [DeepSeek V4.1 Flash Abliterated](https://unrestrictable.ai/models/deepseek-v4.1-flash-abliterated) | $0.04 | [model page](https://unrestrictable.ai/models/deepseek-v4.1-flash-abliterated) |
| [DeepSeek V4 Pro Uncensored](https://unrestrictable.ai/models/deepseek-v4-pro-uncensored) | $0.04 | [model page](https://unrestrictable.ai/models/deepseek-v4-pro-uncensored) |
| [GLM-5.3 Abliterated](https://unrestrictable.ai/models/glm-5.3-abliterated) | $0.09 | [model page](https://unrestrictable.ai/models/glm-5.3-abliterated) |
| [GLM-5.3 Flash Code Uncensored](https://unrestrictable.ai/models/glm-5.3-flash-code-uncensored) | $0.25 | [model page](https://unrestrictable.ai/models/glm-5.3-flash-code-uncensored) |

A turn of 40,000 input and 1,200 output tokens at catalog prices on 2026-11-16. The tool calls column follows what the catalog publishes; otherwise the model page has the answer.

| Model | Build | Input $/M | Output $/M |
| --- | --- | --- | --- |
| [GLM-5.3 Uncensored](https://unrestrictable.ai/models/glm-5.3-uncensored) glm-5.3-uncensored | Uncensored | $0.282 | $0.846 |
| [GLM-5.3 Flash Uncensored](https://unrestrictable.ai/models/glm-5.3-flash-uncensored) glm-5.3-flash-uncensored | Uncensored | $0.1053 | $0.3685 |
| [DeepSeek V4.1 Flash Abliterated](https://unrestrictable.ai/models/deepseek-v4.1-flash-abliterated) deepseek-v4.1-flash-abliterated | Abliterated | $0.8488 | $1.6975 |
| [DeepSeek V4 Pro Uncensored](https://unrestrictable.ai/models/deepseek-v4-pro-uncensored) deepseek-v4-pro-uncensored | Uncensored | $0.97 | $1.94 |
| [GLM-5.3 Abliterated](https://unrestrictable.ai/models/glm-5.3-abliterated) glm-5.3-abliterated | Abliterated | $2.1825 | $4.365 |
| [GLM-5.3 Flash Code Uncensored](https://unrestrictable.ai/models/glm-5.3-flash-code-uncensored) glm-5.3-flash-code-uncensored | Uncensored | $6.00 | $6.00 |

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

Kilo has three model roles: the main model, a **Small Model** that writes session titles and commit messages, and a **Subagent Model** behind the `task` tool. They live under **Settings → Models**; in `kilo.jsonc` they are `small_model` and `subagent_model`. Give the small role a fast build and the main role a strong one, and the housekeeping never touches the expensive id. [The uncensored coding AI guide](https://unrestrictable.ai/guides/uncensored-coding-ai) goes deeper on the code builds and prices a full day of coding on each.

## Verify the connection

Ask the API which ids your key may call. The dialog’s picker makes this exact request, so everything it showed should come back:

```bash
curl https://api.unrestrictable.ai/v1/models -H "Authorization: Bearer sk-unr-live-…"
```

Now send a single request shaped like Kilo’s. The `-i` flag shows the response headers, among them the request id and, when the answer is not streamed, the charge in USD.

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

For the CLI, make sure the block was read:

```bash
kilo models openai-compatible
```

The output is the ids under `models`; `kilo config check` flags mistakes in the file. Finish by sending a message in Kilo with one of your ids selected. It appears on the console’s usage page with token counts and the charge.

## When it fails

- “Invalid API Key” in the dialog, `401 invalid_api_key` on the wire: a wrong or revoked key, or `UNRESTRICTABLE_API_KEY` was missing from the shell that launched Kilo and `apiKey` arrived empty. Copy the key from the console again, or export it and relaunch.
- “Model Not Found” in the dialog, `404 model_not_found` on the wire: no such id on the models page. Compare the spelling. In the file, Kilo sends the key under `models`, never the `name`.
- `402 insufficient_balance`: the balance cannot cover this request, so add funds in the console. A `402 monthly_limit_reached` instead means the key reached the monthly spend cap you gave it.
- `403 scope_denied`: this key is restricted to specific models, and the one requested is outside that set.
- `429 rate_limited`: the key is over its rate limit; `retry-after` in the response says when to try again.
- Nothing in the dialog’s model list: Kilo fetches only after both the base URL and the key are valid. Correct whichever is wrong, press **Fetch models**, or type the ids in.
- A warning that `{env:UNRESTRICTABLE_API_KEY}` was ignored: the reference lives in a project-level `kilo.jsonc`. Relocate the block to `~/.config/kilo/kilo.jsonc` or point `KILO_CONFIG` at the file.
- `kilo models` leaves the provider out: the `model` value does not match `provider key / model key` from the block, or the CLI is still running the pre-edit config. `kilo debug config` shows what was loaded.
- The agent describes an edit and stops: that model has no `tool_call`, so Kilo sent no tools. Once the model page lists tool calls, add `"tool_call": true` to its entry.
- Requests start failing as the conversation grows: `limit.context` is missing, Kilo treats it as zero and never compacts. Fill in `limit` from the model page.
- Connection errors after entering a full URL as **Base URL**: that form must end in `/chat/completions`. Plain `https://api.unrestrictable.ai/v1` avoids the question.

## Questions

### Can Kilo Code use a custom OpenAI-compatible endpoint?

It can. The Custom provider dialog in the Providers settings has an OpenAI Compatible choice under Provider API for Chat Completions endpoints, and kilo.jsonc accepts the same provider as a block with baseURL and apiKey. Because this API is that kind of endpoint, either route described above is all the setup there is.

### What goes in the API key field for Kilo Code?

The whole key from this console, prefix sk-unr- included. The dialog takes it directly in API key. The file reads it from an environment variable through {env:…}, and Kilo only honors that reference in the global config or a file passed through KILO_CONFIG, not in a project file.

### Will adding this provider replace the one Kilo ships with?

No. Every provider shows up next to the others in the model selector and in /models, so this one is an extra entry. A whitelist on the provider block trims what it offers, and the per-agent model keys can send a subagent to a cheaper id while the main agent keeps a strong one.

### Can the agent edit files and run commands on these builds?

On the builds that accept tool calls, yes, and Kilo includes tools only when tool_call is true for the model. The table above marks the builds the catalog confirms; for the others, 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](https://unrestrictable.ai/models) with its live price per million tokens. [Per-token pricing](https://unrestrictable.ai/pricing) sets the whole catalog side by side, and the [family directory](https://unrestrictable.ai/uncensored) groups the builds by base model.

[Get a key](https://app.unrestrictable.ai/console) Prepaid 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.
