EN ▾
Get API key

First request in five minutes

Use the same OpenAI SDKs you already know to send requests to our uncensored endpoint. Change three lines of configuration and start generating text immediately.

https://api.openrouterapi.top/v1uncensored

Base URL and Authentication

Our API is fully OpenAI-compatible, meaning you can use any standard SDK with minimal changes. The base URL for all requests is https://api.openrouterapi.top/v1. Authentication is handled via a Bearer token passed in the Authorization header. You can generate this key instantly by signing up with Google or an email address on our dashboard. Keep your key secure, as it provides direct access to your prepaid credit.

First Request

Test the endpoint with a simple curl command. Replace YOUR_API_KEY with your actual key. The model ID is set to uncensored to bypass standard content refusals. This request sends a prompt and waits for the full response.

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."}]
  }'

If the key is invalid, you receive a 401 error. If your prepaid balance is exhausted, you receive a 402 error. These errors do not consume your token balance, but they do count toward your rate limit quota.

Python SDK Integration

Using the official openai Python package is straightforward. Initialize the client with your base URL and key. The SDK handles the JSON serialization automatically. This example demonstrates a basic chat completion request.

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)

Ensure you have installed the latest version of the SDK. The client object manages the connection pool, so you can reuse it for multiple requests without re-initializing.

Node SDK Integration

For JavaScript environments, the Node SDK works identically. Pass the custom base URL during initialization. This approach allows you to integrate uncensored generation into existing web apps or backend services seamlessly.

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);

The Node SDK supports both promise-based and async/await patterns. Error handling is consistent with other OpenAI-compatible services.

Streaming Responses

Enable streaming by setting stream: true in your request. The API returns Server-Sent Events (SSE). Each chunk contains partial text. The final chunk includes the token usage statistics for billing.

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)

Prepaid credit is charged based on the actual tokens generated in the final output. Streaming does not change the pricing model; you pay for the tokens that are successfully delivered.

Rate Limits and Context Window

Each API key is limited to 300 requests per minute and 8 concurrent requests. The maximum request body size is 8 MB. The context window supports up to 100,000 tokens total (input plus output). There is no separate output cap per request; if max_tokens is unset, the response can run to the end of the window. Errors like 401 or 402 do not consume credit, but they do count toward your rate limit. Refusals for specific content types are also free.

What the API supports

Everything the endpoint can and cannot do, in one place — check it before you top up.

ItemValue
API formatOpenAI-compatible: any OpenAI SDK or client works — change the base URL and the key
Modeluncensored
EndpointsPOST /v1/chat/completions · GET /v1/models
API keyAuthorization: Bearer YOUR_KEY
Base URLhttps://api.openrouterapi.top/v1
Function callingSupported: tools + tool_choice, tool_calls in the reply (streamed too), tool results as role: tool messages
Completion lengthprompt + completion fit within 100,000 tokens; max_tokens optional, no separate output cap
JSON modeJSON object mode via response_format json_object
Other parameterstemperature, top_p, stop, seed, presence_penalty, frequency_penalty
Max context100,000 tokens (prompt + completion together)
SSE streamingYes — server-sent events; the last chunk carries token usage
Max bodyup to 8 MB per request
Concurrency8 requests at the same time per key
Rate limit300 requests per minute per key
HeadersX-Request-Id, X-Balance-USD, X-RateLimit-Limit-Requests, X-RateLimit-Limit-Concurrency
Subscriptionpaid credit never expires, no subscription
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% on $50+, +10% on $100+, +15% on $200+
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
Keysone active key per account; a new key replaces the old one
Content policyadult content allowed; sexual content involving minors is refused
Accountsign in with Google or with e-mail + password

Errors and what to do

Errors come back as JSON with a stable type; failed and refused requests are not billed.

StatusTypeReason
400bad_requestinvalid JSON, empty messages, bad parameter, or a prompt longer than the window — fix and resend
401missing_key · invalid_key · key_revokedno key, wrong key, or a key replaced by a newer one
402no_creditout of credit; add credit and retry
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_busytemporary overload, retry shortly

Questions and answers

Does the uncensored model support function calling?

Yes, the API supports function calling with tools and tool_choice parameters. You can also enforce JSON mode using the response_format parameter for structured outputs.

How is billing calculated for streaming responses?

Billing is based on real token usage. You are charged for the input tokens and the output tokens generated. Streaming chunks are not billed individually; the final count determines the cost.

What happens if I exceed my rate limit?

You will receive a 429 Too Many Requests error. The limit is 300 requests per minute per key. Concurrent requests are capped at 8. Exceeding these limits does not consume your token balance.

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