API Quickstart & Integration
Integrate the Heretic Project uncensored LLM API in minutes using our standard OpenAI-compatible endpoint. Send text, receive unrestricted output, and scale your application without proxy overhead.
Base URL and Authentication
The Heretic Project provides a single, hosted endpoint for text generation. Use https://api.hereticproject.com/v1 as your base URL. Authentication relies on a bearer token passed via the Authorization header. Create your key by signing in with Google or email on the dashboard. The system issues one active key per account; generating a new key invalidates the previous one immediately.
You pay only for tokens consumed. Errors and refusals do not charge your prepaid credit. A new account receives $0.50 in trial credit valid for seven days. You top up using USDT (TRC20) or USDC (Base) in amounts between $20 and $500.
The /v1/chat/completions Endpoint
Send messages to the standard chat completions endpoint. The model ID is uncensored. It accepts a list of message objects with roles like system, user, or assistant. The model does not refuse lawful adult, fictional, or controversial topics. It is an open-weight model tuned for direct answers.
Requests return a JSON object containing the generated text. The context window supports 100,000 tokens combined for prompt and completion. Output is limited to 16,000 tokens per request unless you specify a lower max_tokens value.
curl https://api.hereticproject.com/v1/chat/completions \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "uncensored",
"messages": [{"role": "user", "content": "list dependencies for node project"}]
}'
Python SDK Integration
Use the official OpenAI Python library with a custom base URL. Set api_key to your API string. Configure base_url to point to the Heretic Project server. This allows you to use familiar methods like chat.completions.create() without modifying your existing code structure significantly.
Install the library via pip. Pass your credentials directly to the client initialization. The library handles serialization automatically. This approach works for both synchronous and asynchronous workflows. Ensure you handle potential network errors gracefully.
from openai import OpenAI
client = OpenAI(base_url="https://api.hereticproject.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
The Node.js SDK works identically to the Python version. Initialize the client with your API key and the correct base URL. You can send completion requests using the same method signatures. This ensures consistency across different parts of your stack.
Handle responses asynchronously. The SDK streams data if you use the streaming method. Otherwise, it returns the full JSON response. This flexibility supports both batch processing and real-time interfaces. Keep your API key secure in environment variables.
import OpenAI from "openai";
const client = new OpenAI({ baseURL: "https://api.hereticproject.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 (SSE)
Enable streaming by setting stream: true in your request. The server sends Server-Sent Events (SSE). Each chunk contains partial text updates. This reduces perceived latency for end-users. Token usage data appears in the final chunk of the stream.
Process each delta object to accumulate the full response. Stop listening when the stream closes or an error occurs. This method is ideal for chat interfaces. It allows users to see thoughts forming in real-time. The overhead is minimal compared to full responses.
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
Respect the rate limits to avoid service interruptions. You are allowed 300 requests per minute per key. Concurrency is limited to 8 simultaneous requests. The request body cannot exceed 8 MB. Exceeding these limits returns a 429 status code. Wait briefly before retrying.
Authentication failures return a 401 error. This happens if the key is invalid or expired. A 402 error indicates insufficient prepaid credit. Refund mistakes are handled via the Support page. Credit never expires. The model refuses content involving minors. All other lawful content is accepted.
Common questions
Is the Heretic Project an official OpenAI service?
No, it is an independent service. We use the standard OpenAI chat-completions protocol. The model is not GPT-4 or any other vendor's model. Check their documentation for their specific limits.
Which payment methods do you accept?
Crypto only: USDT on TRC20 or USDC on Base, any whole amount from $20 to $500. Bonus credit applies from $50.
What is the context window size?
The model supports 100,000 tokens total. This includes both the prompt and the completion. You can generate up to 16,000 tokens in a single response.
Get your API key
Sign up, copy your key, update the base URL. That is all you need to do.