EN ▾
Get API key

Uncensored LLM API for Developers

First request in five minutes

Connect your existing OpenAI-compatible client to our uncensored LLM API in under a minute. Switch base URLs, inject your key, and start generating text immediately.

Base URL and Authentication

To begin using the uncensored API, point your client at our dedicated endpoint. The base URL is https://api.openrouteruncensored.cc/v1. This ensures your requests bypass standard OpenRouter routing and hit our direct infrastructure for the uncensored model.

Authentication is handled via a standard Bearer token. You obtain an api key by signing up with Google or email on our dashboard. Once generated, include it in your HTTP headers as Authorization: Bearer YOUR_API_KEY. This key is unique to your account; creating a new key revokes the previous one, so keep your active key secure.

First Request

Send your first text generation request using the standard POST /v1/chat/completions endpoint. You must specify the model ID as "uncensored". This tells the server which open-weight model to serve. The request body includes your system prompt, user messages, and optional generation parameters.

Below is a minimal curl example demonstrating the structure. Ensure your key has sufficient prepaid credit, as billing is pay-per-token.


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

If you receive a 401 error, your key is invalid or expired. A 402 error means your prepaid balance is exhausted. Top up by crypto (USDT on TRC20, USDC on Base) to continue.

Python SDK

Use the official OpenAI Python library to integrate quickly. Set the base_url and api_key to match our infrastructure. This allows you to reuse existing codebases that were built for OpenAI without rewriting the client logic.

Initialize the client with your credentials and the correct base URL. Then call chat.completions.create with the model "uncensored". This approach works for both synchronous and asynchronous workflows, keeping your integration lightweight.


from openai import OpenAI

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

The response contains the generated text, token usage statistics, and the finish reason. Handle errors gracefully, especially network timeouts or rate limit responses.

Node SDK

For JavaScript or TypeScript environments, the OpenAI Node SDK provides a similar interface. Configure the client with our base URL and your API key. This ensures all subsequent calls route correctly to our uncensored model.

Instantiate the client, then invoke the chat completion method. Specify model: "uncensored" in the parameters. This method supports standard JSON payloads and returns structured data including content and usage metrics.


import OpenAI from "openai";

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

This setup is ideal for server-side applications or edge functions where you need to generate text without managing HTTP connections manually. The SDK handles retries and serialization automatically.

Streaming Responses

Enable streaming by setting stream: true in your request. The server sends a series of Server-Sent Events (SSE) chunks. Each chunk contains a partial delta of the generated text. This allows you to display output in real-time to the user.

Parse the SSE stream in your client. The final chunk includes the total token usage for the request, which is critical for accurate billing tracking. Streaming reduces perceived latency significantly for long responses.


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)

Ensure your client handles incomplete JSON or text gracefully, as streaming breaks the response into discrete events. Monitor the finish_reason in the last chunk to know when generation is complete.

Limits, Errors, and Context

Our API enforces strict rate limits to ensure stability. You are allowed 300 requests per minute and up to 8 concurrent requests per key. The maximum request body size is 8 MB. Exceeding these limits results in a 429 Too Many Requests error.

The context window is 100,000 tokens total (prompt + completion). There is no separate output cap; if you do not set max_tokens, the response can run to the end of the window. Errors and refusals do not consume your prepaid credit. If you encounter a 401, verify your key. For 402, top up by crypto (USDT on TRC20, USDC on Base).

Under the hood: specs

Before you integrate, here is exactly what you get with a key.

ItemValue
API formatOpenAI-compatible: any OpenAI SDK or client works — change the base URL and the key
Modeluncensored
AuthenticationBearer token in the Authorization header
Base URLhttps://api.openrouteruncensored.cc/v1
EndpointsPOST /v1/chat/completions · GET /v1/models
Other parameterstemperature, top_p, stop, seed and the two penalties are passed through
SSE streamingSupported (stream: true), usage included at the end
Function callingSupported: tools + tool_choice, tool_calls in the reply (streamed too), tool results as role: tool messages
Max outputprompt + completion fit within 100,000 tokens; max_tokens optional, no separate output cap
Max context100,000 tokens (prompt + completion together)
Structured outputJSON object mode via response_format json_object
HeadersX-Request-Id, X-Balance-USD, X-RateLimit-Limit-Requests, X-RateLimit-Limit-Concurrency
Concurrencyup to 8 in parallel per key
Max bodyup to 8 MB per request
Rate limit300/min per key
Subscriptionno monthly fee; paid credit does not expire
Trial credit$0.50 for 7 days, no card · Trial key: 2 parallel requests, 60 req/min; full limits (8 and 300) after first top-up
Top-upcrypto: USDT on TRON or USDC on Base, $20–$500, any whole sum
Token prices$0.15 per 1M input tokens · $0.50 per 1M output tokens
How you payprepaid credit, charged by real token usage; errors and refusals are free
Bonus credit+5% from $50, +10% from $100, +15% from $200
Accountsign in with Google or with e-mail + password
Content policyuncensored for adults; the only hard rule: no sexual content involving minors
Key managementone key per account, regenerate any time (the old one stops working)

When a request fails

Every error is JSON with a type you can switch on. You are never charged for an error.

CodeTypeMeaning
400bad_requestmalformed request or too long for the context window
401missing_key · invalid_key · key_revokedcheck the Authorization header or use your current key
402no_creditbalance is empty — top up, requests resume at once
403content_blockedsexual content involving minors — refused, not billed
404not_foundunknown endpoint
413request_too_largebody over 8 MB
429rate_limited · concurrencyslow down: rate or parallel limit reached
503upstream_busymodel busy — retry in a few seconds

Questions and answers

Can I use multiple API keys with one account?

No. Each account supports only one active API key at a time. Generating a new key immediately revokes the previous one, so you cannot have multiple concurrent keys.

Does this API support function calling or JSON mode?

Yes. The endpoint supports function calling (tools, tool_choice) and JSON mode (response_format json_object). These features work exactly like the OpenAI API specifications.

How is billing calculated for streaming requests?

Billing is based on actual token usage reported in the final SSE chunk. Errors and refusals are free. You pay only for tokens successfully sent and received.

Your key is one form away

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

Get API key