ja ▾
Claim trial key

Uncensored LLM API Quickstart Guide

Stop wrestling with corporate refusals and start generating raw text immediately. This guide walks you through connecting your uncensored LLM API client to our infrastructure in under five minutes.

Prerequisites and Account Setup

Start by securing your access credentials without the usual friction. Create an account using either Google sign-in or a simple email and password combination. You receive your API key instantly on the dashboard, and no phone number verification is required. Your key is the only active token for the account, so replacing it generates a fresh credential. You can test the connection with a free $0.50 trial credit that lasts for seven days, though you will need to top up with crypto later to continue using the service.

Installing the OpenAI-Compatible SDK

Use your existing library preferences since our endpoint mirrors the standard interface. Most developers already have the necessary packages installed from previous projects with other providers. You can install the latest version using your standard package manager to ensure compatibility with our streaming and function calling features. The client library handles the HTTP requests and JSON parsing automatically, letting you focus on prompt construction.

Authenticating with Your API Key

Inject your key directly into the client configuration object to authorize every request. Pass the string as the api_key parameter, ensuring it matches the one generated on your dashboard. The client attaches this key to the Authorization header for each call. If you use an invalid or expired key, the server returns a 401 status code immediately, signaling that authentication failed.

Sending Your First Chat Completion Request

Construct a standard chat completion payload and send it to our base URL. Specify the model identifier as uncensored to ensure the correct model processes your input. You can define system instructions to set the tone, followed by user messages containing your actual content. The server processes the request and returns the generated text response.

Handling Streaming Responses via SSE

Enable streaming by setting the stream flag to true in your request parameters. The server sends a series of Server-Sent Events, each containing a partial delta of the generated text. You can accumulate these deltas in your application to display the response in real time. This approach reduces perceived latency significantly, especially for long outputs that approach the 16,000 token limit.

Configuring Parameters: Temperature, Top P, and Seed

Adjust generation parameters to control creativity and reproducibility. Set temperature to higher values for more diverse outputs or lower values for deterministic behavior. Use top_p to limit the sampling pool to the most probable tokens. The seed parameter ensures identical outputs for the same prompt, which is useful for debugging. These settings apply to every request and override default model behaviors.

cURL

curl https://api.llmuncensored.cc/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"}]
  }'

Python

from openai import OpenAI

client = OpenAI(base_url="https://api.llmuncensored.cc/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)

Node.js

import OpenAI from "openai";

const client = new OpenAI({ baseURL: "https://api.llmuncensored.cc/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);

Streaming

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)

Frequently asked questions

What happens if I hit the rate limit?

The server returns a <code>429</code> status code when you exceed 300 requests per minute or 8 concurrent connections. You must wait for the window to reset or reduce your concurrency to resume normal operation. Errors like this do not consume your prepaid credit.

How does the context window work?

The model supports a 100,000 token context window for both prompt and completion combined. If you do not specify a <code>max_tokens</code> value, the output defaults to 2,048 tokens. You can request up to 16,000 tokens per single request, allowing for substantial code or story generation.

Why do I get a 402 error?

A <code>402</code> status code indicates that your account has insufficient prepaid credit to cover the token usage. You must top up your account using USDT or USDC via the payment page to restore service. Errors during processing are free, but successful token generation deducts from your balance.

Access starts with one form

Register, retrieve your key, and update the base URL. That is all required.

Claim trial key