---
title: "Best LLM for Penetration Testing: How to Choose (2026)"
description: "The best LLM for penetration testing is the one that answers in scope, reads long tool output and calls tools. Security builds by API, priced live."
canonical: https://pentestllm.ai/best-llm-for-penetration-testing
generated: 2026-11-27T06:25:54.210Z
source: https://pentestllm.ai/best-llm-for-penetration-testing
base_url: https://api.pentestllm.ai/v1
---

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](https://pentestllm.ai/pricing)

[Get a key](https://app.pentestllm.ai/console) [Try it free in the browser](https://pentestllm.ai/playground)

```bash
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](https://pentestllm.ai/privacy) 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](https://pentestllm.ai/ai-pentesting) 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](https://pentestllm.ai/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](https://pentestllm.ai/statements/verify).

| Model | Build | Input $/M | Output $/M | Context | Wire formats |
| --- | --- | --- | --- | --- | --- |
| [Qwen3.8 27B Cybersecurity](https://pentestllm.ai/models/qwen3.8-27b-cybersecurity) qwen3.8-27b-cybersecurity | Security | $0.40 | $2.40 | 262K | openai |
| [Uncensored Qwen3.8 27b Cybersecurity](https://pentestllm.ai/models/qwen3.8-27b-cybersecurity-uncensored) qwen3.8-27b-cybersecurity-uncensored | Security | $0.40 | $2.40 | 262K | openai |
| [Gemma 4 26B A4B Cybersecurity](https://pentestllm.ai/models/gemma-4-26b-a4b-it-cybersecurity) gemma-4-26b-a4b-it-cybersecurity | Security | $0.4224 | $1.3376 | 262K | openai |
| [Gemma 4 26B A4B Cybersecurity (Uncensored)](https://pentestllm.ai/models/gemma-4-26b-a4b-it-cybersecurity-uncensored) gemma-4-26b-a4b-it-cybersecurity-uncensored | Security | $0.48 | $1.52 | 262K | openai |
| [GLM-5.3 Flash Cybersecurity](https://pentestllm.ai/models/glm-5.3-flash-cybersecurity) glm-5.3-flash-cybersecurity | Security | $0.4935 | $1.645 | 1049K | openai |
| [GLM-5.3 Flash Cybersecurity (Uncensored)](https://pentestllm.ai/models/glm-5.3-flash-cybersecurity-uncensored) glm-5.3-flash-cybersecurity-uncensored | Security | $0.5093 | $1.6975 | 1049K | openai |
| [Red Team (Flash)](https://pentestllm.ai/models/uplink-red-team-flash) uplink-red-team-flash | Security | $0.90 | $3.00 | 1000K | openai |
| [Red Team (Pro)](https://pentestllm.ai/models/uplink-red-team-pro) uplink-red-team-pro | Security | $1.50 | $6.00 | – | openai |
| [OrcaCyber MiniMax M3.1 Flash](https://pentestllm.ai/models/minimax-m3.1-flash-cybersecurity) minimax-m3.1-flash-cybersecurity | Security | $2.00 | $4.00 | 262K | openai |
| [OrcaCyber MiniMax M3.1 Flash (Uncensored)](https://pentestllm.ai/models/minimax-m3.1-flash-cybersecurity-uncensored) minimax-m3.1-flash-cybersecurity-uncensored | Security | $2.00 | $4.00 | 262K | openai |
| [OrcaCyber Qwen3.8 Flash Next (Uncensored)](https://pentestllm.ai/models/orcacyber-qwen3.8-flash-next-uncensored) orcacyber-qwen3.8-flash-next-uncensored | Security | $2.00 | $4.00 | 262K | openai |
| [OrcaCyber Qwen3.8 Flash Next](https://pentestllm.ai/models/qwen3.8-flash-next-cybersecurity) qwen3.8-flash-next-cybersecurity | Security | $2.00 | $4.00 | 262K | openai |
| [Uncensored Qwen3.8 Flash Next Cybersecurity](https://pentestllm.ai/models/qwen3.8-flash-next-cybersecurity-uncensored) qwen3.8-flash-next-cybersecurity-uncensored | Security | $2.00 | $4.00 | 262K | openai |
| [Cyber Frontier](https://pentestllm.ai/models/cyber-frontier) cyber-frontier | Security | $5.25 | $15.75 | 1049K | openai |
| [OrcaCyber Zero 1.5](https://pentestllm.ai/models/orca-zero-1.5-cybersecurity) orca-zero-1.5-cybersecurity | Security | $7.50 | $18.75 | 999K | openai |
| [OrcaCyber Zero 1.5 (Uncensored)](https://pentestllm.ai/models/orca-zero-1.5-cybersecurity-uncensored) orca-zero-1.5-cybersecurity-uncensored | Security | $7.50 | $18.75 | 999K | openai |

[Full price list and tool fees](https://pentestllm.ai/pricing) · [Every model](https://pentestllm.ai/models) · [API docs](https://pentestllm.ai/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

[AI pentesting What a model does inside an authorized penetration test, and the builds to run your agent on.](https://pentestllm.ai/ai-pentesting) [Uncensored LLM for pentesting What abliterated and security-tuned builds change for authorized penetration testing.](https://pentestllm.ai/uncensored-llm-for-pentesting) [Local vs hosted LLM A decision by engagement type: local models keep data on your laptop, hosted ones need a contract first.](https://pentestllm.ai/local-vs-hosted-llm-for-pentesting) [Best LLM for CTF How to choose a model per CTF category, with live prices for each tier.](https://pentestllm.ai/best-llm-for-ctf)

## One key, from $3

For systems you own or may test in writing: [acceptable use](https://pentestllm.ai/acceptable-use).

[Get a key](https://app.pentestllm.ai/console)
