---
title: "OpenClaw custom provider: uncensored model setup"
canonical: https://uncensoredllm.ai/guides/openclaw
generated: 2026-11-09T16:02:06.697Z
source: https://uncensoredllm.ai/guides/openclaw
base_url: https://api.uncensoredllm.ai/v1
---

# OpenClaw with an uncensored model

One models.providers block in ~/.openclaw/openclaw.json: baseUrl, the key from an environment variable, api openai-completions and a models list of uncensored builds. The default model, the cost of a session and the errors.

Steps checked November 6, 2026 · prices as of November 9, 2026

OpenClaw takes a custom provider in `~/.openclaw/openclaw.json`: a base URL, the Chat Completions adapter, a key reference and the model ids. One block, and an uncensored build runs the agent with tool calls for files and shell commands, billed per token under the UncensoredLLM name. The same ids work in [Hermes Agent](https://uncensoredllm.ai/guides/hermes-agent) and [OpenCode](https://uncensoredllm.ai/guides/opencode).

## Where the settings are

OpenClaw reads `~/.openclaw/openclaw.json`, a JSON5 file, so comments and trailing commas are fine; its Gateway watches the file and applies most edits on save. A custom provider is one entry under `models.providers`: a base URL, an API adapter, a key reference and the models you want to call. The key is read from the environment through `${UNCENSOREDLLM_API_KEY}`, so it never sits in the file.

## Steps

1. Create a key in the [console](https://app.uncensoredllm.ai/console), one for OpenClaw alone so its requests sit apart on the usage page, and put it where OpenClaw reads the variable from: the process environment or the global env file. A `.env` in the working directory does not count; OpenClaw ignores provider keys there.

```
# ~/.openclaw/.env
UNCENSOREDLLM_API_KEY=sk-ullm-live-…
```

1. Add the block to `openclaw.json`. Each entry’s `input`, `contextWindow` and `maxTokens` are filled from the catalog where it publishes them; any other id on the [models page](https://uncensoredllm.ai/models) goes in the same array with at least its `id`:

```
// ~/.openclaw/openclaw.json
{
  agents: {
    defaults: { model: { primary: "uncensoredllm/glm-5.3-uncensored" } },
  },
  models: {
    mode: "merge",
    providers: {
      uncensoredllm: {
        baseUrl: "https://api.uncensoredllm.ai/v1",
        apiKey: "${UNCENSOREDLLM_API_KEY}",
        api: "openai-completions",
        models: [
          { id: "glm-5.3-uncensored", name: "GLM-5.3 Uncensored" },
          { id: "glm-5.3-flash-uncensored", name: "GLM-5.3 Flash Uncensored" },
          { id: "deepseek-v4.1-flash-abliterated", name: "DeepSeek V4.1 Flash Abliterated" },
          { id: "deepseek-v4-pro-uncensored", name: "DeepSeek V4 Pro Uncensored" },
          { id: "glm-5.3-abliterated", name: "GLM-5.3 Abliterated" },
          { id: "kimi-k3.1-pro-uncensored", name: "Kimi K3.1 Pro Uncensored", contextWindow: 1048576, maxTokens: 131072 },
        ],
      },
    },
  },
}
```

1. Check what OpenClaw resolved, then send a message:

```bash
openclaw models list --provider uncensoredllm
openclaw models status
```

`models list --provider uncensoredllm` prints the ids you declared; `models status` shows the resolved primary and its auth. To change the default later: `openclaw models set uncensoredllm/glm-5.3-flash-uncensored`. The request shows on the console’s usage page within seconds, with its tokens and its charge.

## What each setting does

- baseUrl: https://api.uncensoredllm.ai/v1 with the /v1; OpenClaw adds /chat/completions
- apiKey: ${UNCENSOREDLLM_API_KEY} the whole sk-ullm- key, read from the environment at start
- api: openai-completions the Chat Completions adapter, which every build on the models page answers
- models: [{ id, name, … }] the ids the provider offers; a model with no entry here cannot be referenced
- mode: merge keeps OpenClaw's bundled providers next to this one; replace would drop them
- agents.defaults.model.primary: uncensoredllm/glm-5.3-uncensored the model OpenClaw starts with, as provider/model

## Picking a model

Every turn of an agent session resends the conversation and the tool output, so the input price carries most of the bill. OpenClaw fills in defaults for the fields an entry leaves out: `input: ["text"]`, `reasoning: false`, a 200,000-token context budget when nothing states one, and its own output cap. The cost column is one turn of 30,000 tokens in and 1,000 out at the catalog prices on 2026-11-09; OpenClaw leaves prompt-cache hints out of requests to a custom provider, so plan on the full input rate.

| Model | One turn | 40 turns |
| --- | --- | --- |
| [GLM-5.3 Uncensored](https://uncensoredllm.ai/models/glm-5.3-uncensored) | $0.0093 | $0.37 |
| [GLM-5.3 Flash Uncensored](https://uncensoredllm.ai/models/glm-5.3-flash-uncensored) | $0.0035 | $0.14 |
| [DeepSeek V4.1 Flash Abliterated](https://uncensoredllm.ai/models/deepseek-v4.1-flash-abliterated) | $0.03 | $1.09 |
| [DeepSeek V4 Pro Uncensored](https://uncensoredllm.ai/models/deepseek-v4-pro-uncensored) | $0.03 | $1.24 |
| [GLM-5.3 Abliterated](https://uncensoredllm.ai/models/glm-5.3-abliterated) | $0.07 | $2.79 |
| [Kimi K3.1 Pro Uncensored](https://uncensoredllm.ai/models/kimi-k3.1-pro-uncensored) | $0.04 | $1.68 |

| Model | Build | Input $/M | Output $/M |
| --- | --- | --- | --- |
| [GLM-5.3 Uncensored](https://uncensoredllm.ai/models/glm-5.3-uncensored) glm-5.3-uncensored | Uncensored | $0.282 | $0.846 |
| [GLM-5.3 Flash Uncensored](https://uncensoredllm.ai/models/glm-5.3-flash-uncensored) glm-5.3-flash-uncensored | Uncensored | $0.1053 | $0.3685 |
| [DeepSeek V4.1 Flash Abliterated](https://uncensoredllm.ai/models/deepseek-v4.1-flash-abliterated) deepseek-v4.1-flash-abliterated | Abliterated | $0.8488 | $1.6975 |
| [DeepSeek V4 Pro Uncensored](https://uncensoredllm.ai/models/deepseek-v4-pro-uncensored) deepseek-v4-pro-uncensored | Uncensored | $0.97 | $1.94 |
| [GLM-5.3 Abliterated](https://uncensoredllm.ai/models/glm-5.3-abliterated) glm-5.3-abliterated | Abliterated | $2.1825 | $4.365 |
| [Kimi K3.1 Pro Uncensored](https://uncensoredllm.ai/models/kimi-k3.1-pro-uncensored) kimi-k3.1-pro-uncensored | Uncensored | $1.20 | $6.00 |

Prices per million tokens, read from the live catalog on 2026-11-09.

For coding specifically, [the uncensored coding AI guide](https://uncensoredllm.ai/guides/uncensored-coding-ai) compares the code builds and costs a full coding day on each.

## Check it

Check the key and the endpoint outside OpenClaw first. `-i` prints the headers: `x-uplink-request-id` names the request, and on a non-streamed answer `x-uplink-charge` is what it cost in USD.

```bash
curl -i https://api.uncensoredllm.ai/v1/chat/completions \
  -H "Authorization: Bearer $UNCENSOREDLLM_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model": "glm-5.3-uncensored", "max_tokens": 16, "messages": [{"role": "user", "content": "Reply with the single word ok."}]}'
```

## Errors and fixes

- `${UNCENSOREDLLM_API_KEY}` unresolved, with a warning in the log: the variable is in neither place (a `.env` in the project folder does not count). Export it or add it to `~/.openclaw/.env` and save.
- A ref such as `uncensoredllm/glm-5.3-flash-uncensored` is not offered: the id has no entry in `models[]` under the provider. Add one with at least the `id`.
- `401 invalid_api_key`: the key is wrong or revoked. Copy it again from the console and check the variable it lands in.
- `402 insufficient_balance`: the balance does not cover the request. Top up in the console. `402 monthly_limit_reached` means the key hit the monthly spend limit you set on it.
- `404 model_not_found`: the id is not on the models page. The id is the part after the slash in the ref.
- `429 rate_limited`: the key hit its rate limit. The response carries `retry-after`.
- The Gateway refuses to start after an edit: the file no longer matches the schema. OpenClaw accepts no unknown keys; check the spelling of each field, or run `openclaw doctor --fix`.

## Sources

Fields and defaults follow OpenClaw’s [custom providers](https://docs.openclaw.ai/concepts/model-providers/custom-providers) page, read 2026-11-06. Prices are from the live catalog at render.

## Questions

### How do I add a custom OpenAI-compatible provider to OpenClaw?

Add a models.providers.uncensoredllm entry to ~/.openclaw/openclaw.json with baseUrl https://api.uncensoredllm.ai/v1, api "openai-completions", apiKey "${UNCENSOREDLLM_API_KEY}" and a models array, then set agents.defaults.model.primary to uncensoredllm/<model-id>.

### Where does OpenClaw read the API key for a custom provider?

From the environment variable named in apiKey, here UNCENSOREDLLM_API_KEY: the process environment first, then ~/.openclaw/.env. OpenClaw ignores provider keys in a .env in the working directory, and the key never goes in openclaw.json.

### Why is a model missing from OpenClaw after I added the provider?

A custom provider's model needs an entry in models[] with at least its id; agents.defaults.models holds aliases and metadata and does not register one. Add the entry, save, and run openclaw models list --provider uncensoredllm.

### Which models are OpenAI compatible?

Every model on the models page: all of them answer /v1/chat/completions in the OpenAI format with the same key, so any id there goes into the models array as it is spelled on the page. See the models page.

### What does an OpenClaw session cost?

Per token at the model’s price, from your prepaid balance, with no subscription. The table above costs one agent-sized turn on each build at the live price; when a response reports cached input tokens, they bill at the model’s cached rate where it has one.

Every model above is on the [uncensored model list](https://uncensoredllm.ai/models) with its live price per million tokens. [Per-token pricing](https://uncensoredllm.ai/pricing) sets the whole catalog side by side, and the [family directory](https://uncensoredllm.ai/uncensored) groups the builds by base model.

[Get a key](https://app.uncensoredllm.ai/console) Prepaid from $10, no subscription.

## New models and price changes, once a month.

New uncensored builds with their prices, price moves, and what the daily model check found.
