Skip to main content
OpenCode is a free, open-source AI coding agent for your terminal (documentation). It connects to UncensoredGPT as a custom OpenAI-compatible provider. Setup takes about a minute.

1. Set your API key

Create a key in the Console if you don’t have one, then export it:
Add the export to your shell profile (~/.bashrc, ~/.zshrc, …) to make it permanent.

2. Add the provider to your OpenCode config

Mac / Linux: ~/.config/opencode/opencode.json Windows: %USERPROFILE%\.config\opencode\opencode.json

3. Start OpenCode

The provider appears as UncensoredGPT in the /models picker, and the model field in the config above makes uncensoredgpt/qwen3.8-27b-uncensored your default.

How model references work

OpenCode addresses models as <provider>/<model-id>. Because our model IDs already contain a slash (uncensoredgpt/...), the full reference has three segments:
The first segment is the provider key from your config (uncensoredgpt); the rest is the model ID exactly as the API expects it. Same pattern as OpenRouter-style IDs.

Notes

  • {env:UNCENSOREDGPT_API_KEY} reads the key from the environment at runtime, so the key itself never lands in the config file.
  • You can trim the models map to just the models you use.
  • Context windows per model are listed on the coding agents overview. If you want OpenCode to know a model’s context limit explicitly, add a limit object — OpenCode requires both context and output values there, so only add it if you know your output cap.
  • All models support tool calling and streaming, so agent features work fully.