Updated November 18, 2026

Uncensored models in OpenCode.

OpenCode takes any OpenAI compatible provider. One config block adds every uncensored model on OpenUncensored.

Short answer

Add OpenUncensored as an OpenAI compatible provider in opencode.json (in the project, or ~/.config/opencode/opencode.json for every project): base URL https://api.openuncensored.com/v1, your key in OPENUNCENSORED_API_KEY, and the model ids you want. Then run opencode run -m openuncensored/deepseek-v4.1-flash-1017-uncensored. One key reaches 62 uncensored, abliterated and heretic models.

Config

Add the provider.

Buy a prepaid key on the credits page with no account (the key is the account), or point your agent at agents.md and let it buy one.

{
  "$schema": "https://opencode.ai/config.json",
  "providers": {
    "openuncensored": {
      "name": "OpenUncensored",
      "env": ["OPENUNCENSORED_API_KEY"],
      "package": "@opencode/ai/providers/openai-compatible",
      "settings": { "baseURL": "https://api.openuncensored.com/v1" },
      "models": {
        "deepseek-v4.1-flash-1017-uncensored": { "name": "DeepSeek V4.1 Flash 1017 Uncensored" },
        "glm-5.3-flash-uncensored": { "name": "GLM 5.3 Flash Uncensored" },
        "qwen3.8-27b-uncensored-fast": { "name": "Qwen 3.8 27B Uncensored Fast by Heabsy" }
      }
    }
  }
}
export OPENUNCENSORED_API_KEY=ou-...
opencode run -m openuncensored/deepseek-v4.1-flash-1017-uncensored "Explain this repository"

Add any id from the models page to the models block the same way, or list them all with curl -s https://api.openuncensored.com/v1/models | jq -r '.data[].id'.

Check

Test the key first.

curl https://api.openuncensored.com/v1/chat/completions \
  -H "Authorization: Bearer $OPENUNCENSORED_API_KEY" -H "Content-Type: application/json" \
  -d '{"model": "deepseek-v4.1-flash-1017-uncensored", "messages": [{"role": "user", "content": "Hello"}]}'

If this works and OpenCode does not, the problem is the config or the environment OpenCode runs in.

Gotchas

Things that trip people up.

  • The background daemon does not see your shell. opencode serve started as a service does not read variables you export later. Put the key where the daemon reads it, or test with opencode run --standalone.
  • Model names are prefixed with the provider key: openuncensored/<model id>.
  • Older versions use the provider block with @ai-sdk/openai-compatible (the OpenCode 1.x tab). Base URL and ids are the same.

Which model

Models that finish agent tasks.

ModelModel idAgent tasksSpeed$ / 1M in · out
GLM 5.3 Flash Uncensoredglm-5.3-flash-uncensored3/5178 tok/s$0.12 · $0.50
DeepSeek V4.1 Flash 1017 Uncensoreddeepseek-v4.1-flash-1017-uncensored2/5239 tok/s$0.33 · $1.32
MiMo V2.6 Flash Uncensoredmimo-v2.6-flash-uncensored2/5118 tok/s$0.46 · $1.50
DeepSeek V4.1 Flash 0910 Uncensoreddeepseek-v4.1-flash-0910-uncensored2/5209 tok/s$0.33 · $1.32
GLM 5.3 Uncensoredglm-5.3-uncensored2/5117 tok/s$0.39 · $1.32
OpenCode resends the conversation each step, so most input is billed at the cached rate. A model that loops burns tokens without progress: prefer more agent tasks finished.

FAQ

Questions people ask.

How do I add an uncensored model provider to OpenCode?

Add OpenUncensored as an OpenAI compatible provider in opencode.json (in the project, or ~/.config/opencode/opencode.json for every project): base URL https://api.openuncensored.com/v1, your key in OPENUNCENSORED_API_KEY, and the model ids you want. Then run opencode run -m openuncensored/deepseek-v4.1-flash-1017-uncensored. One key reaches 62 uncensored, abliterated and heretic models.

Which uncensored model is best in OpenCode?

GLM 5.3 Flash Uncensored: the most agent tasks finished among ranked models fast enough for agent loops.

Does OpenCode's tool calling work with uncensored models?

Yes, through the standard OpenAI tools format. How reliably a model uses tools differs; the agent tasks column on this page measures it.

Do I need an account?

No. Buy a prepaid key on the credits page and use it as the API key. The key is the account, and it cannot spend more than you loaded.

Updated November 18, 2026. Scores measured November 8, 2026. Markdown version: /opencode-uncensored-provider.md