it ▾

Cheap, uncensored LLM API

Get API key
per 1M input tokens
$0.15
Output tokens / 1M
$0.50
token context
100,000
trial credit
$0.50
requests per minute
300

Uncensored LocallyQuickstart for the uncensored ai api

https://api.uncensoredlocally.com/v1

https://api.uncensoredlocally.com/v1

Quickstart for the uncensored ai api

Integrate the uncensored AI API in minutes using standard OpenAI SDKs. Get an API key, set your base URL, and start generating text without content refusals.

Authentication & Base URL

Start by generating your key via the dashboard. Use https://api.uncensoredlocally.com/v1 as your base URL. Pass your key in the Authorization header. This setup works with any OpenAI-compatible client.

Sending Your First Request

Send a POST request to /v1/chat/completions. The model identifier is uncensored. Return text directly without extra parameters.

curl https://api.uncensoredlocally.com/v1/chat/completions \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "uncensored",
    "messages": [{"role": "user", "content": "What is the capital of France?"}]
  }'

Check your response for the generated content. Errors return standard HTTP codes.

Python SDK Integration

Install the official openai package. Set the base URL and API key in your client initialization. Send messages with the uncensored model. Receive text output immediately.

from openai import OpenAI

client = OpenAI(base_url="https://api.uncensoredlocally.com/v1", api_key="YOUR_KEY")

resp = client.chat.completions.create(
    model="uncensored",
    messages=[{"role": "user", "content": "Summarise this thread without softening it."}],
)
print(resp.choices[0].message.content)

Handle responses by accessing the content field. The SDK handles JSON parsing automatically.

Node SDK Implementation

Use the Node.js OpenAI client. Configure the base URL to point to our servers. Initialize with your API key. Request completions using the uncensored model ID. The SDK manages the HTTP requests efficiently.

import OpenAI from "openai";

const client = new OpenAI({ baseURL: "https://api.uncensoredlocally.com/v1", apiKey: process.env.API_KEY });

const resp = await client.chat.completions.create({
  model: "uncensored",
  messages: [{ role: "user", content: "Draft a villain monologue for my game." }],
});
console.log(resp.choices[0].message.content);

Access the response text from the result object. Error handling follows standard SDK patterns.

Streaming Responses & Token Usage

Enable streaming by setting stream: true. Receive tokens via Server-Sent Events. Token counts appear in the final chunk. Process partial text in real time for better user experience.

stream = client.chat.completions.create(
    model="uncensored",
    messages=[{"role": "user", "content": "Tell the story in second person."}],
    stream=True,
)
for chunk in stream:
    if chunk.choices and chunk.choices[0].delta.content:
        print(chunk.choices[0].delta.content, end="", flush=True)

Buffer the content as it arrives. Close the stream when the final chunk arrives. This approach reduces perceived latency significantly.

Rate Limits & Error Handling

You get 300 requests per minute. Handle 401 errors by checking your key. Fix 402 errors by adding crypto credit. Manage 429 limits by backing off. The context window is 100,000 tokens total. Output limits to 16,000 tokens per request.

Common questions

View API reference
How do I get an uncensored LLM API key?

Sign up with Google or email on the dashboard. Your key appears immediately. No phone number is required. Use this key with any OpenAI-compatible SDK.

Is the uncensored AI API openai compatible?

Yes, it uses the same endpoints. Set your base URL to our API address. Use the model ID <code>uncensored</code>. All standard parameters like temperature and top_p work as expected.

What happens if I exceed the rate limit?

The API returns a 429 status code. You must wait before sending more requests. The limit is 300 requests per minute per key. Back off and retry with exponential delay.

Get your API key now

Register, grab the key, and swap the base URL. That is all the configuration required.