Quickstart: First request
Send a completion request to the single uncensored endpoint. The API accepts standard chat-completions JSON payloads and returns text responses without content refusals for lawful adult use.
Use the base URL provided in your dashboard. Include your API key in the authorization header. Set the model ID to uncensored. This ensures you hit the correct server running the open-weight model tuned for unrestricted output.
Start with a simple prompt to verify connectivity. The system returns token usage and the generated text in the response body.
Authentication and keys
Authenticate every request with a Bearer token in the Authorization header. Your API key is generated immediately upon signup via Google or email.
Keep your key secure. Only one active key exists per account; generating a new one revokes the previous key. The key grants full access to your prepaid credit balance.
If the key is invalid or expired, the API returns a 401 error.
Chat Completions endpoint
Interact with the model using the standard POST /v1/chat/completions endpoint. This endpoint handles all text generation tasks.
Send your message history in the messages array. The API processes the input and returns the model's response. You can include system prompts to guide behavior.
The endpoint supports JSON mode and function calling. Use these features to integrate the API into your applications seamlessly.
Ensure your payload stays within the 8 MB request body limit.
Streaming and SSE
Enable real-time token generation by setting stream: true in your request. The API returns a Server-Sent Events stream.
Each chunk contains partial text updates. The final chunk includes the complete token usage statistics.
This approach reduces perceived latency for end-users. It allows your application to display text as it is generated.
Handle stream interruptions gracefully. The API guarantees delivery of all tokens if the connection remains stable.
Parameters and options
Control generation behavior with standard parameters. Adjust temperature for creativity or determinism. Use top_p for nucleus sampling.
Set max_tokens to limit output length. The default is 2,048 tokens. The maximum allowed is 16,000 tokens per request.
Use stop sequences to halt generation at specific markers. The seed parameter ensures reproducible results for debugging.
These options work consistently across all clients.
Error handling and limits
Monitor your request rate and credit balance. The API enforces a limit of 300 requests per minute per key.
A 429 error indicates you have exceeded the rate limit. A 402 error means your prepaid credit is exhausted.
The context window supports 100,000 tokens total. This includes both the prompt and the completion.
Errors during processing do not consume credit. Only successful token generation is billed.
cURL
curl https://api.mostuncensoredllm.com/v1/chat/completions \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "uncensored",
"messages": [{"role": "user", "content": "Generate a list of ten distinct Linux shell commands for system monitoring."}]
}'Python
from openai import OpenAI
client = OpenAI(base_url="https://api.mostuncensoredllm.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.mostuncensoredllm.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)