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.

Prices per token

Get a keyTry it free in the browser
shell
1curl https://api.pentestllm.ai/v1/chat/completions \
2 -H "Authorization: Bearer sk-ptl-live-…" \
3 -H "Content-Type: application/json" \
4 -d '{
5 "model": "auto/security",
6 "messages": [{"role": "user", "content": "Rank these scanner findings by severity and say what to verify first."}]
7 }'

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.

Uncensored models and their prices per million tokens
Wire formats
Qwen3.8 27B Cybersecurityqwen3.8-27b-cybersecuritySecurity$0.40$2.40262Kopenai
Uncensored Qwen3.8 27b Cybersecurityqwen3.8-27b-cybersecurity-uncensoredSecurity$0.40$2.40262Kopenai
Gemma 4 26B A4B Cybersecuritygemma-4-26b-a4b-it-cybersecuritySecurity$0.4224$1.3376262Kopenai
Gemma 4 26B A4B Cybersecurity (Uncensored)gemma-4-26b-a4b-it-cybersecurity-uncensoredSecurity$0.48$1.52262Kopenai
GLM-5.3 Flash Cybersecurityglm-5.3-flash-cybersecuritySecurity$0.4935$1.6451049Kopenai
GLM-5.3 Flash Cybersecurity (Uncensored)glm-5.3-flash-cybersecurity-uncensoredSecurity$0.5093$1.69751049Kopenai
Red Team (Flash)uplink-red-team-flashSecurity$0.90$3.001000Kopenai
Red Team (Pro)uplink-red-team-proSecurity$1.50$6.00–openai
OrcaCyber MiniMax M3.1 Flashminimax-m3.1-flash-cybersecuritySecurity$2.00$4.00262Kopenai
OrcaCyber MiniMax M3.1 Flash (Uncensored)minimax-m3.1-flash-cybersecurity-uncensoredSecurity$2.00$4.00262Kopenai
OrcaCyber Qwen3.8 Flash Next (Uncensored)orcacyber-qwen3.8-flash-next-uncensoredSecurity$2.00$4.00262Kopenai
OrcaCyber Qwen3.8 Flash Nextqwen3.8-flash-next-cybersecuritySecurity$2.00$4.00262Kopenai
Uncensored Qwen3.8 Flash Next Cybersecurityqwen3.8-flash-next-cybersecurity-uncensoredSecurity$2.00$4.00262Kopenai
Cyber Frontiercyber-frontierSecurity$5.25$15.751049Kopenai
OrcaCyber Zero 1.5orca-zero-1.5-cybersecuritySecurity$7.50$18.75999Kopenai
OrcaCyber Zero 1.5 (Uncensored)orca-zero-1.5-cybersecurity-uncensoredSecurity$7.50$18.75999Kopenai

Full price list and tool fees · Every model · API docs

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.

Read next

One key, from $3

For systems you own or may test in writing: acceptable use.

Get a key

Join on TelegramHelp