The OpenAI SDK with uncensored models

Set OPENAI_BASE_URL and OPENAI_API_KEY and keep your code: Python, TypeScript, curl and the Vercel AI SDK, streaming, JSON output, the error codes, and what a request costs at the live price.

Steps checked October 26, 2026 · prices as of November 7, 2026

Every model on this catalog answers the OpenAI wire format, so the official OpenAI SDKs reach them with two environment variables and no other change. This page has the Python, TypeScript, curl and Vercel AI SDK calls, the error codes, and what a request costs at the live price.

Two environment variables

Every SDK that speaks the OpenAI API reads the same two variables. Set them once; the code that follows needs no key or URL in it. The base URL ends in /v1; the key comes from the console, starts with sk-ullm-, is shown once and spends a prepaid balance that starts at $10.

shell
1export OPENAI_BASE_URL="https://api.uncensoredllm.ai/v1"
2export OPENAI_API_KEY="sk-ullm-live-…"
OPENAI_BASE_URL
https://api.uncensoredllm.ai/v1
ends in /v1; nothing after it
OPENAI_API_KEY
sk-ullm-live-…
created in the console
model
glm-5.3-uncensored
any id from the models page

Python

The official openai package, unchanged. The response has the OpenAI shape, so code written for OpenAI reads it the same way.

main.py
1from openai import OpenAI
2
3client = OpenAI() # reads OPENAI_BASE_URL and OPENAI_API_KEY
4
5response = client.chat.completions.create(
6 model="glm-5.3-uncensored",
7 messages=[{"role": "user", "content": "Explain how a lock pick works, step by step."}],
8 max_tokens=600,
9)
10print(response.choices[0].message.content)

Streaming is the same flag as on OpenAI; the chunks arrive as the model writes them.

stream.py
1with client.chat.completions.create(
2 model="glm-5.3-uncensored",
3 messages=[{"role": "user", "content": "Write a villain's monologue."}],
4 stream=True,
5) as events:
6 for chunk in events:
7 piece = chunk.choices[0].delta.content
8 if piece:
9 print(piece, end="", flush=True)

TypeScript

The openai npm package takes baseURL and apiKey in its constructor; the environment variables above fill them.

main.ts
1import OpenAI from 'openai';
2
3const client = new OpenAI({
4 baseURL: process.env.OPENAI_BASE_URL,
5 apiKey: process.env.OPENAI_API_KEY,
6});
7
8const response = await client.chat.completions.create({
9 model: 'glm-5.3-uncensored',
10 messages: [{ role: 'user', content: 'Explain how a lock pick works, step by step.' }],
11 max_tokens: 600,
12});
13console.log(response.choices[0]?.message.content);

Vercel AI SDK

@ai-sdk/openai with a custom base URL; provider.chat(id) uses the Chat Completions path, which every listed model answers. streamText, generateText and generateObject all work.

route.ts
1import { createOpenAI } from '@ai-sdk/openai';
2import { streamText } from 'ai';
3
4const provider = createOpenAI({
5 baseURL: process.env.OPENAI_BASE_URL,
6 apiKey: process.env.OPENAI_API_KEY,
7});
8
9const result = streamText({
10 model: provider.chat('glm-5.3-uncensored'),
11 prompt: 'Explain how a lock pick works, step by step.',
12});
13for await (const piece of result.textStream) process.stdout.write(piece);

Check it with curl

The list call is free and tells you the key and base URL are right; the chat call is one billed request.

shell
1curl https://api.uncensoredllm.ai/v1/models -H "Authorization: Bearer sk-ullm-live-…"
shell
1curl https://api.uncensoredllm.ai/v1/chat/completions \
2 -H "Authorization: Bearer sk-ullm-live-…" \
3 -H "Content-Type: application/json" \
4 -d '{"model": "glm-5.3-uncensored", "messages": [{"role": "user", "content": "Hello"}]}'

Every answer carries x-uplink-request-id; a non-streamed answer carries x-uplink-charge, what it cost in USD. The console’s usage page lists both.

What a request costs

One request of 600 input and 250 output tokens, on four builds, at the catalog prices on 2026-11-07:

ModelOne request1,000 requests
GLM-5.3 Uncensored$0.00038$0.38
DeepSeek V4.1 Flash Abliterated$0.00093$0.93
GLM-5.3 Flash Uncensored$0.00016$0.16
Kimi K3 Uncensored$0.01$10.62
Uncensored models and their prices per million tokens
GLM-5.3 Uncensoredglm-5.3-uncensoredUncensored$0.282$0.846
DeepSeek V4.1 Flash Abliterateddeepseek-v4.1-flash-abliteratedAbliterated$0.8488$1.6975
GLM-5.3 Flash Uncensoredglm-5.3-flash-uncensoredUncensored$0.1053$0.3685
Kimi K3 Uncensoredkimi-k3-uncensoredUncensored$5.745$28.68

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

JSON output, streaming and tools

response_format with json_object asks the model for a JSON body; an answer that is not the format asked for is refunded, as the receipt’s refund field records. stream: true works on every model. Tool calling works on the builds whose base model supports it; the model page says which.

json.py
1response = client.chat.completions.create(
2 model="glm-5.3-uncensored",
3 messages=[{"role": "user", "content": "Give three plot hooks as JSON with keys title and premise."}],
4 response_format={"type": "json_object"},
5)

Errors

  • 401 invalid_api_key: the key is wrong or revoked. Copy it again from the console.
  • 402 insufficient_balance: the balance does not cover the request. 402 monthly_limit_reached: the key hit the spend limit set on it.
  • 404 model_not_found: the id is not on the models page. Check the spelling.
  • 429 rate_limited: the key hit its rate limit; retry-after says how long to wait.
  • A request that fails before the model answers is not charged.

Questions

Not with these models. Every listed build answers the OpenAI wire format only; the OpenAI SDK, the Vercel AI SDK with the OpenAI provider, LiteLLM and plain HTTP all reach it.

Yes. Construct a second client with baseURL https://api.uncensoredllm.ai/v1 and this key, and leave the default client alone.

Per key, set in the console; a 429 carries retry-after. There is no account-wide cap beyond the balance.

The models page, or GET /v1/models with your key, which lists exactly the ids the key can call. See the models page.

Every model above is on the uncensored model list with its live price per million tokens. Per-token pricing sets the whole catalog side by side, and the family directory groups the builds by base model.

Get a keyPrepaid 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.