Integrate uncensored ai into your App
Drop our uncensored LLM API into your stack with a single base URL and an API key. Get text back instantly, stream it, or call tools without fighting hidden filters.
Authentication and Base URL
The endpoint lives at https://api.aitextuncensored.com/v1. Pass your key in the Authorization header as a bearer token. You get one active key per account; generating a new one revokes the old. No phone number is required, and you can sign in with Google or email plus password. The key appears immediately on the Get API key page so you can start coding right away.
This setup works with any OpenAI-compatible client. You only change the base URL and supply your token. Prompts stay private and are not used for training. If you lose access, credit never expires, so you can recover without losing your prepaid balance.
curl https://api.aitextuncensored.com/v1/chat/completions \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "uncensored",
"messages": [{"role": "user", "content": "return the number of planets in the solar system"}]
}'
Sending your first chat completion
Make a POST request to /v1/chat/completions with a model value of uncensored. Send a messages array containing your role and content. The model responds with text in a message field. You get a full context window of 100,000 tokens for prompt plus completion together. If you do not set max_tokens, the output caps at 2,048 tokens.
This is a text-in, text-out service. There are no embeddings, no image generation, and no audio. It is an open-weight model tuned for lawful adult use, meaning it answers controversial topics without standard refusals. Keep your system prompt concise to preserve room for the conversation history.
from openai import OpenAI
client = OpenAI(base_url="https://api.aitextuncensored.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 Server-Sent Events
Add "stream": true to your request to receive Server-Sent Events. Each chunk contains partial text as the model generates tokens. The final chunk includes the full token usage counts for the request. This pattern reduces perceived latency for long-form roleplay or erotica generation. You can process tokens in real time without waiting for the entire response.
Streaming does not change the context window limits. You still share the 100,000-token budget across all messages. If a connection drops, you must restart the request. The API does not support resumable streams, so handle reconnection logic in your client code to ensure a smooth user experience.
import OpenAI from "openai";
const client = new OpenAI({ baseURL: "https://api.aitextuncensored.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);
Function calling and JSON mode
Use the tools parameter to define function schemas. The model can return structured calls that your code executes. Alternatively, set response_format to {"type": "json_object"} for strict JSON output. Both features work with the uncensored model for consistent data extraction. You can control tool selection with tool_choice to force specific functions.
JSON mode does not guarantee valid JSON if the model hallucinates syntax. Always validate the output before parsing. Function calling requires you to manage the conversation loop manually. Pass the tool results back as messages to continue the interaction. This gives you full control over how the model interacts with your backend services.
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)
Parameters: Temperature, Top-P, and Seed
Adjust temperature to control randomness. Lower values make outputs more deterministic, while higher values increase creativity. Use top_p to limit the nucleus sampling to the most probable tokens. Set seed for reproducible results across identical requests. These parameters allow fine-tuning for specific roleplay styles or technical writing tasks.
Combining low temperature with a specific seed ensures consistent character voices. High temperature with top_p 0.9 encourages diverse vocabulary for creative writing. The model supports stop sequences to halt generation at specific markers. You can also adjust presence_penalty and frequency_penalty to encourage topic diversity. Experiment with these values to find the right balance for your use case.
Understanding rate limits and quotas
You are allowed 300 requests per minute per key and 8 concurrent requests. The request body must not exceed 8 MB. If you exceed these limits, you receive a 429 error. You can retry after the window resets. Credit is charged only for successful token usage, so errors do not cost you money. Refusals due to content policies are also free.
A 401 error means your key is invalid or revoked. A 402 error indicates insufficient credit. You can top up with USDT on TRC20 or USDC on Base. Minimum top-up is $20, and bonuses apply at higher tiers. Credit never expires, so you can top up whenever needed without losing your balance. Start with the $0.50 trial to test the API before committing.
Common queries
What is the uncensored AI API rate limit?
You get 300 requests per minute and 8 concurrent requests per key. The request body is limited to 8 MB. Exceeding these limits returns a 429 error until the window resets.
How does the uncensored LLM API handle tokens?
The context window is 100,000 tokens for prompt and completion combined. The maximum output per request is 16,000 tokens, or 2,048 if you do not set <code>max_tokens</code>. You pay per 1M input and output tokens used.
Is the uncensored AI model compatible with OpenAI SDKs?
Yes, it is an OpenAI-compatible endpoint. You just change the base URL to <code>https://api.aitextuncensored.com/v1</code> and use your API key. The model ID is <code>uncensored</code> for all requests.
Uncensored API for lawful adult use
- per 1M input tokens
- $0.15
- Output tokens / 1M
- $0.50
- token context
- 100,000
- trial credit
- $0.50
- requests per minute
- 300
Unlock your API key
Register, copy the key, update your endpoint URL. That is all.