Uncensored models in OpenCode

A provider block in opencode.json: the OpenAI-compatible package, base URL, a key from an env var, uncensored ids. Switch with /models; agent-turn cost; fixes.

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

OpenCode adds a provider from one block in opencode.json: which package to load, where to send requests, which key to send and which model ids to offer. Write that block once and an uncensored build runs in your terminal, with tool calls for edits and shell commands. The same ids also work in Cursor and, behind a router, in Claude Code.

What you need

OpenCode installed, a key from the console, and a project folder. OpenCode merges two config files: opencode.json (or opencode.jsonc, which allows comments) in the project root, and a global one at ~/.config/opencode/opencode.json. When both define the same key, the project file takes precedence. OPENCODE_CONFIG can point at a file anywhere else.

Inside the TUI, two commands come up below. /connect saves a key for a provider, with custom ones filed under Other. /models lists the providers and models your config declares, so you can switch between them.

First reply

  1. Create a key in the console and export it in the shell you will launch OpenCode from:
shell
1export UNRESTRICTABLE_API_KEY="sk-unr-live-…"
  1. Put the provider block in the project’s opencode.json, or in the global file if every project should have it. The four ids under models are the ones OpenCode users call most here; any other id from the models page is added the same way. The display names come from the catalog:
opencode.json
1{
2 "$schema": "https://opencode.ai/config.json",
3 "provider": {
4 "unrestrictable": {
5 "npm": "@ai-sdk/openai-compatible",
6 "name": "Unrestrictable",
7 "options": {
8 "baseURL": "https://api.unrestrictable.ai/v1",
9 "apiKey": "{env:UNRESTRICTABLE_API_KEY}"
10 },
11 "models": {
12 "glm-5.3-uncensored": { "name": "GLM-5.3 Uncensored" },
13 "glm-5.3-flash-uncensored": { "name": "GLM-5.3 Flash Uncensored" },
14 "deepseek-v4.1-flash-abliterated": { "name": "DeepSeek V4.1 Flash Abliterated" },
15 "deepseek-v4-pro-uncensored": { "name": "DeepSeek V4 Pro Uncensored" }
16 }
17 }
18 },
19 "model": "unrestrictable/glm-5.3-uncensored"
20}
  1. Launch opencode inside the project. The model line already picks glm-5.3-uncensored; to use a different id under Unrestrictable for this session, run /models.

Prefer not to leave the key in the environment? Run /connect, pick Other, type unrestrictable as the provider id and paste the key. OpenCode writes it to ~/.local/share/opencode/auth.json. Keep the provider block as shown but drop the apiKey line, and make sure the id you typed into /connect equals the key under provider.

To try the models before you install anything, the browser chat gives three free turns a day, no account needed.

Each field, explained

npm
@ai-sdk/openai-compatible
the AI SDK package behind the provider; it talks to /v1/chat/completions, the path this API serves
name
Unrestrictable
how /models labels the provider
options.baseURL
https://api.unrestrictable.ai/v1
the root of every request; the trailing /v1 is required
options.apiKey
{env:UNRESTRICTABLE_API_KEY}
the full sk-unr- key, read from that variable at launch; unset, it turns into an empty string
models
id → { name }
what the picker offers: each id spelled as the models page has it, plus a label to show
model
unrestrictable/glm-5.3-uncensored
the default, written as provider id / model id; small_model uses the same form for titles

Which model

Through that package OpenCode speaks the OpenAI format, and all the builds on the models page answer it. Deep into a session, each turn resends the conversation, the files OpenCode has read and all the tool results so far, so input tokens make up most of the cost and the input price is the figure to compare. The right-hand column tells you whether a build returns tool calls, without which the agent cannot edit a file or run a 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

One turn priced at 40,000 tokens in and 1,200 out, using the catalog prices of 2026-11-16. Tool-call support is what the catalog publishes; a blank sends you to the model page.

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-16.

For the code builds compared over a full working day, see the uncensored coding AI guide.

Prove it works

Ask the API which models the key may call. Every id under models must be in the list:

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

Then send one request shaped like OpenCode’s. -i shows the headers: x-uplink-request-id identifies the request, and x-uplink-charge reports the cost in USD when the answer is not streamed.

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

Back in OpenCode, send a message with one of your ids selected. The console’s usage page lists the request with its tokens and its charge, and the user agent on that record names your OpenCode version.

When it fails

  • 401 invalid_api_key: a wrong or revoked key, or UNRESTRICTABLE_API_KEY was missing from the shell that launched OpenCode, so apiKey arrived empty. Export it and relaunch, or paste the key again from the console.
  • 404 model_not_found: one of the ids under models does not exist on the models page. Compare the spelling with the page, and remember the id is the key of the entry, not its name.
  • 402 insufficient_balance: not enough balance for this request; top up in the console. 402 monthly_limit_reached: the key has reached the monthly spending cap you gave it.
  • 403 scope_denied: this key may only call certain models, and the one you chose is outside that set.
  • 429 rate_limited: the key’s rate limit was hit. retry-after in the response says how long to wait.
  • Requests that never arrive, or land on some path other than /chat/completions: the wrong package is loaded. OpenCode’s docs put @ai-sdk/openai-compatible on endpoints that serve /v1/chat/completions, which this one does, and @ai-sdk/openai on endpoints that serve /v1/responses. Leave npm on the first.
  • /models does not list the provider after /connect: the id you typed into /connect is not the key under provider in the config. Make them identical.

Questions

It does: any endpoint that speaks the OpenAI chat completions format loads through the @ai-sdk/openai-compatible package once it has a baseURL and a key. This API is such an endpoint, which makes the block above the entire setup.

A built-in catalog that /connect lists by name, plus custom entries for any other OpenAI-compatible API: a provider key in opencode.json naming the package, the base URL and the model ids. This guide walks the custom route.

All of them. One key covers the whole models page, and each build there takes an OpenAI-format call to /v1/chat/completions, so the models map of the provider block accepts any id from that page, spelled the same way. See the models page.

Per token at each model’s price, out of a prepaid balance, with no subscription. The table above prices one agent-sized turn on every build at the live rate. In a long session that keeps repeating the same prefix, the cached input tokens bill at the model’s cached rate.

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.

Join on Telegram