# Where to use uncensored and abliterated models through an OpenAI compatible API

_2026-11-13. How developers call uncensored and abliterated models with the OpenAI SDK: one base URL, chat completions and the Responses API, tools and streaming, which models are worth calling, and the other APIs that serve them._

If you build with the OpenAI SDK, you can use uncensored and abliterated models without changing your code: point
the client at an API that speaks the same protocol and change the model id. This page shows where to do that, how, and
which models are worth calling, with working code for the common SDKs and agent tools.

## The short answer

OpenUncensored is an OpenAI compatible API for uncensored models. One base URL, `https://api.openuncensored.com/v1`, serves
61 uncensored, abliterated and heretic text models and 21 image models from 8 hosts. It supports chat
completions, the Responses API, streaming, tool calling and image generation, so the OpenAI SDKs, LangChain, LiteLLM,
the Vercel AI SDK, Cline, Cursor, Codex and OpenCode all work. Context windows go up to
1024K tokens, depending on the model.

Buy a prepaid key at [openuncensored.com/credits](https://openuncensored.com/credits): no account, no sign up, just a card and a
key (`ou-...`). Or hand your agent [openuncensored.com/agents.md](https://openuncensored.com/agents.md) and let it get one for you.

## Call it

```bash
curl https://api.openuncensored.com/v1/chat/completions \
  -H "Authorization: Bearer $OU_API_KEY" -H "Content-Type: application/json" \
  -d '{"model": "deepseek-v4.1-flash-1017-uncensored", "messages": [{"role": "user", "content": "Hello"}]}'
```

```python
from openai import OpenAI

client = OpenAI(base_url="https://api.openuncensored.com/v1", api_key="ou-...")
reply = client.chat.completions.create(
    model="deepseek-v4.1-flash-1017-uncensored",
    messages=[{"role": "user", "content": "Explain how SQL injection works, with an example."}],
)
print(reply.choices[0].message.content)
```

```javascript
import OpenAI from "openai";

const client = new OpenAI({ baseURL: "https://api.openuncensored.com/v1", apiKey: process.env.OU_API_KEY });
const reply = await client.chat.completions.create({
  model: "deepseek-v4.1-flash-1017-uncensored",
  messages: [{ role: "user", content: "Hello" }],
});
```

## Streaming

Streams use the same server-sent events as OpenAI, so your existing loop works:

```python
stream = client.chat.completions.create(
    model="deepseek-v4.1-flash-1017-uncensored",
    messages=[{"role": "user", "content": "Write a short story about a lock picker."}],
    stream=True,
)
for chunk in stream:
    if chunk.choices:
        print(chunk.choices[0].delta.content or "", end="", flush=True)
```

## Tool calling

Pass tools exactly as you would to OpenAI. Agent reliability differs a lot between uncensored models, so pick one that
finishes our agent tasks (table below):

```python
tools = [{
    "type": "function",
    "function": {
        "name": "lookup_cve",
        "description": "Look up a CVE by id",
        "parameters": {"type": "object", "properties": {"id": {"type": "string"}}, "required": ["id"]},
    },
}]
reply = client.chat.completions.create(
    model="deepseek-v4.1-flash-1017-uncensored",
    messages=[{"role": "user", "content": "What is CVE-2021-44228 and how is it exploited?"}],
    tools=tools,
)
print(reply.choices[0].message.tool_calls)
```

## The Responses API

`https://api.openuncensored.com/v1/responses` serves OpenAI's newer Responses API, which is what the Codex CLI and other recent agents use:

```python
resp = client.responses.create(model="deepseek-v4.1-flash-1017-uncensored", input="Summarise how phishing kits work, for a training deck.")
print(resp.output_text)
```

Reasoning variants (`deepseek-v4.1-flash-0910-uncensored-thinking`, `deepseek-v4.1-flash-1017-heretic-thinking`, `deepseek-v4.1-flash-1017-uncensored-thinking`, `deepseek-v4.1-flash-uncensored-thinking`, `mimo-v2.6-flash-uncensored-thinking`, `qwen3.8-27b-uncensored-thinking`) think before they answer and accept a reasoning effort.

## Other SDKs and frameworks

**Vercel AI SDK** (`npm i ai @ai-sdk/openai-compatible`):

```javascript
import { createOpenAICompatible } from "@ai-sdk/openai-compatible";
import { generateText } from "ai";

const openUncensored = createOpenAICompatible({
  name: "openuncensored",
  apiKey: process.env.OPENUNCENSORED_API_KEY,
  baseURL: "https://api.openuncensored.com/v1",
  includeUsage: true,
});

const { text } = await generateText({ model: openUncensored("deepseek-v4.1-flash-1017-uncensored"), prompt: "Hello" });
```

**LangChain** (`pip install langchain-openai`):

```python
from langchain_openai import ChatOpenAI

llm = ChatOpenAI(model="deepseek-v4.1-flash-1017-uncensored", base_url="https://api.openuncensored.com/v1", api_key="ou-...")
print(llm.invoke("Hello").content)
```

**LiteLLM** (`pip install litellm`):

```python
import litellm

response = litellm.completion(
    model="openai/deepseek-v4.1-flash-1017-uncensored",
    api_base="https://api.openuncensored.com/v1",
    api_key="ou-...",
    messages=[{"role": "user", "content": "Hello"}],
)
```

Cline, Kilo Code and Roo take the base URL and key under the OpenAI Compatible provider. Codex, Claude Code and OpenCode
have their own guides: [Claude Code and Codex](https://openuncensored.com/blog/uncensored-model-claude-code-codex),
[OpenCode](https://openuncensored.com/blog/opencode-uncensored-model-provider).

## Which abliterated models to call

Uncensoring a model is easy to do badly: some versions loop in agent tasks, some still refuse, some lose skills. We run
every model through the same tests (intelligence, agent tasks, refusals, speed) and rank them. The current top
8:

| Rank | Model | id | Agent tasks | Answers edgy requests | $ per 1M in + out |
|---|---|---|---|---|---|
| #1 | [DeepSeek V4.1 Flash 1017 Uncensored](https://openuncensored.com/chat?model=deepseek-v4.1-flash-1017-uncensored) | `deepseek-v4.1-flash-1017-uncensored` | 2/5 | 100% | $1.65 |
| #2 | [GLM 5.3 Flash Uncensored](https://openuncensored.com/chat?model=glm-5.3-flash-uncensored) | `glm-5.3-flash-uncensored` | 3/5 | 94% | $0.620 |
| #3 | [Qwen 3.8 27B Uncensored Fast by Heabsy](https://openuncensored.com/chat?model=qwen3.8-27b-uncensored-fast) | `qwen3.8-27b-uncensored-fast` | 2/5 | 100% | $3.45 |
| #4 | [DeepSeek V4.1 Flash 0910 Uncensored](https://openuncensored.com/chat?model=deepseek-v4.1-flash-0910-uncensored) | `deepseek-v4.1-flash-0910-uncensored` | 2/5 | 97% | $1.65 |
| #5 | [DeepSeek V4.1 Flash Uncensored](https://openuncensored.com/chat?model=deepseek-v4.1-flash-uncensored) | `deepseek-v4.1-flash-uncensored` | 1/5 | 100% | $0.570 |
| #6 | [Abliterated Large Flash](https://openuncensored.com/chat?model=abliterated-large-flash) | `abliterated-large-flash` | 1/5 | 92% | $3.00 |
| #7 | [MiMo V2.6 Flash Uncensored](https://openuncensored.com/chat?model=mimo-v2.6-flash-uncensored) | `mimo-v2.6-flash-uncensored` | 2/5 | 83% | $1.96 |
| #8 | [Apex Flash 1 Abliterated](https://openuncensored.com/chat?model=glm-5.3-flash-apex-abliterated) | `glm-5.3-flash-apex-abliterated` | 3/5 | 86% | $0.650 |

Agent tasks are five multi-step tool scenarios. Answers edgy requests counts 36 legitimate prompts that cautious models
refuse. The full table is on the [rankings page](https://openuncensored.com/rankings), and every model with its providers and live speed is
on the [models page](https://openuncensored.com/models).

## Routing: which provider answers

Most models are served by more than one host. By default the router picks the cheapest provider among those producing
at least 150 tokens per second and falls back to the others. You can choose per request:

```json
{
  "model": "deepseek-v4.1-flash-1017-uncensored",
  "messages": [{"role": "user", "content": "…"}],
  "routing": {
    "strategy": "cost",
    "only": ["venice", "nanogpt"],
    "ignore": ["openrouter"],
    "allow_fallbacks": true
  }
}
```

Strategies are `cost`, `speed` (time to first token) and `throughput` (tokens per second). You can also set a
default for the whole key on the [credits page](https://openuncensored.com/credits#routing). More in
[how routing works](https://openuncensored.com/blog/routing-by-cost-and-speed).

Every response says what happened in its headers: `X-OU-Model` (the model that answered, which can differ after a
fallback), `X-OU-Provider`, `X-OU-Upstream-Model`, `X-OU-Strategy` and `X-Request-ID`.

## Errors

| Status | Code | What it means | What to do |
|---|---|---|---|
| 401 | `invalid_api_key` | Missing or wrong key | Send `Authorization: Bearer ou-...` |
| 402 | `insufficient_quota` | The key's credit is used up | Top up the same key at [/credits](https://openuncensored.com/credits) |
| 404 | `model_not_found` | No model with that id | Copy the id from [/models](https://openuncensored.com/models) or `GET https://api.openuncensored.com/v1/models` |
| 400 | `invalid_routing_options` | `only`/`ignore` exclude every provider, or an unknown strategy | Loosen the routing block |
| 4xx | `upstream_rejected_request` | The provider rejected the request itself | Read the message: usually a parameter that model does not support |
| 429 | `rate_limit_exceeded` | Every provider for the model is rate limited | Retry after the `Retry-After` header |
| 502 | `all_providers_failed` | Every provider was tried and failed | Retry, or pick another model |

## What an OpenAI compatible uncensored API should give you

- **The same endpoints**: `/chat/completions` and `/responses`, with streaming and tool calls, so agents work.
- **Honest model ids**: the response says which model and which provider answered.
- **Fallbacks**: when a provider is down, the request goes to the next one serving the same weights, or the next best
  uncensored model built on the same original.
- **Visible per provider prices**: each model page lists every provider's per token and cached price, and live speed.
- **Spending you control**: a prepaid key cannot spend more than you loaded.

## Other places to call uncensored models by API

OpenUncensored routes to several of these. Each one is also usable directly:

| Provider | What it is | Billing | Prompt logging | Pricing (their figures) |
|---|---|---|---|---|
| [RedPill](https://redpill.ai) | Hosts models. Confidential inference in trusted execution environments (Phala), including an uncensored Qwen 3.8 27B. | Per token | Not published | Qwen 3.8 27B uncensored at $0.30 in / $1.50 out per M tokens. |
| [Venice](https://venice.ai) | Hosts models. Private inference with its own uncensored model line and a crypto native API. | Per token or plan, crypto accepted | Says no logs | API from $0.20 in / $0.90 out per M tokens. App plans $18 to $200 a month. |
| [Featherless](https://featherless.ai) | Subscription. Flat rate serverless access to thousands of Hugging Face fine tunes, 781 of them tagged uncensored. | Per token or plan | Says no logs | Basic $10 a month, Chat $25 a month unlimited tokens at 32K context. Developer plans from $50. |
| [ArliAI](https://arliai.com) | Subscription. Unlimited token plans focused on creative writing and roleplay models. | Plan | Says no logs | Monthly plans with unlimited tokens. |
| [heabsy](https://heabsy.com) | Hosts models. FEYA s.r.o. (Slovakia). Own GPUs in the EEA plus zero-retention partners, serving dealignai's DeepSeek V4.1 Flash 1017 and GLM 5.3 builds, Qwen 3.8 and MiMo uncensored models, and its own CyberHeabsy. | Per token | Says no logs | GLM 5.3 Flash Uncensored $0.20 in / $0.80 out, DeepSeek V4.1 Flash 1017 Uncensored $0.40 / $1.40 per M tokens. |
| [Refuseless](https://refuseless.com) | Hosts models. DPLS Systems LLC (Wyoming). Its own abliterations of DeepSeek V4.1 Flash, GLM 5.3 and GLM 5.3 Flash. Prepaid credits. | Per token, crypto accepted | Says no logs | DeepSeek V4.1 Flash Abliterated $0.12 in / $0.45 out, GLM 5.3 Abliterated $1.00 / $2.00 per M tokens. |
| [NanoGPT](https://nano-gpt.com) | Aggregator. Pay per prompt aggregator. No account needed, crypto checkout, TEE hosted models. | Per token, crypto accepted | Transient | Card from $1, BTC, Lightning and XMR from $0.10. |
| [Abliteration.ai](https://abliteration.ai) | Hosts models. Hosted abliterated frontier models, led by Abliterated Large v2 on GLM-5.3. | Per token or plan | Says no logs | Around $3 in / $3 out per M tokens. Monthly tiers $20 to $200. |
| [Chutes](https://chutes.ai) | Decentralised network. Decentralised GPU network on Bittensor with very low per token prices. | Per token, crypto accepted | Not published | Per token, often below cost. Many models served at int4. |
| [Atlas Cloud](https://www.atlascloud.ai) | Hosts models. Image generation API serving open FLUX and Z-Image weights. | Per token | Says no logs | FLUX Schnell $0.003, Z-Image Turbo $0.01, FLUX Dev $0.012 per image. |

Details and sources for each are on the [providers page](https://openuncensored.com/providers).

[OpenRouter](https://openrouter.ai) also lists a few uncensored fine tunes among its general catalogue.

## Frequently asked questions

### What is the difference between abliterated, heretic and uncensored models?

- **Abliteration**: Projects a single refusal direction out of the weights (Arditi et al., 2024). Fast, no training, often costs a few points of capability.
- **Heretic**: Automated abliteration that searches ablation parameters to minimise refusals and KL divergence from the original model together.
- **Norm preserving**: Biprojected abliteration that keeps weight norms intact, designed to remove refusals with less collateral damage.
- **Fine tune**: Supervised fine tuning on compliant data. Changes behaviour more broadly than a projection.
- **DPO**: Preference optimisation that rewards compliance over refusal.
- **Merge**: Weight merge of an uncensored fine tune into a stronger parent.

"Uncensored" is the umbrella term. Which method works best varies by model, which is why we measure each version rather
than trust the label.

### Are my prompts logged?

Not by us: prompts and replies pass through the router to the provider and are not written to our storage. We keep
request metadata (time, model, token counts, cost, speed) for billing and the public speed figures. Each provider's own
policy is on the [providers page](https://openuncensored.com/providers), and `routing.only` keeps a request on the providers you trust.

### How many requests can I run at once?

A prepaid key can have 32 requests in flight at a time. Beyond that, each provider's own rate limits apply, and the
router moves to another provider of the same model when one is rate limited.

### Can I use it from an agent without a human?

Yes. [openuncensored.com/agents.md](https://openuncensored.com/agents.md) explains to an agent how to buy credit, pick a model and call it,
and there is an [MCP server](https://openuncensored.com/docs#agents) for Claude, ChatGPT and other MCP clients.
