ar ▾

Integration Guide for Developers

Integrate our uncensored API with zero proxy friction using standard OpenAI-compatible client code. This guide covers authentication, streaming, and the exact limits you need to know.

Base URL and Authentication

Connect to the API immediately using your base URL and a bearer token. We host our own uncensored model directly, eliminating the proxy layer that causes OpenRouter rate limit issues. Send requests to https://api.openrouterratelimit.com/v1 with the header Authorization: Bearer YOUR_API_KEY. Your key is generated instantly upon signup via Google or email. There is no phone number required and no subscription to manage. Credit never expires, so your scripts will not break due to monthly billing cycles. Errors and refusals do not consume your balance, ensuring you only pay for actual token usage.

First Request

Make your first call using the standard chat completions endpoint. This works with any OpenAI-compatible client by simply changing the base URL. Send a POST request to /v1/chat/completions with the model ID uncensored. You can stream responses or receive full text outputs. The model handles up to 100,000 tokens for the combined prompt and completion. Output is capped at 16,000 tokens per request, or 2,048 if you omit the max_tokens parameter. This ensures consistent performance for roleplay and data extraction tasks.

Python SDK Integration

Use the official OpenAI Python library to interact with our API seamlessly. Initialize the client with your API key and the specific base URL provided. This approach lets you reuse existing codebases that were built for other providers. The client handles JSON serialization and response parsing automatically. You can pass parameters like temperature and top_p to control creativity. Since we are an independent service, you do not need to worry about third-party model routing errors. The SDK supports all standard parameters including stop, seed, and penalty values for precise control.

Node SDK Integration

Integrate the API into your Node.js applications with minimal configuration. The openai npm package works out of the box if you override the default base URL. Pass your API key and the custom endpoint to the client constructor. This allows you to maintain compatibility with existing Node.js ecosystems. You can use the same models and parameters as the Python client. The response structure mirrors the OpenAI format exactly. This makes it easy to switch between different LLM providers without rewriting your application logic. Just ensure you update the base URL to point to our servers.

Streaming Responses

Enable streaming by setting the stream parameter to true in your request. The server returns data in chunks via Server-Sent Events (SSE). Each chunk contains the delta of the response, allowing you to render text in real time. The final chunk includes the total token usage statistics for billing transparency. This is crucial for building chat interfaces that feel responsive. You can also use function calling alongside streaming to execute tools dynamically. The model supports tool definitions and tool choice parameters. This ensures you get low latency without sacrificing the ability to process structured data or execute external functions.

Rate Limits and Quotas

Our limits are designed for high-throughput developers who hate proxy errors. You get 300 requests per minute and 8 concurrent requests per key. The maximum request body size is 8 MB. If you hit a 429 error, you have exceeded the rate limit, not your credit balance. A 401 error means your API key is invalid or expired. A 402 error indicates you have no prepaid credit remaining. Context window supports 100,000 tokens total. Errors and refusals are free, so you do not waste credits on failed attempts. Use a single key per account; generating a new one replaces the old active key immediately.

cURL

curl https://api.openrouterratelimit.com/v1/chat/completions \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "uncensored",
    "messages": [{"role": "user", "content": "Check server status now."}]
  }'

Python

from openai import OpenAI

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

Frequently asked questions

Why am I getting rate limit errors if I have plenty of credit?

Rate limits are separate from your prepaid credit balance. You are limited to 300 requests per minute and 8 concurrent requests per key. If you exceed these thresholds, you receive a 429 error regardless of your account balance. This prevents server overload and ensures stable performance for all users.

Does the uncensored model support function calling and JSON mode?

Yes, the model supports both function calling and JSON mode. You can pass tool definitions and use <code>response_format: {"type": "json_object"}</code> for structured outputs. This allows you to integrate the API into complex workflows that require precise data extraction or dynamic tool execution without content refusals.

How does the context window work for long documents?

The context window supports 100,000 tokens for the combined prompt and completion. This allows you to process large documents or long conversation histories in a single request. The maximum output is capped at 16,000 tokens per request, or 2,048 if you do not specify a <code>max_tokens</code> value. This ensures efficient processing while maintaining high quality for uncensored content generation.

Get your API key in one step

Register, copy the key, update the base URL. That is all there is to the configuration.

Start now