Heretic IAUncensored LLM API Documentation
Uncensored LLM API Documentation
Get started with the Heretic Ia API in minutes. This quickstart guide covers authentication, requests, streaming, and limits for the uncensored LLM.
Base URL and Authentication
The API uses a single base URL for all requests. You authenticate using an API key passed in the Authorization header. Create an account via Google or email on the Get API key page to receive your key immediately.
- Base URL:
https://api.hereticia.com/v1 - Auth:
Authorization: Bearer YOUR_API_KEY
No phone number is required for signup, and the key is valid for all endpoints. Use the official OpenAI SDKs by setting the base URL and API key. The key is shown only once, so save it securely.
First Request
Send a standard chat.completions request to generate text from the uncensored model. The endpoint accepts JSON payloads with a messages array and a model field set to uncensored.
This request demonstrates a simple interaction. The model returns text without content refusals for lawful adult use. Check the response for the generated content.
curl https://api.hereticia.com/v1/chat/completions \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "uncensored",
"messages": [{"role": "user", "content": "Calculate the sum of 2048 and 512."}]
}'
Python SDK Integration
Use the official OpenAI Python library to integrate the API into your scripts. Set the base URL to https://api.hereticia.com/v1 and provide your API key. The library handles request formatting automatically.
Install the library via pip. Then initialize the client with the custom base URL. Send a message and print the response. This approach works for most OpenAI-compatible clients.
from openai import OpenAI
client = OpenAI(base_url="https://api.hereticia.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
Integrate with Node.js by installing the OpenAI package. Configure the client with the Heretic Ia base URL and your API key. The SDK simplifies request creation and response parsing.
Initialize the client with the correct base URL. Create a chat completion request with the uncensored model. Handle the response to extract the generated text. This method is efficient for server-side applications.
import OpenAI from "openai";
const client = new OpenAI({ baseURL: "https://api.hereticia.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 streaming by setting stream: true in your request. The API returns a Server-Sent Events (SSE) stream of chunks. Each chunk contains partial text and token usage data in the final chunk.
Streaming reduces perceived latency for long responses. Process each chunk as it arrives. The final chunk includes the total token count for the request. This feature is essential for real-time chat interfaces.
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)
Limits, Errors, and Context Window
The context window supports 100,000 tokens total (prompt plus completion). The maximum output is 16,000 tokens per request. If max_tokens is unset, the limit is 2,048 tokens.
Rate limits allow 300 requests per minute per key. Concurrent requests are capped at 8 per key. The request body size must not exceed 8 MB. Errors include 401 for invalid keys, 402 for insufficient credit, and 429 for rate limits. Errors and refusals consume no credit.
Frequently asked questions
How do I get started with Heretic Ia API?
Sign up on the Get API key page using Google or email. You will receive an API key immediately. Use this key with any OpenAI-compatible SDK by setting the base URL to HTTPS://api.hereticia.com/v1.
What is the context window and output limit?
The context window is 100,000 tokens, including both the prompt and the completion. The maximum output per request is 16,000 tokens, or 2,048 tokens if max_tokens is not specified.
How does streaming work and where is token usage reported?
Set stream: true to receive a Server-Sent Events stream. Each chunk contains partial text. Token usage details are provided in the final chunk of the stream.
Generate your API key
Register an account, retrieve the key, and update your base URL. That’s the entire configuration.