Create key

API Reference

Get started with our uncensored AI API in minutes. The documentation below provides the exact endpoints, parameters, and code samples you need to integrate.

Authentication and Base URL

Start by replacing the base URL and API key in your client configuration. Our service uses a single base URL for all requests, which ensures compatibility with existing OpenAI SDKs. You do not need to manage multiple endpoints for different features. Generate your key via the dashboard using Google or email. Keep this key secure, as it grants direct access to your prepaid credit.

The API key is sent in the Authorization header. If you lose your key, generate a new one in the dashboard, which replaces the old active key. There is no phone number required for account recovery, maintaining our privacy-first approach. Use the base URL below for all subsequent requests.

Base URL: https://api.norestrictedai.com/v1

POST /v1/chat/completions

Send your prompt to the POST /v1/chat/completions endpoint to receive a text response. This is the only endpoint you need for generating text. The model ID is uncensored. It is an open-weight model tuned to answer without content refusals for lawful adult use. It is not GPT or Claude. You can stream responses or request them in JSON mode. The system supports function calling and standard parameters like temperature and top_p.

Requests are processed as text-in, text-out. There are no embeddings or image generation capabilities. If you need those, look elsewhere. Our focus is purely on direct text generation with transparent token pricing. Errors and refusals (except for the hard minor content limit) do not consume your credit.

Python SDK Integration

Use the official OpenAI Python library to interact with our API. Set the base URL and API key in your client instance. This approach allows you to keep your existing code structure while switching providers. The library handles the JSON serialization and HTTP requests automatically. You can use the same model name as you would for other services, but remember our model ID is uncensored.

This method is ideal for backend services and scripts. The library supports both synchronous and asynchronous operations. You can adjust the temperature and top_p values to control creativity. The response object contains the generated text and token usage statistics.

Node SDK Integration

Integrate our API into your Node.js applications using the standard OpenAI SDK. Configure the client with your base URL and API key. This setup works seamlessly with Express routes or serverless functions. The SDK manages the request lifecycle, including retries and error handling. You can pass messages as an array of role and content objects.

This integration is perfect for web applications and microservices. The response object includes the generated content and usage data. You can enable streaming to send tokens to the client as they are generated. This reduces perceived latency for end-users. The SDK supports all standard parameters defined in the API specification.

Streaming Responses (SSE)

Enable streaming by setting the stream parameter to true. The API returns a Server-Sent Events (SSE) stream. Each chunk contains a partial response. The final chunk includes the total token usage. This feature reduces time-to-first-token significantly. It is essential for chat interfaces and real-time applications.

The stream continues until the model completes the response or an error occurs. You can cancel the stream at any time. The server stops processing the request when the client disconnects. This saves compute resources. Use the streaming mode to provide a smooth user experience. The token usage in the last chunk allows you to track costs accurately.

Rate Limits and Errors

Our API enforces strict rate limits to ensure stability. You are allowed 300 requests per minute per key. You can have 8 concurrent requests at the same time. The maximum request body size is 8 MB. If you exceed these limits, you receive a 429 error. Errors like invalid keys return 401. Insufficient credit returns 402. These errors do not consume your credit.

The context window is 100,000 tokens for prompt and completion together. The max output is 16,000 tokens per request. If you do not set max_tokens, the limit is 2,048. Credit is prepaid and never expires. Errors are free. If you double-charge, contact support. The system does not log prompts for training. Privacy is maintained. Use the code blocks below to implement these features.

cURL

curl https://api.norestrictedai.com/v1/chat/completions \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "uncensored",
    "messages": [{"role": "user", "content": "Set database index to primary key"}]
  }'

Python

from openai import OpenAI

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

Common questions

What is the no restricted AI model?

It is an open-weight large language model hosted on our servers. It is tuned to answer without content refusals for lawful adult use. It is not GPT, Claude, or any other vendor's model.

How does the uncensored AI pricing work?

You pay $0.15 per 1M input tokens and $0.50 per 1M output tokens. Credit is prepaid and never expires. Errors and refusals do not consume your balance. There are no monthly subscription fees.

Can I use the NSFW API for commercial projects?

Yes, you can use the API for lawful adult use in commercial projects. The model does not refuse controversial or adult topics. The only hard limit is sexual content involving minors. Credit is topped up with crypto only.

Access your key instantly

Register, copy the token, point your client to the new base URL. Done.

Create key