API Reference
Get started with the uncensored AI API in minutes. Use standard OpenAI-compatible clients to send text and receive unrestricted responses immediately.
Base URL and Authentication
Use the dedicated base URL for all requests. Your API key authenticates via the Authorization header.
- Base URL:
https://api.hereticuncensored.com/v1 - Model ID:
uncensored
Retrieve your key from the dashboard. It is valid immediately upon creation.
curl https://api.hereticuncensored.com/v1/chat/completions \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "uncensored",
"messages": [{"role": "user", "content": "List the top five features of the new release."}]
}'
First Request
Send a simple chat completion to verify connectivity. The model responds without standard content filters for lawful adult use.
- Set
modeltouncensored. - Include your
messagesarray.
Check the response for choices containing your generated text.
from openai import OpenAI
client = OpenAI(base_url="https://api.hereticuncensored.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 SDK Integration
Initialize the client with your base URL and key. This ensures compatibility with standard OpenAI libraries.
- Install the official
openaipackage. - Pass
baseURLandapiKeyduring initialization.
Call chat.completions.create() with your prompt. The response structure mirrors the standard API format.
import OpenAI from "openai";
const client = new OpenAI({ baseURL: "https://api.hereticuncensored.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 Responses
Enable real-time token delivery by setting stream to true. This reduces perceived latency for long outputs.
- Listen for
deltachunks. - Combine deltas to reconstruct the full response.
Token usage metadata appears in the final chunk. This is ideal for chat interfaces requiring instant feedback.
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)
Rate Limits and Context
The API supports a 100,000-token context window. You can send up to 300 requests per minute per key.
- Max concurrent requests: 8
- Max output tokens: 16,000 (2,048 default)
Exceeding limits triggers a 429 error. Manage concurrency to maintain consistent throughput for high-volume workloads.
Error Handling and Codes
Handle errors gracefully to maintain application stability. Common codes include 401 for invalid keys and 402 for insufficient credit.
- 429 indicates rate limit exhaustion.
- 400 signals malformed request bodies.
Refunds are not issued for consumed tokens. Check your balance regularly to avoid service interruptions.
Common inquiries
Is the uncensored AI API compatible with OpenAI SDKs?
Yes, it follows the OpenAI chat-completions format. You only need to change the base URL and API key in your client configuration.
What happens if I run out of credit?
Requests return a 402 error. Top up with crypto to restore service. Credits never expire, so you can add funds at any time.
Does the uncensored LLM API support streaming?
Yes, set the stream parameter to true. You will receive token-by-token updates via Server-Sent Events (SSE).
Secure your API key
Register, retrieve the token, and update your base URL. Complete integration in seconds.