API Documentation
Use our OpenAI-compatible endpoint to generate text with the uncensored model. Start with a simple request or enable streaming for real-time token output.
Base URL and Authentication
Send requests to https://api.uncensoredaicharacter.com/v1 with your API key in the Authorization header. The key is issued immediately upon signup via Google or email. Use the model ID uncensored for all completions.
curl https://api.uncensoredaicharacter.com/v1/chat/completions \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "uncensored",
"messages": [{"role": "user", "content": "What is the current server uptime status"}]
}'Each account holds one active key. If you rotate the key, the old one stops working instantly. Limits apply per key to keep the service fair. Request bodies must stay under 8 MB. This ensures consistent performance for your application.
First Request: Python SDK
Initialize the client with your key and point it to our base URL. Pass the model name and user messages to get a text response. This works with standard OpenAI-compatible libraries. The response includes token usage and content.
from openai import OpenAI
client = OpenAI(base_url="https://api.uncensoredaicharacter.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)You can adjust parameters like temperature to control randomness. The API returns JSON or text depending on your settings. Errors return standard HTTP status codes. Check the status code to handle issues gracefully.
First Request: Node SDK
Configure the Node client to use our endpoint. Set the apiKey and baseURL properties correctly. Call chat.completions.create() with the model ID. The library handles serialization and retries automatically.
import OpenAI from "openai";
const client = new OpenAI({ baseURL: "https://api.uncensoredaicharacter.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);Stream responses are supported via async iterators. This allows you to display tokens as they generate. The context window supports up to 100,000 tokens total. Use this for long documents or extended conversations.
Streaming Responses
Enable streaming by setting stream: true in your request. The API returns a Server-Sent Events (SSE) stream. Each chunk contains partial text and token usage data. The final chunk includes the complete usage statistics.
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)Streaming reduces perceived latency for end-users. You can process tokens in real-time without waiting for the full response. Buffering is handled by the client library. Monitor token counts to stay within your prepaid credit.
Error Handling and Limits
Handle errors by checking the HTTP status code. A 401 error means your API key is invalid or missing. A 402 error indicates insufficient prepaid credit. A 429 error signals you have hit the rate limit of 300 requests per minute. Refunds are not available for used credit.
The context window allows 100,000 tokens for input and output combined. Max output is 16,000 tokens per request. Set max_tokens to control output length. Errors do not consume credit if detected before processing. This protects your balance from accidental loops.
Configuration and Constraints
Set parameters like top_p, seed, and stop sequences to shape the output. Use response_format for JSON mode. Function calling is supported via tools. All parameters follow the standard OpenAI schema. This makes migration easy for existing projects.
Requests are limited to 8 concurrent connections per key. The body size limit is 8 MB. These constraints ensure stable performance. The uncensored model handles diverse topics without refusal. Adjust settings to fit your use case perfectly.
FAQ
How do I get started with the uncensored AI character API?
Sign up with Google or email to receive an API key instantly. Add prepaid credit via crypto to start sending requests. The base URL is HTTPS://api.uncensoredaicharacter.com/v1.
What happens if I hit a rate limit or error?
You will receive a 429 status code for rate limits or 401/402 for auth/credit issues. Errors do not consume credit if they occur before processing. Adjust your request frequency or top up your balance.
Can I use this with existing OpenAI SDKs?
Yes, the API is fully OpenAI-compatible. Just update the base URL and API key in your client configuration. It supports streaming, JSON mode, and function calling.
Get your key now
Sign up, grab the key, update the base URL. That’s it.