Base URL & Authentication
Connect to the uncensored model using standard OpenAI SDKs. Change your base URL to our hosted endpoint and provide your API key in the authorization header. This approach works for any client that supports the OpenAI API format, allowing you to use uncensored AI models without managing local infrastructure.
Sign up on the Get API key page to receive your credentials immediately. Each account holds one active key; generating a new one invalidates the previous. Authentication is strictly token-based, ensuring transparent billing for every request you send.
The model ID to request is simply uncensored. It is an open-weight model tuned for high compliance, meaning it answers controversial or adult topics without unnecessary refusals, provided the content is lawful. You can verify available models by hitting the GET /v1/models endpoint.
First Request
Send a basic completion request to verify connectivity. The API expects a standard chat format with a system and user message. This is the most direct way to test if the uncensored local LLM responds as expected in your environment.
- Use the POST method on the chat completions endpoint.
- Include your API key in the
Authorizationheader. - Set the model to
uncensored.
If the key is valid and credit exists, you will receive a text response. Errors like 401 indicate an invalid key, while 402 signals insufficient prepaid credit. The trial credit of $0.50 is perfect for this initial check. Claim this credit with one click on your API key page.
Python SDK Integration
Use the official OpenAI Python library to interact with the API. Configure the client to point to our base URL and supply your API key. This method is ideal for backend services or data processing scripts where you need to handle the response object directly in Python.
The code snippet below demonstrates a simple text generation request. It sends a prompt and returns the assistant's content. You can adjust parameters like temperature to control creativity, though the default settings usually work well for general tasks.
Node.js SDK Integration
For JavaScript or TypeScript environments, use the OpenAI Node.js SDK. Point the client to our endpoint to access the uncensored coding LLM capabilities. This is useful for web backends or serverless functions that need to generate text dynamically.
The following example shows how to initialize the client and make a request. Ensure you handle the response asynchronously. The API supports standard JSON responses, making it easy to parse the output in your Node.js application.
Streaming Responses
Enable streaming by setting stream: true in your request. The API returns data via Server-Sent Events (SSE), allowing you to display tokens as they are generated. This improves perceived latency for end-users, especially for longer outputs.
Token usage statistics are included in the final chunk of the stream. This allows you to track costs in real-time. Streaming is supported for all standard parameters, including function calling and JSON mode. Use this mode for chat interfaces where immediate feedback is critical.
Limits & Context Window
Each request can include up to 100,000 tokens in total (prompt plus completion). There is no separate output cap, and if you do not specify max_tokens, the response can run to the end of the window. This context window is sufficient for most coding and document analysis tasks without requiring complex chunking strategies.
Rate limits are set to 300 requests per minute and 8 concurrent requests per key. If you exceed these limits, you will receive a 429 error. Request bodies are capped at 8 MB. These limits ensure stable performance for all prepaid users. Errors and refusals do not consume your token balance, so you can experiment freely.
cURL
curl https://api.uncensoredlocalllm.top/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.uncensoredlocalllm.top/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.uncensoredlocalllm.top/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)