EN ▾
Get API key

Quickstart for OpenRouter users

Drop your existing OpenAI-compatible client into our endpoint with three configuration changes. No model-specific logic required to access uncensored outputs.

Base URL and Authentication

Our API follows the standard OpenAI chat-completions contract. To switch providers, update only the base URL and API key in your client configuration. The base URL for this service is https://api.openrouteruncensored.com/v1. Authentication relies on a single API key generated during signup, which you pass via the Authorization header. This setup works with any SDK that supports OpenAI-compatible endpoints, ensuring you can switch contexts without rewriting business logic.

When discussing alternatives like uncensored mistral or uncensored deepseek options, remember that each vendor has specific endpoint nuances. Our interface standardizes these into the familiar /v1/chat/completions path. Check the official documentation for any vendor-specific quirks, but for our service, standard headers suffice.

Basic Completion Request

A standard request requires a model identifier and a message array. Send a POST request to the completions endpoint with your system prompt and user input. The model identifier is simply uncensored. This signals the server to process the request through our open-weight model, tuned for minimal refusals on lawful adult, fictional, or controversial topics.

Inputs are processed as text, and outputs are returned as text. There are no embeddings, image generation, or audio features to manage. The structure mirrors the standard OpenAI format, making it easy to integrate into existing pipelines.

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

Python SDK Integration

Using the official openai Python library is straightforward. Initialize the client with the custom base URL and your API key. The library handles serialization and streaming automatically. This approach ensures compatibility with the broader OpenAI ecosystem while routing traffic through our uncensored endpoint.

If you are comparing this to an uncensored deepseek deployment, note that the SDK abstraction hides the underlying network details. You interact with standard objects like ChatCompletion. For uncensored mistral users migrating, the message format remains identical. Adjust the base URL, and the rest of your code stays the same.

from openai import OpenAI

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

The Node.js SDK follows the same pattern. Set the baseURL and apiKey properties in the client constructor. This ensures that all subsequent calls, including streaming and function calling, route correctly. The SDK manages retries and error handling according to standard OpenAI behavior.

When evaluating uncensored grok or other alternatives, the code structure often diverges. Our compatibility layer eliminates that friction. You can use the same model identifier uncensored across different environments without modifying the request payload structure. This consistency reduces debugging time during integration.

import OpenAI from "openai";

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

Enable streaming by setting stream: true in your request. The server returns Server-Sent Events (SSE) for each token generated. This reduces perceived latency for end-users. The final chunk contains the token usage statistics, allowing you to track consumption accurately.

Streaming works with all standard parameters. If you need to compare performance against uncensored gemma or other models, note that our streaming implementation adheres strictly to the SSE standard. Parse the data events in your client to reconstruct the full response. This is essential for real-time applications.

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)

Limits, Errors, and Context Window

The context window supports 100,000 tokens total, including both prompt and completion. There is no separate output cap, and if max_tokens is unset, the response can run to the end of the window. Rate limits are set to 300 requests per minute and 8 concurrent requests per key. Request bodies must not exceed 8 MB.

Handle standard HTTP errors: 401 for invalid keys, 402 for insufficient credit, and 429 for rate limits. Errors do not consume credit. If you double-charge, contact support; credits never expire. For uncensored llama or mistral api key users, these limits are predictable and consistent. Always check your balance before heavy batch operations.

API facts in one table

Use this table to decide whether the API fits your project before you buy credit.

ItemValue
CompatibilityOpenAI Chat Completions schema; official openai SDKs work unchanged
Base URLhttps://api.openrouteruncensored.com/v1
AuthenticationAuthorization: Bearer YOUR_KEY
MethodsPOST /v1/chat/completions · GET /v1/models
Model IDuncensored
Sampling parameterstemperature, top_p, stop, seed, presence_penalty, frequency_penalty
Structured outputJSON object mode via response_format json_object
Function callingYes — tools, tool_choice; replies carry tool_calls, also when streaming; send results back as role: tool
Max outputup to the rest of the 100,000-token window; max_tokens optional (no separate cap)
StreamingSupported (stream: true), usage included at the end
Max context100,000 tokens (prompt + completion together)
Parallel requestsup to 8 in parallel per key
HeadersX-Request-Id, X-Balance-USD, X-RateLimit-Limit-Requests, X-RateLimit-Limit-Concurrency
Max bodyup to 8 MB per request
Requests per minute300 requests per minute per key
Token pricesinput $0.15 / 1M tokens, output $0.50 / 1M tokens
PaymentUSDT (TRC20) or USDC (Base), any whole amount from $20 to $500
Free trial$0.50 for 7 days, no card · Trial key: 2 parallel requests, 60 req/min; full limits (8 and 300) after first top-up
Subscriptionno monthly fee; paid credit does not expire
Billingprepaid credit, charged by real token usage; errors and refusals are free
Volume bonus+5% from $50, +10% from $100, +15% from $200
Keysone active key per account; a new key replaces the old one
AccountGoogle or e-mail and password
Contentuncensored for adults; the only hard rule: no sexual content involving minors

When a request fails

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

HTTPTypeWhat to do
400bad_requestmalformed request or too long for the context window
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 this API support function calling?

Yes, the API supports function calling with the standard tools and tool_choice parameters. You can define functions in your request payload, and the model will return structured tool calls in the response.

How is pricing calculated?

Pricing is based on real token usage: $0.15 per 1M input tokens and $0.50 per 1M output tokens. Errors and refusals do not consume credit. Prepaid credit is charged via crypto and never expires.

Is the model the same as OpenAI's GPT?

No. The model ID is 'uncensored'. It is an open-weight model run on our own servers, tuned to answer without content refusals. It is not GPT, Claude, or any other vendor's model.

Your key is one form away

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

Get API key