OpenCode
Configure an OpenAI-compatible provider in OpenCode using the UncensuredAI base URL, API key and model IDs. Guide for macOS, Linux and Windows.
Code and projects from your terminal.
Set up the app.
Already using OpenCode? Run opencode --version. Versions 1 and 2 use different configurations: choose the matching one below.
Install OpenCode and check its version
If you do not have it yet, open your terminal and install OpenCode using Node.js and npm. The command depends on your selected version. For Windows, see the official installation options and WSL.
Install with npmnpm install -g opencode-aiAll installation optionsCheck your versionopencode --versionAdd the configuration to your project
Download opencode.json into your project folder. If you already have this file, merge these settings into it without overwriting your existing ones. Your key is read from an environment variable.
Download configuration file{ "$schema": "https://opencode.ai/config.json", "model": "uncensuredai/glm-5.3-flash-abliterated", "provider": { "uncensuredai": { "name": "Uncensured AI", "models": { "kimi-k3.1-pro-uncensored": { "name": "Kimi 3.1P Uncensored", "limit": { "context": 1048576, "output": 131072 } }, "kimi-k3.1-pro-abliterated": { "name": "Kimi K3.1 Pro Abliterated", "limit": { "context": 1048576, "output": 131072 } }, "deepseek-v4.1-flash-abliterated": { "name": "DeepSeek V4.1 Flash Abliterated" }, "glm-5.3-flash-abliterated": { "name": "GLM 5.3 Flash Abliterated" }, "glm-5.3-abliterated": { "name": "GLM 5.3 Abliterated" }, "deepseek-v4-pro-uncensored": { "name": "DeepSeek V4 Pro Uncensored" }, "qwen3.8-max-uncensored": { "name": "Qwen 3.8 Max Uncensored", "limit": { "context": 1000000, "output": 131000 } } }, "npm": "@ai-sdk/openai-compatible", "options": { "baseURL": "https://uncensuredai.com/v1", "apiKey": "{env:UNCENSURED_API_KEY}" } } } }Set your key in the terminal
In the same terminal, inside your project folder, run the command for your system. Replace YOUR_UNCENSURED_API_KEY with the key from our console.
UNCENSURED_API_KEYexport UNCENSURED_API_KEY="YOUR_UNCENSURED_API_KEY"The variable applies to this terminal session: set it again when you open a new one. The configuration file does not contain your key.
Start OpenCode and choose your model
Start OpenCode from the same terminal. Enter /models and search for Uncensured AI to find GLM and DeepSeek. The starting model is GLM 5.3 Flash.
Start in your projectopencodeChoose a model inside OpenCode/modelsPrefer a browser interface? With OpenCode 1, start it from the same terminal using opencode web --hostname 127.0.0.1.
Real OpenCode 1.18.32 screenshot in a demonstration project, before sending any requests. OpenCode 1 and 2 configurations follow their respective official guides.
Let your agent set it up.
Give the guide to Codex or your AI assistant. The steps and connection settings are ready.
Something not working?
What to check if your first connection does not work.
Copy an active key from your Uncensured AI console. Check for leading or trailing spaces and confirm that the key has not been revoked. Keys from other providers are not interchangeable with ours.
Open your wallet and check your available balance. App requests use Uncensured AI prepaid credit; an app subscription does not top up our wallet. Also check the key’s spending limit.
Check the final address: /v1 must appear exactly once. OpenCat and OpenCode use https://uncensuredai.com/v1. For a Chatbox custom provider, use Host https://uncensuredai.com and Path /v1/chat/completions. Keep Use Responses API off in OpenCat.
Copy the full, exact model ID from this guide, including its suffix. Display names are not API IDs.
If your client supports OpenAI Compatible providers with a custom Base URL, use our address, your key and the model ID. In Cline, choose OpenAI Compatible. Attachment, tool and other feature support depends on the client and model.
Cline · OpenAI Compatible