EN ▾
Create key

Integration guide for the uncensored llm api

Get your first response from the uncensored LLM in under a minute. This guide covers the OpenAI compatible API endpoints, authentication, and streaming for rapid integration.

Base URL and Authentication

Connect to the uncensored API using the standard OpenAI base URL structure. The base URL is HTTPS://api.aimodelwithnorestrictions.com/v1. You need an API key for every request. Generate one via the dashboard using Google or email. Pass it in the Authorization header as Bearer YOUR_API_KEY. The key identifies your prepaid credit. Errors and refusals do not consume tokens. The context window supports 100,000 tokens total. Input and output tokens share this limit. Max output is 16,000 tokens unless specified.

Quickstart: Your First Request

Send a simple text prompt to receive raw, unfiltered output. Use the chat completions endpoint with the model ID "uncensored". The request body requires a messages array. System prompts help set the behavior. User messages contain your actual query. The API returns a text response immediately. This works for NSFW topics without corporate filters. You can stream the output or receive it all at once. The uncensored model handles diverse creative tasks well. Check the rate limits if you send many requests. The limit is 300 requests per minute per key.

curl https://api.aimodelwithnorestrictions.com/v1/chat/completions \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "uncensored",
    "messages": [{"role": "user", "content": "Check if port 8080 is open"}]
  }'

Python SDK Integration

Use the official OpenAI Python library for easy integration. Set the base URL and API key in the client initialization. The code snippet below demonstrates a basic completion call. The model ID remains "uncensored" for all requests. You can adjust parameters like temperature and top_p. These settings control the randomness of the output. The library handles the HTTP requests automatically. You can iterate over the response for debugging. Error handling is essential for production systems. Catch exceptions to manage rate limits or credit issues.

from openai import OpenAI

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

Integrate the uncensored model into your Node.js applications efficiently. Install the OpenAI npm package and configure the base URL. Pass your API key to the client instance. Call the chat.completions.create method with your prompt. The response object contains the generated text. You can access the usage statistics for billing. Streaming is supported via async iterators. This allows real-time processing of long outputs. The uncensored API works seamlessly with standard Node.js tools. Ensure your environment supports modern JavaScript features.

import OpenAI from "openai";

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

Receive tokens in real-time using Server-Sent Events. Set the stream parameter to true in your request. The API sends multiple chunks of data. Each chunk contains a partial completion. Parse the SSE data to reconstruct the full text. This reduces perceived latency for users. The final chunk includes the token usage details. You can stop streaming at any time. The uncensored model handles long contexts without breaking. Monitor the stream for network errors. Reconnect logic is recommended for unstable connections.

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

Monitor your token usage to avoid running out of credit. Errors like 401 indicate an invalid key. 402 errors mean your prepaid credit is exhausted. 429 errors signal that you exceeded the rate limit. You get 300 requests per minute. Burst limits allow 8 simultaneous requests. The request body must be under 8 MB. The context window is 100,000 tokens. Output is capped at 16,000 tokens per request. Refusals are free and do not count against your balance. Credit never expires. Upgrade your plan by adding more crypto credit. Bonus credits apply for larger top-ups. Use the support page for billing issues.

Common questions

What is the best uncensored model with no restrictions for API use?

Our dedicated uncensored model is optimized for raw output without corporate filters. It handles NSFW and creative tasks effectively. The model is open-weight and tuned for unrestricted responses.

How does the prepaid credit system work for the uncensored API?

You pay with crypto for USDT or USDC. Credit is charged per token used. Errors and refusals are free. Credit never expires. You can add bonus credit for larger top-ups.

Can I use the uncensored model for function calling and JSON mode?

Yes, the API supports function calling and JSON mode. You can specify the response format as json_object. Tools and tool_choice parameters are available. This allows structured data extraction from the model.

Key generation takes seconds

Register, copy your key, update the endpoint. You are live.

Create key