Best LLM for penetration testing
Choosing an LLM for pentesting
The best LLM for penetration testing is one that answers authorized security questions instead of declining, reads long scanner output in one request and calls tools from your agent, and PentestLLM serves 16 such security-tuned builds at https://api.pentestllm.ai/v1 from $0.40 per million input tokens. It works with OpenCode, Claude Code, Cline, aider and PentestGPT, on a prepaid balance from $3 with no seat licence.
curl https://api.pentestllm.ai/v1/chat/completions \ -H "Authorization: Bearer sk-ptl-live-…" \ -H "Content-Type: application/json" \ -d '{ "model": "auto/security", "messages": [{"role": "user", "content": "Rank these scanner findings by severity and say what to verify first."}] }'What to judge a model on
- Refusals in scope
- A stock assistant declines many specific questions about an engagement. Count how often a model answers your real, authorized questions, not a benchmark.
- Context window
- Scan exports, proxy histories and source bundles are long. The largest window listed today is 1M tokens.
- Tool calling
- Agents need a model that returns clean tool calls. Gemma 4 26B A4B Cybersecurity takes tool calls and has a 262,144 token window.
- Price per engagement
- An engagement is millions of tokens. Per-token prices matter more than a monthly plan you use one week in four.
- Data handling
- Client data leaves your network. Read the privacy policy and redact before you send.
There is no single best model
Different steps of a test want different models. Classifying a thousand findings wants a fast, low-priced build. Reasoning through an unusual authentication flow wants a stronger one. Drafting the report wants good prose. Pinning one model for all of it either overpays for the easy work or underpowers the hard work.
The id auto/security handles that per request: it sends each call to a fast, balanced or frontier security build and bills at the build that answered. Pin a named build from the table below when you need repeatable output, for example when you compare two runs of the same prompt.
How to run your own comparison
Take ten questions from a recent authorized engagement with the client data removed: a finding to explain, an output file to summarize, a severity to argue, a remediation to write. Send each to three builds from the table and score the answers yourself on accuracy, refusals and usefulness. An afternoon and a few dollars of tokens tell you more than any public ranking, because the ranking was not run on your work.
Keep the prompts and the scores. When a new build lands in the catalog, rerun the same ten and decide in an hour whether to switch.
Where the model sits in a test
A model drafts, sorts and explains; the tester decides, verifies and signs. It reads the output of tools you ran in scope, suggests what to check by hand, and writes the first version of each finding. It does not replace the rules of engagement, the scope document or the judgment of the person who answers to the client. The AI pentesting page covers where a model fits in each phase.
Connecting it to your agent
The endpoint is OpenAI-compatible at https://api.pentestllm.ai/v1 and Anthropic-compatible at https://api.pentestllm.ai/v1/messages, so the same key works in terminal agents, editor agents and your own scripts. The setup guides give the exact fields per client. Server tools are billed separately when a request uses them: web search at $0.01 per search and the code sandbox at $0.05 per container-hour, 1-minute minimum.
16 security builds, priced per token
USD per million tokens, live on 2026-11-27; auto/security bills at the build that answers.
Detected refusals and invalid non-streamed JSON qualify for automatic refunds within the daily cap. Verify your receipt.
| Wire formats | |||||
|---|---|---|---|---|---|
| Qwen3.8 27B Cybersecurity | Security | $0.40 | $2.40 | 262K | |
| Uncensored Qwen3.8 27b Cybersecurity | Security | $0.40 | $2.40 | 262K | |
| Gemma 4 26B A4B Cybersecurity | Security | $0.4224 | $1.3376 | 262K | |
| Gemma 4 26B A4B Cybersecurity (Uncensored) | Security | $0.48 | $1.52 | 262K | |
| GLM-5.3 Flash Cybersecurity | Security | $0.4935 | $1.645 | 1049K | |
| GLM-5.3 Flash Cybersecurity (Uncensored) | Security | $0.5093 | $1.6975 | 1049K | |
| Red Team (Flash) | Security | $0.90 | $3.00 | 1000K | |
| Red Team (Pro) | Security | $1.50 | $6.00 | – | |
| OrcaCyber MiniMax M3.1 Flash | Security | $2.00 | $4.00 | 262K | |
| OrcaCyber MiniMax M3.1 Flash (Uncensored) | Security | $2.00 | $4.00 | 262K | |
| OrcaCyber Qwen3.8 Flash Next (Uncensored) | Security | $2.00 | $4.00 | 262K | |
| OrcaCyber Qwen3.8 Flash Next | Security | $2.00 | $4.00 | 262K | |
| Uncensored Qwen3.8 Flash Next Cybersecurity | Security | $2.00 | $4.00 | 262K | |
| Cyber Frontier | Security | $5.25 | $15.75 | 1049K | |
| OrcaCyber Zero 1.5 | Security | $7.50 | $18.75 | 999K | |
| OrcaCyber Zero 1.5 (Uncensored) | Security | $7.50 | $18.75 | 999K |
Questions
What is the best LLM for penetration testing in 2026?
The one that answers your authorized questions, holds your longest tool output and calls tools cleanly in your agent. Test three security builds on ten of your own redacted prompts; the router id auto/security is a sound default while you decide.
Is GPT or Claude good for pentesting?
Both are strong general models and both decline many specific security questions. Security-tuned and abliterated builds decline far fewer authorized questions, which is why testers keep one beside a general assistant.
How much does a model cost for one engagement?
You pay per token from a prepaid balance that starts at $3. On 2026-11-27 the lowest-priced security build costs $0.40 per million input tokens; a week of agent work is usually a few dollars to a few tens of dollars.
Can I keep client data private?
Redact hostnames, people and credentials before sending, and read the privacy policy for what is stored. Request bodies are not kept as training data.
Who is PentestLLM for?
Security professionals, researchers and students working on systems they own or have written permission to test, and on lab ranges built for practice. Unauthorized testing is not allowed whatever a model says.