---
title: "OpenClaw custom provider setup for an uncensored model"
canonical: https://unrestrictable.ai/guides/openclaw
generated: 2026-11-16T02:57:38.114Z
source: https://unrestrictable.ai/guides/openclaw
base_url: https://api.unrestrictable.ai/v1
---

# Run OpenClaw on an uncensored model

One models.providers block in ~/.openclaw/openclaw.json: base URL, api openai-completions, a key pulled from the environment, model rows, plus costs and errors.

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

Give OpenClaw an uncensored model and it will read files, run shell commands and call tools on it, billed per token under the Unrestrictable name. The whole setup is one provider block in `~/.openclaw/openclaw.json`: a base URL, an adapter name, a key variable and the model ids. Those ids also drop straight into [OpenCode](https://unrestrictable.ai/guides/opencode) and [Hermes Agent](https://unrestrictable.ai/guides/hermes-agent).

## What you need

- OpenClaw installed, with its config at `~/.openclaw/openclaw.json`. The file is JSON5, so comments and trailing commas are allowed, and the Gateway picks up most edits the moment you save.
- An API key from the [console](https://app.unrestrictable.ai/console), made for OpenClaw alone so its traffic has its own rows on the usage page.

## Three steps to a first reply

1. Put the key where OpenClaw will find the variable: in the process environment, or in the global env file shown here. A `.env` inside your project folder is not read for provider keys.

```
# ~/.openclaw/.env
UNRESTRICTABLE_API_KEY=sk-unr-live-…
```

1. Paste this block into `openclaw.json`. The `contextWindow`, `maxTokens` and `input` on each row come from the catalog wherever it publishes them. To add another id from the [models page](https://unrestrictable.ai/models), append a row naming its `id` and whatever else you know:

```
// ~/.openclaw/openclaw.json
{
  agents: {
    defaults: { model: { primary: "unrestrictable/glm-5.3-uncensored" } },
  },
  models: {
    mode: "merge",
    providers: {
      unrestrictable: {
        baseUrl: "https://api.unrestrictable.ai/v1",
        apiKey: "${UNRESTRICTABLE_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. Confirm OpenClaw sees the provider, then chat:

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

`models list --provider unrestrictable` echoes the ids from your block; `models status` names the primary it resolved and where its key came from. Switch defaults any time with `openclaw models set unrestrictable/glm-5.3-flash-uncensored`. Each request lands on the console’s usage page seconds later with its token counts and charge. To try a model before any of this, [/chat](https://unrestrictable.ai/chat) runs the same catalog in the browser, a few free turns a day, nothing to install.

## The fields, one by one

- baseUrl: https://api.unrestrictable.ai/v1 keep the /v1; OpenClaw appends /chat/completions itself
- apiKey: ${UNRESTRICTABLE_API_KEY} resolved from the environment at start to the full sk-unr- key
- api: openai-completions the Chat Completions adapter; every build on the models page speaks it
- models: [{ id, name, … }] what this provider can serve; an id without a row here cannot be referenced
- mode: merge adds this provider beside OpenClaw's bundled ones instead of replacing them
- agents.defaults.model.primary: unrestrictable/glm-5.3-uncensored the default model, written as provider/model

## Which build to make primary

An agent resends the whole conversation plus tool output on every turn, so input tokens dominate the cost. Fields a row leaves blank get OpenClaw’s defaults: `input: ["text"]`, `reasoning: false`, a context budget of 200,000 tokens, and OpenClaw’s own output cap. The cost column below prices a single turn: 30,000 tokens in, 1,000 out, at the catalog's rates on 2026-11-16. OpenClaw sends no prompt-cache hints to a custom provider, so budget for the full input price.

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

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

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

If the agent is writing code, [the uncensored coding AI guide](https://unrestrictable.ai/guides/uncensored-coding-ai) puts the code builds side by side and prices a whole day of coding on each.

## Test the key outside OpenClaw

Send one request by hand before blaming the config. `-i` prints the headers: one holds the request id, and on a non-streamed reply another holds the charge in USD.

```bash
curl -i https://api.unrestrictable.ai/v1/chat/completions \
  -H "Authorization: Bearer $UNRESTRICTABLE_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."}]}'
```

## What goes wrong

- The log warns that `${UNRESTRICTABLE_API_KEY}` did not resolve: the variable is set nowhere OpenClaw looks (a project-folder `.env` does not count). Export it, or write it into `~/.openclaw/.env` and save.
- A ref like `unrestrictable/glm-5.3-flash-uncensored` is reported as not offered: that id has no row in the provider’s `models[]`. Add a row carrying the `id` at minimum.
- `401 invalid_api_key`: a wrong or revoked key. Recopy it from the console and check which variable it landed in.
- `402 insufficient_balance`: credit short of the request's cost; add funds in the console. `402 monthly_limit_reached` is the monthly spend cap you put on the key.
- `404 model_not_found`: the part of the ref after the slash is not an id on the models page.
- `429 rate_limited`: the key’s rate limit was hit; `retry-after` in the response says when to try again.
- The Gateway will not start after you edited the file: it no longer fits the schema. Unknown keys are rejected, so check every field name, or let `openclaw doctor --fix` repair it.

## Where this comes from

Field names and defaults are from OpenClaw’s [custom providers](https://docs.openclaw.ai/concepts/model-providers/custom-providers) documentation, read 2026-11-06. Every price on the page is read from the live catalog when it renders.

## Questions

### What does an OpenClaw custom provider entry look like for an OpenAI-compatible API?

One object at models.providers.unrestrictable in ~/.openclaw/openclaw.json: baseUrl https://api.unrestrictable.ai/v1, api "openai-completions", apiKey "${UNRESTRICTABLE_API_KEY}" and a models array. Then point agents.defaults.model.primary at unrestrictable/<model-id>.

### Where should the API key live for an OpenClaw custom provider?

In the environment variable that apiKey names, UNRESTRICTABLE_API_KEY here. OpenClaw checks the process environment, then ~/.openclaw/.env. A .env in the working directory is ignored for provider keys, and the key itself never belongs in openclaw.json.

### I added the provider but OpenClaw says the model is not offered. Why?

Only a row in the provider's models[] registers a model, and it needs at least an id. agents.defaults.models only holds aliases and metadata. Add the row, save, and check with openclaw models list --provider unrestrictable.

### Which of these models speak the OpenAI format?

All of them. Every id on the models page answers /v1/chat/completions in the OpenAI shape with the same key, so any of them can go into the models array spelled exactly as the page shows it. See the models page.

### How much does running OpenClaw this way cost?

You pay per token at each model’s rate from a prepaid balance; a monthly plan is optional. The table on this page prices one agent-sized turn per build live. If a response reports cached input tokens, those are billed at the model’s cached rate where one exists.

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

[Get a key](https://app.unrestrictable.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.
