EN ▾
Start now

Uncensored LLM API Quickstart Guide

Drop our uncensored model into your existing OpenAI codebase with zero changes. Use the same SDKs and endpoints to get direct, content-unrestricted responses from our dedicated infrastructure.

Prerequisites: Install the OpenAI SDK

Start by installing the official OpenAI SDK for your preferred language. The client library handles authentication and serialization automatically. You only need the standard library; no extra dependencies are required for basic text generation.

Ensure your environment supports modern Python or JavaScript versions. The SDK abstracts away the HTTP details so you can focus on prompt engineering.

Initialize the client with base_url

Point your client to our dedicated endpoint instead of the default OpenAI URL. This single change routes all requests to our uncensored model infrastructure while keeping the standard OpenAI-compatible format.

You will use your unique API key for authentication. The base URL ensures your app talks directly to our servers without proxying through another vendor.

  • Base URL: HTTPS://api.openrouteropenaicompatible.com/v1
  • Model ID: uncensored
from openai import OpenAI

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

Send your first chat completion

Make a standard POST request to the chat completions endpoint. Pass your system prompt and user message in the standard JSON structure. The model returns text responses without the usual content filters for lawful adult or controversial topics.

curl https://api.openrouteropenaicompatible.com/v1/chat/completions \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "uncensored",
    "messages": [{"role": "user", "content": "list all installed npm packages in current directory"}]
  }'
import OpenAI from "openai";

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

Enable streaming responses

Set stream: true to receive tokens as they generate. This reduces perceived latency for long outputs. Each chunk contains partial text and usage statistics in the final event.

The server sends Server-Sent Events (SSE) to your client. Handle the stream to update your UI in real time without waiting for the full response.

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)

Configure JSON mode for structured data

Use response_format to force the model into JSON mode. This ensures consistent, parseable output for your applications. The model adheres strictly to the schema you define in your system prompt.

Enable json_object to guarantee the response is valid JSON. This is critical for programmatic integration with your backend services.

Implement function calling

Define tools in your request to enable function calling. The model can invoke functions based on your prompt context. Pass the tool definitions and let the model decide which function to call.

Handle the tool calls in your application logic. Execute the function and feed the result back into the conversation for a coherent follow-up.

Handle token usage and limits

Monitor your usage to avoid service interruptions. The context window supports 100,000 tokens for prompt and completion combined. Output is limited to 16,000 tokens per request.

Rate limits enforce 300 requests per minute per key. If you exceed this, you will receive a 429 error. Authentication errors return 401, and insufficient credit returns 402. Errors and refusals do not consume tokens, so you only pay for successful content generation.

Common questions

Is this the OpenAI API or an OpenAI-compatible alternative?

We are an openrouter openai compatible service that runs our own uncensored model. Your existing OpenAI code works without changes because we use the same endpoint structure and SDK compatibility.

What happens if I hit the rate limit?

You will receive a 429 status code indicating too many requests. The limit is 300 requests per minute per API key. Wait a few seconds and retry, or reduce your parallel request volume.

Does the model refuse content like other APIs?

Our model is tuned to answer without content refusals for lawful adult, fictional, or controversial topics. The only hard limit is no sexual content involving minors, which is always refused.

Unlock your API key

Register, retrieve your key, and update the endpoint URL. Complete integration.

Start now