EN ▾
Get API key

Quickstart for OpenRouter users

Migrate your OpenRouter API calls to our uncensored endpoint in minutes by swapping the base URL and API key. This guide covers the essential integrations for text generation, streaming, and structured outputs.

Start with trial credit

Email and password, key on screen right away.

Get API key

Installation & Setup

Our API is fully compatible with standard OpenAI SDKs. To switch from OpenRouter, you only need to update two configuration values: the base_url and the api_key. Point your client to https://api.openrouterapi.cc/v1 and use the key generated on our dashboard. No custom headers or complex routing logic are required. The model ID to request is uncensored.

Ensure your SDK version supports the base_url parameter. If you are using a raw HTTP client, simply update the target URL. This setup ensures your existing client code works without modification, provided you are only sending text completion requests.

Authentication

Authentication is handled via the standard Authorization header. Pass your API key as a Bearer token. If the key is invalid or expired, the API returns a 401 error. Unlike some providers, we do not charge for failed requests; errors and refusals are free, so you can test authentication without consuming credit.

Each account supports one active key at a time. Generating a new key immediately invalidates the previous one. Keep your key secure and rotate it if you suspect exposure. The key is displayed immediately after signup, so copy it before leaving the page.

Basic Chat Completion

The core functionality is the POST /v1/chat/completions endpoint. Send your prompt as a list of messages and receive a text response. The model is tuned to answer without content refusals for lawful adult use, making it suitable for creative, controversial, or security-research topics.

Set the model field to uncensored. You can control behavior using parameters like temperature, top_p, and stop. The API supports JSON mode via response_format and function calling via tools. All requests are processed asynchronously, and you receive the full completion once the model finishes.

Streaming Responses

Enable streaming by setting stream: true in your request. The API returns Server-Sent Events (SSE) with partial responses. You receive chunks of text as they are generated, allowing for real-time display in your application.

Token usage information is provided in the last chunk of the stream. This allows you to track costs accurately without parsing every individual token. Streaming is ideal for chat interfaces where latency matters. Ensure your client handles SSE correctly and closes the connection when the stream ends.

Function Calling

The API supports function calling via the tools parameter. Define your functions in the tools array and set tool_choice to auto or a specific function name. The model will return structured JSON arguments if a function is triggered.

This feature is useful for integrating the LLM with external APIs or databases. Ensure your function definitions are accurate, as the model relies on them to generate valid arguments. The API does not execute the functions; you must handle the execution logic in your application code.

JSON Mode

For structured outputs, use response_format: {"type": "json_object"}. This forces the model to return valid JSON, which is essential for parsing data in downstream applications. JSON mode is often more reliable than function calling for simple data extraction tasks.

Ensure your prompts clearly instruct the model to return JSON. Invalid JSON responses may occur if the prompt is ambiguous. JSON mode is supported in both standard and streaming modes. Use it when you need predictable, machine-readable outputs.

Limits, Errors, and Context

The context window is 100,000 tokens for prompt and completion combined. If max_tokens is not set, the response can run to the end of the window. Rate limits are 300 requests per minute and 8 concurrent requests per key. Request bodies are capped at 8 MB.

Errors return standard HTTP codes: 401 for invalid keys, 402 for insufficient credit, and 429 for rate limits. Credit is prepaid, so a 402 error means you need to top up. Errors and refusals are free, so you can retry without cost. The hard content limit blocks sexual content involving minors.

cURL

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

Python

from openai import OpenAI

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

Node.js

import OpenAI from "openai";

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

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)

What the API supports

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

FeatureSupport
ProtocolOpenAI Chat Completions schema; official openai SDKs work unchanged
Modeluncensored
AuthenticationBearer token in the Authorization header
EndpointsPOST /v1/chat/completions · GET /v1/models
Base URLhttps://api.openrouterapi.cc/v1
SSE streamingSupported (stream: true), usage included at the end
Tools / tool callsYes — tools, tool_choice; replies carry tool_calls, also when streaming; send results back as role: tool
Sampling parameterstemperature, top_p, stop, seed, presence_penalty, frequency_penalty
Max context100,000 tokens (prompt + completion together)
Max outputprompt + completion fit within 100,000 tokens; max_tokens optional, no separate output cap
Structured outputresponse_format: {"type": "json_object"}
Rate limit300/min per key
Parallel requests8 requests at the same time per key
HeadersX-Request-Id, X-Balance-USD, X-RateLimit-Limit-Requests, X-RateLimit-Limit-Concurrency
Max body8 MB request body
Billingpay as you go from prepaid credit; nothing is charged for failed or refused requests
Bonus credit+5% from $50, +10% from $100, +15% from $200
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
Credit expiryno monthly fee; paid credit does not expire
PaymentUSDT (TRC20) or USDC (Base), any whole amount from $20 to $500
Priceinput $0.15 / 1M tokens, output $0.50 / 1M tokens
Key managementone 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

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

HTTPTypeWhat to do
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_creditout of credit; add credit and retry
403content_blockedsexual content involving minors — refused, not billed
404not_foundunknown endpoint
413request_too_largerequest body larger than 8 MB
429rate_limited · concurrencyover 300/min or 8 parallel — back off and retry
503upstream_busytemporary overload, retry shortly

Questions and answers

Is this the official OpenRouter API?

No, this is an independent service. We offer a single uncensored model compatible with the OpenRouter base URL structure. We do not serve OpenRouter's aggregated models or routing logic.

How do I pay for the API?

Payments are accepted by crypto (USDT on TRC20, USDC on Base). You can top up any whole amount from $20 to $500. PayPal is not accepted.

Do prompts get used for training?

No, your prompts are not used for training. We only require an email address for your account, and we do not store or use your data for model improvement.

Your key is one form away

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

Get API key