# UncensoredAI for OpenCode

OpenCode configuration for **[UncensoredAI](https://uncensoredai.dev)**, a
single-endpoint gateway that serves GPT, Claude, Gemini, Grok, DeepSeek, GLM,
MiMo and Kimi models — including **uncensored** and **abliterated** tiers:

```
https://uncensoredai.dev/v1
```

Everything routes through one provider key (`uncensoredai`) over the
OpenAI-compatible transport, so the same config works for every model, Claude
included, with no per-vendor setup.

## Files

| File             | Use it when                                            |
| ---------------- | ------------------------------------------------------ |
| `opencode.json`  | You just want it to work (no comments).                |
| `opencode.jsonc` | Same config, annotated — best for reading and editing. |

## 1. Get an access key

1. Sign in at **<https://uncensoredai.dev>**.
2. Generate a key in the dashboard. It looks like:

   ```
   sk-ua-XXXX-XXXX-XXXX-XXXX
   ```

3. Put it in an environment variable named `UNCENSOREDAI_API_KEY`. The config
   reads it with `{env:UNCENSOREDAI_API_KEY}`, so the key is never written to
   disk.

   **Windows (PowerShell)** — persists for future sessions:

   ```powershell
   setx UNCENSOREDAI_API_KEY "sk-ua-XXXX-XXXX-XXXX-XXXX"
   ```

   **macOS / Linux** (add to `~/.zshrc` or `~/.bashrc` to persist):

   ```sh
   export UNCENSOREDAI_API_KEY="sk-ua-XXXX-XXXX-XXXX-XXXX"
   ```

## 2. Install the config

Copy `opencode.json` (or `opencode.jsonc`) to the OpenCode config location for
your OS. Use the **global** location to make it available in every project, or
the **project** location to scope it to one folder.

| Scope       | Windows                                         | macOS / Linux                      |
| ----------- | ----------------------------------------------- | ---------------------------------- |
| Global      | `%USERPROFILE%\.config\opencode\opencode.json` | `~/.config/opencode/opencode.json` |
| Per-project | `<project>\opencode.json`                      | `<project>/opencode.json`          |

Then **restart OpenCode** (the config is loaded once at startup). Pick a model
with:

```
/models
```

## 3. Change the default model

Edit the top-level `model` (and optionally `small_model`) keys. The format is
`provider-key/model-id`:

```jsonc
"model": "uncensoredai/gpt-6-sol",
"small_model": "uncensoredai/deepseek-v4.1-flash",
```

`small_model` is used for lightweight jobs such as title generation — keep it on
a fast, cheap model. Any id from the catalog below works, and you can switch
models per session from the `/models` picker without editing the file.

## Uncensored & abliterated models

These are the models on this gateway with reduced or removed safety tuning:

- `glm-5.3-uncensored` — GLM-5.3 Uncensored
- `glm-5.3-flash-uncensored` — GLM-5.3 Flash Uncensored
- `glm-5.3-abliterated` — GLM-5.3 Abliterated
- `glm-5.3-flash-abliterated` — GLM-5.3 Flash Abliterated
- `deepseek-v4-pro-uncensored` — DeepSeek V4 Pro Uncensored

## Reasoning effort

Models marked `reasoning: true` expose four variants — `none`, `low`, `medium`
and `high` — which map to the upstream `reasoningEffort` parameter. Switch
between them with the `variant_cycle` keybind, or select one from the model
picker.

## Troubleshooting

| Symptom                 | Cause                       | Fix                                                                                |
| ----------------------- | --------------------------- | ---------------------------------------------------------------------------------- |
| `401 Unauthorized`      | Wrong or missing API key    | Check `UNCENSOREDAI_API_KEY` is set and valid; restart OpenCode after changing it. |
| `402` / `403`           | Out of credit / key blocked | Top up your balance or create a new key in the dashboard.                          |
| `404 Not Found`         | Bad model id                | The id must match the catalog exactly (case-sensitive), e.g. `gpt-6-sol`.   |
| `404` on every request  | Bad `baseURL`               | It must be exactly `https://uncensoredai.dev/v1` (no trailing `/chat/completions`).               |
| Model missing from list | Not in the catalog          | Only the ids listed below are served.                                              |

## Model catalog

Context and max-output limits come from the gateway's catalog
(`src/lib/models.ts`).

| Model id | Name | Context | Output | Reasoning | Tier |
| -------- | ---- | ------- | ------ | --------- | ---- |
| `gpt-6-astra` | GPT-6 Astra | 1050000 | 128000 | yes |  |
| `gpt-6.1-sol` | GPT-6.1 Sol | 1050000 | 128000 | yes |  |
| `gpt-6-sol` | GPT-6 Sol | 1050000 | 128000 | yes |  |
| `gpt-6-luna` | GPT-6 Luna | 1050000 | 128000 | yes |  |
| `gpt-5.6-sol` | GPT-5.6 Sol | 1000000 | 128000 | yes |  |
| `gpt-5.6-terra` | GPT-5.6 Terra | 1000000 | 128000 | yes |  |
| `gpt-5.6-luna` | GPT-5.6 Luna | 1000000 | 128000 | yes |  |
| `gpt-5.5` | GPT-5.5 | 1000000 | 128000 | yes |  |
| `claude-fable-5` | Claude Fable 5 | 1000000 | 64000 | yes |  |
| `claude-haiku-5-5` | Claude Haiku 5.5 | 1000000 | 64000 | yes |  |
| `claude-sonnet-5` | Claude Sonnet 5 | 1000000 | 64000 | yes |  |
| `claude-sonnet-5-5` | Claude Sonnet 5.5 | 1000000 | 64000 | yes |  |
| `claude-opus-4-6` | Claude Opus 4.6 | 1000000 | 64000 | yes |  |
| `claude-opus-4-7` | Claude Opus 4.7 | 1000000 | 64000 | yes |  |
| `claude-opus-4-8` | Claude Opus 4.8 | 1000000 | 64000 | yes |  |
| `claude-opus-5` | Claude Opus 5 | 1000000 | 64000 | yes |  |
| `claude-opus-5-5` | Claude Opus 5.5 | 1000000 | 128000 | yes |  |
| `glm-5.2` | GLM-5.2 | 1000000 | 65536 | yes |  |
| `glm-5.3` | GLM-5.3 | 1000000 | 65536 | yes |  |
| `glm-5.3-uncensored` | GLM-5.3 Uncensored | 1000000 | 65536 | yes | uncensored |
| `glm-5.3-flash` | GLM-5.3 Flash | 1000000 | 65536 | yes |  |
| `glm-5.3-flash-uncensored` | GLM-5.3 Flash Uncensored | 1000000 | 65536 | yes | uncensored |
| `glm-5.3-abliterated` | GLM-5.3 Abliterated | 1000000 | 65536 | yes | abliterated |
| `glm-5.3-flash-abliterated` | GLM-5.3 Flash Abliterated | 1000000 | 65536 | yes | abliterated |
| `deepseek-v4.1-flash` | DeepSeek V4.1 Flash | 1000000 | 65536 | yes |  |
| `deepseek-v4-flash-0731` | DeepSeek V4 Flash | 1000000 | 65536 | yes |  |
| `deepseek-v4-pro-0813` | DeepSeek V4 Pro | 1000000 | 65536 | yes |  |
| `deepseek-v4-pro-uncensored` | DeepSeek V4 Pro Uncensored | 1000000 | 65536 | yes | uncensored |
| `grok-4.7` | Grok 4.7 | 500000 | 65536 | yes |  |
| `grok-4.6` | Grok 4.6 | 500000 | 65536 | yes |  |
| `grok-4.5` | Grok 4.5 | 200000 | 64000 | yes |  |
| `mimo-v2.6-pro` | MiMo V2.6 Pro | 600000 | 65536 | yes |  |
| `mimo-v2.6-flash` | MiMo V2.6 Flash | 600000 | 65536 | yes |  |
| `kimi-k3` | Kimi K3 | 1000000 | 65536 | yes |  |
| `gemini-4-argon` | Gemini 4 Argon | 128000 | 16384 | yes |  |
