Get API key

Switch your client in three lines

Migrate your existing client to our uncensored endpoint by updating the base URL and model ID. This guide covers the three lines of code needed to switch from standard OpenAI-compatible clients to our dedicated API.

https://api.openrouterapi.top/v1uncensored

Installation: Use Standard OpenAI SDKs

You do not need a custom library. Our API is fully OpenAI-compatible, meaning you can use the same SDKs you already have installed. This approach works for the qwen api, kimi api, and xai api workflows if you are building a generic text agent. Install the standard client package for your language of choice. Once installed, you will configure the client to point to our base URL instead of the default OpenRouter or OpenAI endpoints. This ensures your code remains portable while leveraging our uncensored model capabilities.

Authentication: Bearer Token Setup

Authentication relies on a single Bearer token passed in the header. Generate your key via the Get API key page using Google or email. The token is displayed immediately and must be kept secure. Pass it as Authorization: Bearer YOUR_API_KEY in every request. If the key is missing or invalid, the API returns a 401 error. Unlike subscription models, we do not require monthly fees; your credit is prepaid and charged only when tokens are consumed.

Endpoint: POST /v1/chat/completions

The primary interaction point is the chat completions endpoint. Send your prompts as JSON payloads to this URL. The model ID is strictly uncensored. Ensure you set the model field in your request body. This endpoint handles text-in, text-out operations. It does not support embeddings, images, or audio. For accurate billing, verify your payload structure matches the OpenAI format. This standardization allows you to swap between different OpenRouter-compatible services with minimal code changes.

curl https://api.openrouterapi.top/v1/chat/completions \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "uncensored",
    "messages": [{"role": "user", "content": "Write a blunt product review of a cheap VPN."}]
  }'

Model ID: 'uncensored'

Specify uncensored as the model ID in your request. This model is open-weight, tuned for fewer refusals on adult or controversial topics, and runs on our servers. It is not GPT, Claude, or Llama. The context window allows up to 64,000 tokens combined for prompt and completion. If you do not set max_tokens, the default output is 2,048 tokens. You can adjust parameters like temperature, top_p, and seed to control generation behavior. This model is designed for developers who need raw output without content filters.

Streaming Responses with SSE

Enable streaming by setting stream: true in your request. The API returns Server-Sent Events (SSE) as tokens are generated. This is useful for real-time UI updates. Token usage metrics, including input and output counts, are included in the final chunk. This allows you to track costs accurately in real-time. Ensure your client handles partial responses correctly. Streaming does not affect pricing; you are charged for the total tokens consumed, regardless of how they are delivered.

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)

Function Calling and JSON Mode

Support tools and function calling via the tools parameter. You can enforce strict JSON output using response_format: {"type": "json_object"}. This is essential for integrating with backend systems that require structured data. Use tool_choice to control how the model selects functions. These features work exactly as documented in the OpenAI specification. Combine them with temperature adjustments for optimal performance. This API does not handle tool execution; it only generates the function call arguments.

from openai import OpenAI

client = OpenAI(base_url="https://api.openrouterapi.top/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)
import OpenAI from "openai";

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

Rate Limits: 300 RPM per Key

Each API key is limited to 300 requests per minute and 8 concurrent requests. The maximum request body size is 8 MB. If you exceed these limits, the API returns a 429 error. If your prepaid credit is exhausted, you receive a 402 error. Errors and refusals (except for the hard limit on minor sexual content) do not consume tokens. Manage your concurrency carefully to avoid throttling. You can generate a new key via the dashboard to replace the current one, but only one key is active per account.

Questions and answers

Does the uncensored model refuse content?

The model is tuned to avoid refusals for lawful adult, fictional, or controversial topics. However, a hard limit applies: requests containing sexual content involving minors are always refused, regardless of other settings.

How are errors handled in billing?

Token usage errors and content refusals are free. You are only charged for tokens that are successfully generated and returned. If you encounter a 402 error, your credit is depleted, and you need to top up via crypto to continue.

Can I use this with the official OpenAI SDK?

Yes. By updating the base URL to https://api.openrouterapi.top/v1 and setting the model to uncensored, the standard OpenAI SDKs work without modification. This applies to Python, Node, and other supported clients.

Your key is one form away

Create an account, copy the key, change the base URL. That is the whole setup.

Get API keyRead the docs

$0.50trial credit