Set up OpenCode with Uncensured AI: API guide
Connect OpenCode 1 or 2 to abliterated models: downloadable configs, an environment-variable API key and macOS, Linux and Windows instructions.
Choose your appOne prepaid balance, even when you switch apps.
Your apps. Our models. The same key.
Before you connect
Set up your Uncensured AI account. You can then use your balance from compatible apps.
Add credit
Sign in or create an account, then top up your wallet. Model usage is deducted from your prepaid balance.
Open walletCreate your API key
Open API keys and create a key. A separate key for each app makes it easier to identify and revoke.
Create a key
Where do you want to start?
A chat on your phone, on your computer or a coding assistant: choose the setup that suits you.
OpenCode
Connect our models to the assistant working in your project. The configuration includes all four models.
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": { "glm-5.3-flash-abliterated": { "name": "GLM 5.3 Flash" }, "glm-5.3-abliterated": { "name": "GLM 5.3" }, "qwen3.8-flash-next-abliterated": { "name": "Qwen 3.8 Flash Next" }, "deepseek-v4.1-flash-abliterated": { "name": "DeepSeek V4.1 Flash" } }, "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, Qwen 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.
OpenCode 1 · all four models under Uncensured AI OpenCode 1 · GLM 5.3 Flash selected in the demonstration project
Real screenshots of the OpenCode 1.18.32 web interface: they show the loaded provider and models, without a generation request. OpenCode 2 instructions follow its official documentation.
Something not working?
What to check if your first connection does not work.
Want to start chatting now?
Our chat is ready in your browser. Sign in and choose a model, including on your phone.