OpenRouter Heretic: Complete Integration Walkthrough
Integrate the heretic LLM model into your applications with this direct walkthrough. You get a single uncensored endpoint, a 100k context window, and transparent prepaid billing without subscription complexity.
Last updated
Summary
- Use the standard OpenAI-compatible endpoint at HTTPS://api.llmheretic.com/v1 for drop-in integration.
- The model ID is 'uncensored' and supports streaming, tools, and JSON mode natively.
- Billing is strictly prepaid via crypto, with no expiration on your credits.
- Context limits allow 100,000 tokens total, with a 16,000 token max output.
Why Choose OpenRouter Heretic?
It provides a single, powerful uncensored model without multi-model routing complexity. Developers often struggle with fragmented API ecosystems that charge different rates for different models. This setup offers a unified endpoint for raw text generation. You get consistent behavior across all requests. The model is tuned for lawful adult content and controversial topics without unnecessary refusals. It is not GPT, Claude, or Gemini. It is an open-weight model running on dedicated servers. This means predictable latency and clear pricing. You pay only for tokens used. Errors do not cost you credits. The prepaid model ensures you never lose access mid-project. No monthly fees tie you down. You keep your credits forever. This simplicity saves engineering time. You focus on building features. Not on managing provider quirks. The 100k context window handles large documents efficiently. RAG systems benefit greatly from this capacity. Epstein file indexing or legal document analysis works well. The model understands nuance. It does not sanitize answers for puritanical reasons. It gives you the data you need. Directly. No middleman markup. Just text in, text out. Reliable. Fast. Uncensored.
Prerequisites: Account Setup
You need an email address and a crypto wallet for top-ups. Signup is instant via Google or email. No phone number verification blocks your progress. You receive an API key immediately. The key is active for 300 requests per minute. You can run 8 concurrent requests. The request body limit is 8 MB. This handles most standard LLM tasks. You get $0.50 trial credit for seven days. This lets you test the endpoint. Use it to verify streaming. Check tool calling. Validate JSON mode. Once you are satisfied, you top up with crypto. USDT on TRC20 or USDC on Base are accepted. Minimum top-up is $20. Maximum is $500. You get bonus credits at higher tiers. $50 gets 5% bonus. $100 gets 10%. $200 gets 15%. Credits never expire. You can pause usage for months. Then resume. Your balance stays intact. No hidden fees appear. Refunds are not issued for standard usage. Mistakes are handled via support. Privacy is straightforward. Prompts are not used for training. Your data stays yours. This setup suits builders who want control. No vendor lock-in. Just a clean API.
Step 1: Generate Your API Key
Visit the dashboard and click 'Get API Key'. The interface is minimal. You enter your email or use Google sign-in. The system generates a unique key. It looks like a long string of characters. Copy it immediately. Store it in your environment variables. Do not commit it to public repositories. The key is tied to your account. You can only have one active key. If you generate a new one, the old one stops working. This simplifies security. You do not manage multiple keys. Rotate them when needed. The key grants access to the chat-completions endpoint. It also allows reading model metadata. You cannot use it for embeddings. Or image generation. The scope is clear. Text in, text out. The key authenticates your requests. The server checks your balance. It deducts tokens used. Errors are free. If the server returns a 500 error, you do not lose credits. This protects your budget. You can generate keys for different environments. Dev and Prod use separate keys. This prevents accidental spending. The interface shows your current balance. It updates in real time. You can see token usage. It helps you forecast costs. The system is transparent. No surprises. Just accurate billing. Trust is built through clarity.
Step 2: Configure Your Client
Point your SDK to the base URL: HTTPS://api.llmheretic.com/v1. This URL is compatible with official OpenAI libraries. You change the base URL in your configuration. Then set the API key header. The model ID is 'uncensored'. This is the only model available. You do not select between GPT-4 or Llama. You use this one. It is tuned for uncensored output. Configure your temperature. Set top_p. Define stop sequences. These parameters control creativity. Low temperature makes outputs deterministic. High temperature adds randomness. Adjust based on your use case. For code generation, use low values. For creative writing, raise them. The streaming option is available. Set stream to true for real-time token delivery. This improves user experience. Users see text as it generates. It reduces perceived latency. The JSON mode is useful for structured data. Set response_format to json_object. The model returns valid JSON. This integrates well with frontend apps. Tools and function calling are supported. Define your function schema. The model calls functions correctly. This enables agentic workflows. You can build complex systems. The configuration is standard. No proprietary quirks. You reuse existing code. Migration is effortless. The SDK handles serialization. You focus on logic. Not protocol details.
Step 3: Send Your First Request
Construct a POST request to /v1/chat/completions. Include your API key in the header. Set the model to 'uncensored'. Pass a messages array. Each message has a role and content. Use 'user' for input. 'assistant' for previous turns. 'system' for instructions. The system prompt guides behavior. Set it to define tone. Or restrict output format. The request body includes the prompt. Tokens are counted automatically. Input costs $0.15 per million tokens. Output costs $0.50 per million tokens. These rates are transparent. You see the token count in the response. The last chunk contains usage data. This helps you track costs. Errors are free. If the model fails, you pay nothing. This reduces risk. You can experiment freely. The 100k context window allows large inputs. Paste entire documents. Include conversation history. The model retains context. It answers accurately. Streaming is optional. If you disable it, you wait for the full response. This is simpler for batch jobs. Choose based on your needs. The request size limit is 8 MB. This fits most use cases. Larger payloads may need chunking. The API handles validation. It returns clear error messages. You can debug quickly. The process is straightforward. No complex setup steps. Just send the request. Get the result. Build your app.
Step 4: Handle Streaming Responses
Enable streaming by setting stream to true. The server sends a series of chunks. Each chunk contains a partial token. You accumulate these tokens. Display them to the user in real time. This creates a typing effect. Users perceive faster performance. The last chunk includes usage data. It has the token counts. You can log these for billing. The stream ends with a done marker. Handle errors gracefully. Network interruptions may break the stream. Retry logic is recommended. The SSE format is standard. Parse the data field. Extract the text. Ignore metadata chunks. Focus on the content. This works with any HTTP client. Node.js, Python, Go, Rust all support it. The SDK handles parsing automatically. You get a stream object. Iterate over it. Yield tokens to your UI. This is ideal for chat interfaces. Users see responses as they generate. It reduces wait time. The 16k max output limit applies. If you need longer, make multiple requests. Concatenate the results. The model maintains coherence. It understands the context. Streaming does not affect quality. It only changes delivery speed. Use it for interactive apps. Disable it for batch processing. You save CPU cycles. The choice is yours. Flexibility is key. Build what works best for your users.
Step 5: Monitor Usage & Costs
Check your balance in the dashboard. It updates in real time. You see token usage per request. The last streaming chunk shows usage. Log this data in your system. Track input vs output tokens. Output is more expensive. Optimize your prompts to reduce input length. Use system prompts efficiently. Avoid repeating context. The prepaid model means you control spending. Top up when balance is low. Crypto top-ups are instant. USDT and USDC are supported. Bonus credits add value. $100 gives 10% extra. This lowers your effective cost. Credits never expire. You can save for peak usage. No monthly fees. No auto-renewal traps. If you double charge, contact support. They fix it manually. Refunds are not standard. Credits are final. This encourages careful spending. Monitor your API key usage. 300 requests per minute is the limit. 8 concurrent requests is the cap. Exceeding limits returns 429 errors. Rate limit your client. Implement exponential backoff. This prevents throttling. The dashboard shows historical data. Analyze trends. Identify spikes. Adjust your architecture. Cost optimization is continuous. Small changes add up. Efficiency matters. Every token counts. Your budget is yours to manage.
Step 6: Advanced Settings (Tools, JSON)
Use function calling for agentic workflows. Define tools in the request. Specify name, description, and parameters. The model decides which tool to call. It returns arguments. You execute the function. Pass results back to the model. It generates a final answer. This enables complex logic. Web search. Database queries. Code execution. JSON mode ensures structured output. Set response_format to json_object. The model returns valid JSON. Parse it in your code. This is crucial for APIs. Avoid parsing errors. The schema is flexible. You define the structure. The model follows it. Temperature affects tool choice. Lower values make decisions deterministic. Higher values add variety. Use low temp for reliability. Top_p filters nucleus sampling. Adjust for diversity. Stop sequences halt generation. Useful for structured text. Seed ensures reproducibility. Set a seed for debugging. Results are consistent. These features extend the API. You build powerful agents. The model understands instructions. It executes tasks accurately. No hallucination of tool names. It sticks to your schema. This reliability is key. For production systems. You need predictability. These settings provide it. Combine them for maximum utility. Build intelligent apps. Solve real problems. The uncensored model handles complex prompts. It does not refuse valid tools. It executes them fully. Power your next project.
Troubleshooting Common Errors
429 errors mean rate limit exceeded. You sent too many requests. Wait and retry with backoff. 401 errors indicate invalid API key. Check your key. Ensure it is active. Regenerate if lost. 400 errors are bad requests. Check JSON syntax. Verify model ID is 'uncensored'. Ensure messages array is correct. Role must be 'user', 'assistant', or 'system'. Content must be present. 500 errors are server issues. Retry once. If it persists, contact support. Errors are free. You do not lose credits. This is safe for testing. Check your balance. If it is zero, top up. Crypto payments are instant. USDT on TRC20. USDC on Base. Verify network. Slow connections may timeout. Increase timeout values. Large outputs may hit the 16k limit. Split your request. Or accept partial output. Streaming handles this well. Display what you get. The model continues. Context window is 100k tokens. If you exceed it, the model truncates. Remove old messages. Keep recent context. This improves relevance. Debug systematically. Log inputs and outputs. Compare with expected results. Isolate the issue. The API is robust. Errors are rare. When they happen, they are clear. Fix them quickly. Keep building.
Common questions
What is the uncensored LLM model ID?
The model ID is 'uncensored'. It is an open-weight model tuned for raw text generation. It does not refuse lawful adult or controversial topics. It is not GPT, Claude, or any other vendor's model.
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 context window is 100,000 tokens. This includes both input and output tokens. The maximum output per request is 16,000 tokens. If you do not set max_tokens, it defaults to 2,048.
Is the trial credit valid forever?
No, the trial credit of $0.50 is valid for 7 days. You need an email or Google account to sign up. No phone number is required. The trial is one per person.
Access your API key instantly
Sign up, copy the key, update your endpoint URL. Simple configuration.