Quickstart: Use Heretic LLM API
Get your uncensored LLM API key and start sending requests in minutes. This quickstart covers authentication, code samples, and the exact limits of our hosted service.
Base URL and Authentication
The Heretic LLM API follows the standard OpenAI chat-completions structure. To begin, you need a valid API key from your dashboard. You will send requests to the base URL https://api.hereticllm.top/v1 using the model ID uncensored.
Authentication is handled via the Authorization header. Include your key as a Bearer token. This setup ensures compatibility with any standard OpenAI SDK or HTTP client you prefer for your project.
Your First Request
Send a basic chat request to test connectivity and response quality. The model will return a text completion based on your prompt. Ensure you are using the correct endpoint and model ID in your client configuration.
curl https://api.hereticllm.top/v1/chat/completions \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "uncensored",
"messages": [{"role": "user", "content": "Write a blunt product review of a cheap VPN."}]
}'Check the response body for the generated text and token usage statistics.
Python Integration
Use the official openai Python package to interact with the API. Configure the client with your base URL and API key. The uncensored coding llm model handles code generation and general reasoning effectively.
from openai import OpenAI
client = OpenAI(base_url="https://api.hereticllm.top/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)This approach allows you to integrate the API directly into your Python applications or scripts with minimal boilerplate.
Node.js Integration
For JavaScript developers, the Node SDK provides a straightforward interface. Set the base URL to our hosted endpoint and provide your API key. This works well for server-side applications or edge functions.
import OpenAI from "openai";
const client = new OpenAI({ baseURL: "https://api.hereticllm.top/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);Handle the response data to extract the assistant's message content for further processing or display.
Streaming and JSON Mode
For real-time responses, enable streaming. This sends tokens as they are generated, improving perceived latency for users. You can also force JSON output using the response_format parameter for structured data extraction.
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 is particularly useful for chat interfaces where you want to display text as it is being written.
Rate Limits and Errors
Your API key is limited to 300 requests per minute and 8 concurrent requests. If you exceed these limits, you will receive a 429 error. Authentication failures return a 401, and insufficient credit returns a 402.
The context window supports up to 100,000 tokens total, with no separate output cap. Ensure your prompts fit within this window to avoid truncation or errors.
Technical reference
A quick checklist for developers: format, limits, features, billing.
| Feature | Support |
|---|---|
| Protocol | OpenAI-compatible: any OpenAI SDK or client works — change the base URL and the key |
| Authentication | Authorization: Bearer YOUR_KEY |
| Endpoints | POST /v1/chat/completions · GET /v1/models |
| Model ID | uncensored |
| Base URL | https://api.hereticllm.top/v1 |
| Streaming | Supported (stream: true), usage included at the end |
| Context window | 100,000 tokens (prompt + completion together) |
| Completion length | prompt + completion fit within 100,000 tokens; max_tokens optional, no separate output cap |
| Structured output | JSON object mode via response_format json_object |
| Tools / tool calls | Supported: tools + tool_choice, tool_calls in the reply (streamed too), tool results as role: tool messages |
| Sampling parameters | temperature, top_p, stop, seed, presence_penalty, frequency_penalty |
| Concurrency | up to 8 in parallel per key |
| Requests per minute | 300 requests per minute per key |
| Headers | X-Request-Id, X-Balance-USD, X-RateLimit-Limit-Requests, X-RateLimit-Limit-Concurrency |
| Max body | up to 8 MB per request |
| Payment | USDT (TRC20) or USDC (Base), any whole amount from $20 to $500 |
| Price | input $0.15 / 1M tokens, output $0.50 / 1M tokens |
| Billing | prepaid credit, charged by real token usage; errors and refusals are free |
| Trial credit | $0.50 of credit valid 7 days, no card needed · Trial key: 2 parallel requests, 60 req/min; full limits (8 and 300) after first top-up |
| Volume bonus | +5% from $50, +10% from $100, +15% from $200 |
| Credit expiry | paid credit never expires, no subscription |
| Keys | one active key per account; a new key replaces the old one |
| Account | Google or e-mail and password |
| Content | uncensored for adults; the only hard rule: no sexual content involving minors |
When a request fails
Errors come back as JSON with a stable type; failed and refused requests are not billed.
| Status | Type | Reason |
|---|---|---|
400 | bad_request | invalid JSON, empty messages, bad parameter, or a prompt longer than the window — fix and resend |
401 | missing_key · invalid_key · key_revoked | no key, wrong key, or a key replaced by a newer one |
402 | no_credit | balance is empty — top up, requests resume at once |
403 | content_blocked | sexual content involving minors — refused, not billed |
404 | not_found | only /v1/chat/completions and /v1/models exist |
413 | request_too_large | body over 8 MB |
429 | rate_limited · concurrency | slow down: rate or parallel limit reached |
503 | upstream_busy | temporary overload, retry shortly |
Questions and answers
Does the uncensored llm support function calling?
Yes, the API supports function calling with tools and tool_choice parameters. You can define custom functions and the model will return structured arguments when appropriate.
What happens if I exceed the 8 concurrent request limit?
Requests beyond the 8 concurrent limit will be rejected or queued depending on your client implementation. You will typically see a 429 rate limit error if you send too many simultaneous requests.
Is the uncensored model free to use?
No, it is a pay-per-token service. New accounts receive $0.50 in trial credit, but standard usage requires prepaid credit. Errors and refusals do not consume your credits.
Your key is one form away
Create an account, copy the key, change the base URL. That is the whole setup.