EN ▾
Get your key

Uncensored ai API Quickstart

Integrate our uncensored LLM API with zero friction using standard OpenAI client code. Get a key, set your base URL, and start sending requests immediately.

Installation and Setup

Start by creating an account to receive your API key. Sign up using either a Google account or an email and password combination. The system displays your unique key immediately on screen. No phone number verification is required for this step. You can generate a new key at any time, but only one active key exists per account. A new key replaces the previous one instantly. Keep this key secure as it grants access to your prepaid credits. Use these credentials with any standard OpenAI-compatible SDK to begin integration.

Base Configuration

Point your client to our dedicated base URL for uncensored requests. Use the standard BASE_URL parameter to route traffic correctly. The endpoint structure mirrors OpenAI conventions for easy switching. You must provide your API key in the Authorization header. Set the model ID to uncensored in your configuration object. This ensures the request targets the correct uncensored large language model. Verify your connection by listing available models via the /v1/models endpoint. This confirms your authentication is valid before sending heavy payloads.

Sending Requests

Make a standard POST request to the chat completions endpoint. Your payload must include the model field set to uncensored. Pass your messages in an array under the messages key. The system accepts standard role definitions like user and assistant. Input tokens are charged at a transparent rate of $0.15 per million tokens. Output tokens cost $0.50 per million tokens. Errors do not consume your prepaid credit. This billing model ensures you only pay for actual generated text. Use the following cURL command to send your first message.

Streaming Responses

Enable streaming by setting stream to true in your request. The server returns a Server-Sent Events (SSE) stream. Each chunk contains a portion of the generated text. The final chunk includes the complete token usage statistics. This allows you to display text to users in real-time. Streaming works identically across all supported SDKs. Ensure your client handles partial text buffers correctly. Use this method for long-form content generation or interactive chat interfaces. The following example demonstrates how to handle the stream in Python.

Function Calling

Define tools in your request using the tools parameter. The model returns structured tool calls when appropriate. You can specify tool_choice to force specific behavior. Pass the tool response back to the model for further processing. This supports complex workflows requiring external API interactions. The model handles JSON formatting automatically when needed. Ensure your function definitions match the expected schema. This feature works alongside standard temperature and top-p settings. Use Node.js to implement tool handling efficiently.

JSON Mode and Limits

Request strict JSON output by setting response_format to {"type": "json_object"}. The model guarantees valid JSON structure in the response. This is ideal for parsing data in your application logic. Be aware of the 100,000 token context window limit. This covers both the prompt and the completion combined. The maximum output per request is 16,000 tokens. If you do not specify max_tokens, the limit defaults to 2,048. Requests are limited to 300 per minute per key. Concurrent requests are capped at eight simultaneously. The request body must not exceed 8 MB. Handle errors gracefully as shown in the following stream example.

cURL

curl https://api.modelsuncensoredopenrouter.com/v1/chat/completions \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "uncensored",
    "messages": [{"role": "user", "content": "list three json keys"}]
  }'

Python

from openai import OpenAI

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

What is the best uncensored AI API for OpenRouter compatibility?

Our API is fully OpenAI-compatible, meaning you can use existing OpenAI SDKs with zero code changes. Simply update the base URL and API key. It serves a dedicated uncensored model optimized for unrestricted output. This ensures you get the benefits of standard SDK features like streaming and function calling without vendor lock-in.

How does the uncensored LLM API handle billing and credits?

We use a prepaid credit system charged by real token usage. Errors and refusals are free, so you only pay for successful output. Credits never expire, and you can top up with crypto. There are no monthly fees or subscriptions required to maintain access.

Can I use this uncensored AI API for coding tasks?

Yes, the model handles code generation effectively within its context window. It supports function calling for integrating with external tools. The 100,000 token context allows for large codebases. You can stream responses to see code generated in real-time. This makes it suitable for developers needing unrestricted code assistance.

Get your API key

Sign up, copy the token, update the base URL. That is all you need.

Get your key