PT ▾
Try with trial credit

Uncensored API quickstart for developers

This uncensored API key gives you a direct path to unrestricted text generation via a standard OpenAI-compatible endpoint. It strips away the refusals and censorship common in mainstream providers while keeping your integration simple.

Base URL and model ID: the 'uncensored' endpoint

Your API key unlocks access to a dedicated large language model hosted on our servers. It is not a proxy for GPT or Claude, but a standalone model tuned for adult and uncensored content. You will send requests to a single base URL that mimics the standard chat-completions format.

The endpoint is https://api.openrouterapikey.com/v1. You must specify the model ID as uncensored in every request. This ensures you are hitting the right server instance. The model handles a context window of 100,000 tokens for both prompt and completion combined.

  • Base URL: https://api.openrouterapikey.com/v1
  • Model ID: uncensored
  • Max Output: 16,000 tokens per request

Authentication: passing your API key in the header

You authenticate every request by including your unique API key in the Authorization header. This key is generated immediately after you sign up via Google or email. You do not need to add a prefix like Bearer; just paste the key directly.

If the key is missing or invalid, the server returns a 401 error. Ensure you copy the key exactly as shown during signup. The key is tied to your account and replaces any previous active key.

Streaming responses with SSE and token usage tracking

Enable streaming by setting stream: true in your request body. The server responds with Server-Sent Events (SSE). Each chunk contains partial text until the final chunk.

The final chunk includes a usage object. This object details the input and output token counts for billing. You can track usage in real-time without waiting for the full response. Errors and refusals do not consume credit.

JSON mode and function calling for structured outputs

The API supports structured outputs for reliable integration. Use response_format: {"type": "json_object"} to force JSON output. This is useful for parsing data or generating structured content.

You can also define tools for function calling. The model will respond with tool calls when appropriate. This allows for complex workflows and agent-like behavior. Both features work within the same request structure.

Parameters that matter: temperature, top_p, and stop sequences

Control the model's behavior with standard parameters. Adjust temperature for creativity or precision. Set top_p to control diversity. Use stop sequences to halt generation at specific points.

Other parameters like seed, presence_penalty, and frequency_penalty are also supported. These allow fine-tuning of the output style. The default settings provide a balanced response for most use cases.

Handling limits: 300 RPM and 8 concurrent requests

Each API key is limited to 300 requests per minute. You can also have 8 concurrent requests active at once. The request body size is capped at 8 MB. Exceeding these limits results in a 429 error.

If you run out of credit, requests will fail with a 402 error. You can top up your balance using crypto. Credit never expires, so you can add funds whenever needed. Errors do not consume credit.

cURL

curl https://api.openrouterapikey.com/v1/chat/completions \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "uncensored",
    "messages": [{"role": "user", "content": "Generate a key for uncensored content"}]
  }'

Python

from openai import OpenAI

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

Node.js

import OpenAI from "openai";

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

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)

Common questions

Does the uncensored API key work with standard OpenAI SDKs?

Yes. The endpoint is fully OpenAI-compatible. You can use the official OpenAI SDKs or any client that supports the chat-completions format. Just update the base URL to <code>https://api.openrouterapikey.com/v1</code> and set the model to <code>uncensored</code>.

How do I pay for the API and what are the limits?

You can top up your balance with crypto only (USDT on TRC20 or USDC on Base). Minimum top-up is $20. The pricing is $0.15 per 1M input tokens and $0.50 per 1M output tokens. Credit never expires.

What happens if I hit the rate limit or run out of credit?

If you hit the rate limit (300 RPM), you will receive a 429 error. If you run out of credit, you will receive a 402 error. Errors and refusals do not consume your credit balance.

Secure your key instantly

Register, copy the key, and update your endpoint URL. Simple configuration.