Unrestricted LLM for Coding: Security Research Use
An unrestricted llm for coding helps when your work is lawful but sounds risky to a filter: authorized pentests, CTFs, malware analysis for defense. This guide covers use cases, prompts, a working script and costs.
Updated


Key points
- Use it for tasks you are authorized to do, such as pentests, CTFs and defensive analysis.
- State role, target, constraints and verification in the prompt.
- Use temperature around 0.2 for code and read all output before running it.
- A review of a 10,000-token file costs about $0.00225.
Where coding assistants refuse, and why it hurts
An unrestricted llm for coding is useful when the work is legitimate but the topic sounds alarming. Mainstream assistants often decline requests that mention exploits, shellcode, credential handling, packet crafting or malware internals, even when the person asking is a penetration tester, a student in a capture-the-flag event, or an engineer hardening their own systems. The refusal is generic; it cannot tell a defender from an attacker.
This API serves one open-weight model, run by an independent provider, tuned to answer without content refusals for lawful use. It is OpenAI-compatible, so you can put it behind an editor plugin, a script or a CLI. It is not the official product of any model vendor, and it will not replace your judgment: the code it writes can be wrong, and you are responsible for how you use it. Keep every task inside the law and inside your authorization.
Lawful tasks that benefit
- Authorized penetration testing. Writing a proof of concept for a vulnerability you found on a system you are contracted to test, drafting a report section, or turning a manual check into a script.
- CTF and training labs. Explaining a binary exploitation challenge, solving a crypto puzzle step by step, or generating practice targets.
- Malware analysis for defense. Reading decompiled output, naming functions, summarizing what a sample does, and writing detection rules such as YARA signatures.
- Reverse engineering your own or licensed software. Understanding file formats and protocols for interoperability.
- Fuzzers, scanners and network tools. Writing a parser fuzzer for your own library, or a port-check script for your own network.
- Scrapers and automation. Scripts that handle logins, sessions and unusual sites, where some assistants hedge or refuse.
- Legacy and odd code. Firmware, obfuscated JavaScript you need to read, or old protocols with no documentation.
The common thread is that the user has the right to do the work. If you do not, no prompt trick makes it acceptable, and nothing here is advice for attacking systems you do not own or have permission to test.
Prompt tips that improve results
Even a model tuned not to refuse performs better with context. A good prompt for security work states four things:
- Role and authorization. "I am testing my company's staging environment under a signed scope."
- Exact target. Language, versions, OS, framework and what output format you want.
- Constraints. No external dependencies, Python 3.11 only, must print JSON.
- Verification. Ask for a short explanation of each step and a test you can run locally.
Put the stable parts in a system message and the task in the user message. For code, use a low temperature, around 0.2, so repeated runs stay consistent. Ask for one file at a time rather than an entire project, and paste error output back into the conversation so the model can correct itself. You can read more on writing for this kind of model in the overview of the best LLMs without restrictions.
Code: a reusable helper
This script reviews a source file and returns notes on likely security problems. It uses the OpenAI SDK against the API with model uncensored.
import os
import sys
from openai import OpenAI
client = OpenAI(base_url="https://api.unrestricted.cc/v1", api_key=os.environ["API_KEY"])
SYSTEM = (
"You are a senior application security engineer helping with authorized "
"code review. List concrete vulnerabilities with line references, explain "
"the impact, and give a minimal fix for each. Do not pad the answer."
)
def review(path):
with open(path, encoding="utf-8") as f:
source = f.read()
resp = client.chat.completions.create(
model="uncensored",
temperature=0.2,
max_tokens=1500,
messages=[
{"role": "system", "content": SYSTEM},
{"role": "user", "content": "Review this file:\n\n" + source},
],
)
return resp.choices[0].message.content, resp.usage
if __name__ == "__main__":
text, usage = review(sys.argv[1])
print(text)
print("tokens:", usage.prompt_tokens, usage.completion_tokens)
The same idea works for exploit explanation, deobfuscation and test generation. Swap the system prompt and keep the structure. For a longer interactive tool, see the guide to building an unrestricted LLM chatbot in Python.
Working with large files and long sessions
The context window is 100,000 tokens for prompt plus completion, which fits a few thousand lines of code in one request. For bigger codebases, send the relevant files only: the function under review, its callers and the config that controls it. Summarize the rest in a sentence or two.
Use streaming for interactive tools so output appears as it is generated. Set stream: true and read the SSE chunks. Tool calling also works, which lets you build a loop where the model asks your script to run a linter or fetch a file and then continues with the result. Keep tool permissions narrow: run commands only in a sandbox, and never let model output execute against systems outside your scope without a human check.
JSON mode (response_format: {"type": "json_object"}) helps when you pipe findings into a ticket system. Describe the fields in the prompt and validate the result.
What it costs
Code tasks are input heavy, which suits the pricing: $0.15 per 1M input tokens and $0.50 per 1M output tokens. Take a review of an 800-line file, about 10,000 input tokens, producing 1,500 tokens of notes:
- Input: 10,000 x $0.15 / 1M = $0.0015
- Output: 1,500 x $0.50 / 1M = $0.00075
- Per review: $0.00225
A hundred such reviews cost $0.225. Even an agent loop that makes 30 calls at 20,000 input and 1,000 output tokens each costs 30 x ($0.003 + $0.0005) = $0.105. Failed or refused requests are not charged. See the pricing page for top-ups from $20 to $500, with +5% from $50, +10% from $100 and +15% from $200. Only crypto (USDT on TRC20, USDC on Base) is accepted, and credit never expires.
Limits and good practice
A full key allows 8 concurrent requests and 300 per minute, which is enough to run a team's scripts. If you hit HTTP 429, check the error code: rate_limited means requests per minute, concurrency means too many at once. A Retry-After: 5 header marks temporary overload.
Treat output as untrusted code. Read it, run it in a throwaway environment, and write tests. Do not paste secrets, customer data or production credentials into prompts; although prompts are not used for training, they still leave your machine. And remember the hard line: the service does not allow sexual content involving minors, and legitimate security work never needs it.
To try it, claim $0.50 of trial credit with one click on the API key page, then follow the docs. The trial needs no card and lasts 7 days.
More guides
Questions and answers
Is it legal to use an unrestricted LLM for security work?
The tool is lawful when you use it on systems you own or have written permission to test. You remain responsible for complying with the law and your contract.
Is the generated code reliable?
Not automatically. Review it, test it in an isolated environment and treat it as a draft.
Does it work in my editor?
Any editor plugin or CLI that supports a custom OpenAI-compatible endpoint can use the base URL, your key and the model ID uncensored.
Are there topics that stay off limits?
Yes. Sexual content involving minors is never allowed, and the service is for lawful use only.
Your key is one form away
Create an account, copy the key, change the base URL. That is the whole setup.