---
title: "LiteLLM OpenAI compatible endpoint: uncensored model setup"
canonical: https://unrestrictable.ai/guides/litellm
generated: 2026-11-16T02:57:38.590Z
source: https://unrestrictable.ai/guides/litellm
base_url: https://api.unrestrictable.ai/v1
---

# Uncensored models through LiteLLM

Point LiteLLM at an uncensored OpenAI-compatible endpoint: openai/ prefix, api_base and key in the Python SDK and the proxy config.yaml, with a fallback chain.

Steps checked October 25, 2026 · prices as of November 16, 2026

Three settings connect LiteLLM to an OpenAI-compatible endpoint: a model string of `openai/` plus an id, an `api_base` and a key. Below, those settings carry uncensored builds, first through the Python SDK and then through the proxy's `config.yaml`, ending in a fallback chain over three builds. Every field name was taken from docs.litellm.ai on 25 October 2026.

New to builds that had their refusals removed? Read [abliterated vs uncensored](https://unrestrictable.ai/blog/abliterated-vs-uncensored) first, then return here for the wiring.

## What you need

- model: openai/glm-5.3-uncensored the openai/ prefix in front of an id from the models page
- api_base: https://api.unrestrictable.ai/v1 stops at /v1
- api_key: sk-unr-live-… made in the console; exported as UNR_API_KEY

Make the key in the [console](https://app.unrestrictable.ai/console). It begins with `sk-unr-`, is displayed one time, and draws on a prepaid balance you top up from $10. Every id is on the [uncensored model list](https://unrestrictable.ai/models). To talk to the same builds without writing code, open [/chat](https://unrestrictable.ai/chat) or message the [Telegram bot](https://unrestrictable.ai/telegram).

## Why the model name starts with openai/

LiteLLM reads the provider off the front of the model string. A server that implements OpenAI's `/chat/completions` gets `openai/`, then the id that server knows. The [OpenAI-compatible endpoints doc](https://docs.litellm.ai/docs/providers/openai_compatible) explains the prefix in a single code comment: it tells litellm to route the call as OpenAI.

That doc also says to pass the base URL as is, ending in `/v1`. All the uncensored builds here answer in the OpenAI wire format, so one prefix serves the whole catalog. Checked against litellm 1.106.3, the PyPI release current on 25 October 2026.

## First reply from the Python SDK

A single call with no config file. The result has the OpenAI shape, so anything written against the OpenAI SDK parses it unchanged.

```python
import os
import litellm

response = litellm.completion(
    model="openai/glm-5.3-uncensored",
    api_base="https://api.unrestrictable.ai/v1",
    api_key=os.environ["UNR_API_KEY"],
    messages=[{"role": "user", "content": "Outline a heist thriller in five beats."}],
    max_tokens=600,
)
print(response.choices[0].message.content)
```

To try another build, replace the id behind `openai/`. The base URL and the key stay the same for every build in the catalog.

## Three builds in one fallback chain

A Router holds named deployments plus a `fallbacks` map. The [reliability doc](https://docs.litellm.ai/docs/proxy/reliability) describes the behaviour: once a call has used up `num_retries`, LiteLLM tries the next name in the list, in the order written.

```python
import os
from litellm import Router

BASE = "https://api.unrestrictable.ai/v1"
KEY = os.environ["UNR_API_KEY"]

def build(model_id):
    return {"model": f"openai/{model_id}", "api_base": BASE, "api_key": KEY}

router = Router(
    model_list=[
        {"model_name": "uncensored-primary", "litellm_params": build("glm-5.3-uncensored")},
        {"model_name": "uncensored-second", "litellm_params": build("deepseek-v4-pro-uncensored")},
        {"model_name": "uncensored-third", "litellm_params": build("glm-5.3-abliterated")},
    ],
    fallbacks=[{"uncensored-primary": ["uncensored-second", "uncensored-third"]}],
    num_retries=1,
)

response = router.completion(
    model="uncensored-primary",
    messages=[{"role": "user", "content": "Outline a heist thriller in five beats."}],
)
print(response.choices[0].message.content)
```

One key sits behind all three entries, so a 401 or a 402 returns identically from each; a fallback does not route around it. The chain earns its keep when one build alone fails: a 404 on an id that has left the catalog, a 429, a 5xx, a timeout. As the [docs page](https://unrestrictable.ai/docs) says, a request that dies before the model answers is never billed, so a request that falls through pays once, at the rate of the build that answered.

The names are aliases. The application calls `uncensored-primary` and never learns the model id, so swapping builds is one line in the list. `num_retries=1` grants a failing build a second attempt before the chain advances; a retry that fails before the model answers is likewise unbilled.

## The chain as a proxy config.yaml

The proxy loads the same deployments from a file and exposes them on its own OpenAI-format endpoint. `os.environ/` pulls the key from the environment, so it never lands in the file. The numbers under `model_info` are this catalog's per-token prices, filled in when this page rendered, so LiteLLM's spend tracking lines up with the API's bill.

```
model_list:
  - model_name: uncensored-primary
    litellm_params:
      model: openai/glm-5.3-uncensored
      api_base: https://api.unrestrictable.ai/v1
      api_key: os.environ/UNR_API_KEY
    model_info:
      input_cost_per_token: 0.000000282
      output_cost_per_token: 0.000000846
  - model_name: uncensored-second
    litellm_params:
      model: openai/deepseek-v4-pro-uncensored
      api_base: https://api.unrestrictable.ai/v1
      api_key: os.environ/UNR_API_KEY
    model_info:
      input_cost_per_token: 0.00000097
      output_cost_per_token: 0.00000194
  - model_name: uncensored-third
    litellm_params:
      model: openai/glm-5.3-abliterated
      api_base: https://api.unrestrictable.ai/v1
      api_key: os.environ/UNR_API_KEY
    model_info:
      input_cost_per_token: 0.0000021825
      output_cost_per_token: 0.000004365

router_settings:
  fallbacks: [{"uncensored-primary": ["uncensored-second", "uncensored-third"]}]

litellm_settings:
  num_retries: 1
  request_timeout: 120

general_settings:
  master_key: os.environ/LITELLM_MASTER_KEY
```

```bash
export UNR_API_KEY="sk-unr-live-…"
export LITELLM_MASTER_KEY="sk-pick-your-own"
litellm --config config.yaml
```

The proxy comes up on port 4000. Give any OpenAI SDK that address and the master key, and request `uncensored-primary` as the model. In LiteLLM's custom pricing doc the two `*_cost_per_token` keys are for tracking; they do not change what is billed.

### Fallbacks for context size and content filters

`context_window_fallbacks` catch LiteLLM's `ContextWindowExceededError`. The reliability doc requires `enable_pre_call_checks: true` in `router_settings` for that check; without it, requests of any size go straight to the provider. The check also needs a published window, and the three builds in the chain publish none in the catalog. For a context fallback, add a fourth deployment on [`nemotron-3-ultra-550b-a55b-uncensored`](https://unrestrictable.ai/models/nemotron-3-ultra-550b-a55b-uncensored), whose catalog entry lists 262,144 tokens, and point `uncensored-primary` at it.

`content_policy_fallbacks` respond to a provider's content-filter error, LiteLLM's `ContentPolicyViolationError`. Map a filtered model elsewhere to `uncensored-primary` and those requests land here. A refusal typed into an ordinary reply arrives as a success, not an error, so no fallback can catch it.

## Picking the three builds

Lead with the build you prefer; the backups only bill for the requests that reach them. At the time of writing, the three below had held steady since 12 October on [the daily real-model check](https://unrestrictable.ai/proof), which posts one fixed prompt to every model each day and records whether the reply still matches.

| Model | Build | Input $/M | Output $/M | Context | Wire formats |
| --- | --- | --- | --- | --- | --- |
| [GLM-5.3 Uncensored](https://unrestrictable.ai/models/glm-5.3-uncensored) glm-5.3-uncensored | Uncensored | $0.282 | $0.846 | — | openai |
| [DeepSeek V4 Pro Uncensored](https://unrestrictable.ai/models/deepseek-v4-pro-uncensored) deepseek-v4-pro-uncensored | Uncensored | $0.97 | $1.94 | — | openai |
| [GLM-5.3 Abliterated](https://unrestrictable.ai/models/glm-5.3-abliterated) glm-5.3-abliterated | Abliterated | $2.1825 | $4.365 | — | openai |

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

| Model id | Name in config.yaml | Today's check | Context window |
| --- | --- | --- | --- |
| [`glm-5.3-uncensored`](https://unrestrictable.ai/models/glm-5.3-uncensored) | `uncensored-primary` | Steady since Oct 12 | not published |
| [`deepseek-v4-pro-uncensored`](https://unrestrictable.ai/models/deepseek-v4-pro-uncensored) | `uncensored-second` | Steady since Oct 12 | not published |
| [`glm-5.3-abliterated`](https://unrestrictable.ai/models/glm-5.3-abliterated) | `uncensored-third` | Steady since Oct 30 | not published |

Context windows from the catalog on 2026-11-16; check verdicts read from /proof when the page rendered.

With two GLM builds and one DeepSeek build, an outage on either family leaves a working route. More builds from each family are on the [uncensored GLM](https://unrestrictable.ai/uncensored/glm) and [uncensored DeepSeek](https://unrestrictable.ai/uncensored/deepseek) pages.

## The bill for a batch

Take 10,000 requests, each 1,200 prompt tokens in and 350 reply tokens out, with one build answering all of them.

| Model | 10,000 requests |
| --- | --- |
| [GLM-5.3 Uncensored](https://unrestrictable.ai/models/glm-5.3-uncensored) | $6.35 |
| [DeepSeek V4 Pro Uncensored](https://unrestrictable.ai/models/deepseek-v4-pro-uncensored) | $18.43 |
| [GLM-5.3 Abliterated](https://unrestrictable.ai/models/glm-5.3-abliterated) | $41.47 |

Worked out at render from the catalog on 2026-11-16: requests × 1,200 × the input rate, added to requests × 350 × the output rate.

In practice a month lands near the first row, plus whatever the backups charge on the requests that reached them. The full rate card is the [pricing page](https://unrestrictable.ai/pricing).

## Test the key without LiteLLM

One request returns the ids the key is allowed to call. Nothing is charged for it, so run it before you suspect the config.

```bash
curl https://api.unrestrictable.ai/v1/models \
  -H "Authorization: Bearer sk-unr-live-…"
```

A 200 carrying a list of ids proves both the key and the base URL. A 401 tells you how the key went wrong:

```
HTTP 401
{"error":{"message":"No API key was sent.","type":"authentication_error","param":null,"code":"invalid_api_key"}}
```

```
HTTP 401
{"error":{"message":"The API key is not valid.","type":"authentication_error","param":null,"code":"invalid_api_key"}}
```

Response bodies captured from the API on 25 October 2026.

## LiteLLM errors and what they mean here

Per LiteLLM's exception mapping doc, each HTTP status becomes a class: `AuthenticationError` for 401, `PaymentRequiredError` for 402, `NotFoundError` for 404 and `RateLimitError` for 429.

### Every call returns Not Found

Follow the OpenAI-compatible doc: `api_base` has to end in `/v1`. Then confirm the model string begins with `openai/`.

### One build returns 404 model_not_found

The id behind `openai/` is not in the catalog. The chain carries on to the next deployment; correct the id against the list the curl above returns.

```
HTTP 404
{"error":{"message":"No such model: glm-5.3-uncensord.","type":"not_found_error","param":null,"code":"model_not_found"}}
```

### 402 insufficient_balance

The prepaid balance has run out, and every build in the chain reports the same. Top up in the console.

```
HTTP 402
{"error":{"message":"The prepaid balance does not cover this request. Top up at … to continue.","type":"insufficient_quota","param":null,"code":"insufficient_balance"}}
```

## Questions

### Does LiteLLM speak the OpenAI format?

In both directions. A model string that begins with openai/ sends the call to an OpenAI-compatible endpoint, and the proxy itself serves an OpenAI-format endpoint on port 4000.

### What counts as an OpenAI-compatible API endpoint?

A server that accepts and returns the same bodies as OpenAI's /v1/chat/completions, so a client needs only a base URL, a key and a model id. Here the base URL is https://api.unrestrictable.ai/v1. See the docs page.

### What do I set to use LiteLLM with an OpenAI-compatible provider?

Three values: model as openai/ plus the provider's id, api_base as its /v1 URL, and api_key as its key. For this API that means openai/glm-5.3-uncensored with https://api.unrestrictable.ai/v1.

### Which services are OpenAI-compatible providers?

Any service that answers the OpenAI wire format from its own base URL. LiteLLM’s doc lists dedicated prefixes too, hosted_vllm among them, for servers that fit one; this API uses the plain openai/ prefix. See the uncensored model list.

### Does the LiteLLM proxy work from Node?

Yes. Because the proxy answers in the OpenAI format, the OpenAI Node SDK connects with baseURL pointed at the proxy and the master key as apiKey.

### Will LiteLLM report spend for these builds?

Only when it has the prices. The config.yaml above copies this catalog’s per-token rates into model_info; LiteLLM uses them for tracking and nothing else. See per-token prices.

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.
