Uncensored API Chat Completions Documentation
Drop our uncensored API key into your existing stack and get raw, unfiltered text responses instantly.
Authentication And Base URL
Start by pasting your key into the Authorization header. We use a standard Bearer token scheme that works with any OpenAI-compatible client. Sign in via Google or email to get your key immediately. No phone number is required for the account setup.
The base URL is HTTPS://api.chataiunfiltered.com/v1. Your requests must point here. The model ID to use is uncensored. This ensures you get the specific uncensored model we host on our own servers.
curl https://api.chataiunfiltered.com/v1/chat/completions \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "uncensored",
"messages": [{"role": "user", "content": "What is the capital of France?"}]
}'
The Chat Completions Endpoint
Send a POST request to /v1/chat/completions with your prompt. The API returns text directly without extra fluff. You can set parameters like temperature or top_p to control randomness.
Use the Python SDK to integrate quickly. Just set the base URL to our endpoint. The client handles the JSON serialization for you. Errors like invalid keys return 401 status codes. Run out of credit triggers a 402 error.
from openai import OpenAI
client = OpenAI(base_url="https://api.chataiunfiltered.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)
Streaming Responses With SSE
Stream tokens to your users for a smoother experience. Set the stream parameter to true in your request. The API returns Server-Sent Events (SSE) as the response arrives. This reduces perceived latency for long outputs.
Use the Node SDK to handle the stream efficiently. Parse the chunks as they arrive. The final chunk includes the total token usage stats. This helps you track costs accurately in real-time. Keep your connection open until the stream closes.
import OpenAI from "openai";
const client = new OpenAI({ baseURL: "https://api.chataiunfiltered.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);
Tool Use And Function Calling
Define tools in your request to let the model call functions. The API supports standard tool definitions with parameters. Pass the function name and arguments in the response. You execute the function on your side.
Send the results back to the model in a new message. This allows for multi-turn interactions with external data. The model handles the logic for when to call tools. Use tool_choice to force or allow automatic selection. This works seamlessly with our uncensored model.
Response Format And JSON Mode
Force structured output by setting response_format to {"type": "json_object"}. The model will return valid JSON instead of plain text. This is useful for parsing data into your application. Ensure your prompt clearly describes the expected schema.
The API does not validate your JSON schema strictly. It relies on the model to produce correct syntax. If the output is malformed, you might need to retry. Use this for reliable data extraction tasks. Combine this with streaming for fast parsing.
Token Limits And Context Window
The context window supports up to 100,000 tokens total. This includes both the input prompt and the output completion. You can generate up to 16,000 tokens per request. The default max output is 2,048 tokens if not specified.
Rate limits allow 300 requests per minute per key. You can have 8 concurrent requests at once. The maximum request body size is 8 MB. Errors and refusals do not consume your prepaid credit. This makes testing safe and cost-effective.
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
How do I debug missing citations in parallel chat API responses?
The API returns raw text without automatic citation formatting. You must define your own structure in the prompt or use JSON mode for structured data. The model does not insert citations unless you explicitly ask for them in the system instructions.
Is the uncensored AI chat model trained on user data?
No, your prompts are not used for training. We retain no training data from your requests. Your conversations are private and not used to improve the model weights. This ensures your data stays within your control.
What happens if I hit the rate limit?
You receive a 429 Too Many Requests error. The limit is 300 requests per minute per API key. You can run 8 requests concurrently. Wait for the window to reset or upgrade your plan if needed. Errors do not count against your token usage.
Get your API key now
Sign up, copy the key, and point to our endpoint. It’s that simple.