A cybersecurity LLM API
PentestLLM is a cybersecurity LLM API: 9 security-tuned builds behind OpenAI-compatible and Anthropic-compatible endpoints, billed per token from a prepaid balance. You create a key, set the base URL to https://api.pentestllm.ai/v1, and send the model id auto/security or the id of a single build.
curl https://api.pentestllm.ai/v1/messages \
-H "x-api-key: sk-ptl-live-…" \
-H "anthropic-version: 2023-06-01" \
-H "content-type: application/json" \
-d '{
"model": "auto/security",
"max_tokens": 1024,
"messages": [{"role": "user", "content": "Draft a detection rule for this log pattern and explain each condition."}]
}'
Endpoints and authentication
- Chat completions
POST https://api.pentestllm.ai/v1/chat/completions, the OpenAI chat format. Most agents and SDKs use this one.- Responses
POST https://api.pentestllm.ai/v1/responses, the OpenAI Responses format.- Messages
POST https://api.pentestllm.ai/v1/messages, the Anthropic format, for the Anthropic SDK and Claude Code.- Key
- A bearer token in the
Authorizationheader, or the same key inx-api-keyfor Anthropic-format clients.
Every security build answers on all three routes at the same price. The docs have the full reference, including errors and streaming.
One model id that routes
The id auto/security is a router over the security builds. It classifies each request from what it carries, without an extra model call: a reasoning request, or tools together with code, goes to the frontier tier; tools, code blocks, images, a JSON schema or a prompt over 16,000 tokens go to the balanced tier; everything else goes to the fast tier. The response’s model field names the build that answered, and you pay that build’s price. There is no router fee.
Two controls matter for cost and consistency. An auto object with tier_max keeps a request out of the higher tiers. An x-session-id header keeps one build answering a session for 30 minutes after its last request, so an agent run does not change model halfway.
curl https://api.pentestllm.ai/v1/chat/completions \
-H "Authorization: Bearer sk-ptl-live-…" \
-H "Content-Type: application/json" \
-H "x-session-id: engagement-42" \
-d '{
"model": "auto/security",
"auto": {"tier_max": "balanced"},
"messages": [{"role": "user", "content": "Summarize these findings for the weekly status note."}]
}'Tools that run on the API side
- Web search
- $0.01 per search. The model searches and reads results inside one request.
- Web fetch
- $0.001 per page fetched. The model retrieves a page you or it names, such as a vendor advisory.
- Code sandbox
- $0.05 per container-hour, 1-minute minimum. Bash, JavaScript and Python in an isolated container.
- Remote MCP
- No tool fee. The API calls a remote MCP server you name in the request.
Server tools are declared in the request and billed with the tokens. They need a build that takes tool calls; each model page says whether it does.
Pricing, as an API should state it
Each build has an input price and an output price per million tokens, read from the live catalog. The table below is that catalog on 2026-11-11. The balance is prepaid from $10 by card or crypto; a request that would overdraw it is refused, not billed. The same figures are on the pricing page, and the models page adds context windows and supported parameters.
Who the API is for
It is for lawful, authorized security work: penetration testers, red teams, bug bounty hunters, CTF players, analysts and the people who build tools for them. You must own the systems you test or hold written permission. The acceptable use policy is the full statement, and the agent guides cover the common clients.
9 security builds, priced per token
Read from the live catalog on 2026-11-11. Prices are US dollars per million tokens, paid from a prepaid balance that starts at $10. The id auto/security has no price of its own: each request is billed at the build that answered.
| Build | Input | Output | Context |
|---|---|---|---|
| Qwen3.8 27B Cybersecurity | $0.40 | $2.40 | 262,144 |
| Gemma 4 26B A4B Cybersecurity | $0.4224 | $1.3376 | 262,144 |
| GLM-5.3 Flash Cybersecurity | $0.5093 | $1.6975 | 1,048,576 |
| Red Team (Flash) | $0.90 | $3.00 | not published |
| Red Team (Pro) | $1.50 | $6.00 | not published |
| OrcaCyber MiniMax M3.1 Flash | $2.00 | $4.00 | 261,632 |
| OrcaCyber Qwen3.8 Flash Next | $2.00 | $4.00 | 261,632 |
| Cyber Frontier | $5.25 | $15.75 | 1,048,576 |
| OrcaCyber Zero 1.5 | $7.50 | $18.75 | 999,488 |
Questions
Yes. Set the base URL to https://api.pentestllm.ai/v1 in any OpenAI SDK or client, use your key as the API key, and send a security build id or auto/security as the model.
Yes. The Messages endpoint at https://api.pentestllm.ai/v1/messages takes Anthropic-format requests with the key in the x-api-key header or as a bearer token.
Per token, at the price of the build that answered, from a prepaid balance. Server tools add their own fee per search, fetch or container-hour. There is no subscription and no router fee.
On 2026-11-11 the lowest-priced security build costs $0.40 per million input tokens. The pricing page shows the current figure for every build.
Yes. Send "auto": {"tier_max": "balanced"} or "fast" in the request body and the router will not pick a build from a higher tier.
Many do. Each model page lists the request parameters the build supports, including tools and response_format.
Read next
- Cybersecurity AIModels for security teams, defensive and offensive, on one prepaid key.
- Agent guidesWhere the base URL and key go in OpenCode, Claude Code, Cursor, Cline, aider, Kali MCP and PentestGPT.
- Uncensored LLM for pentestingWhat abliterated and security-tuned builds change for authorized penetration testing.
- Vulnerability researchModels for code review, CVE and patch analysis, and advisory writing.
One key, from $10
PentestLLM is for systems you own or have written permission to test. The acceptable use policy says what is not allowed.
- Input, 8,000 tokens at $0.40 per million
- $0.0032
- Output, 1,000 tokens at $2.40 per million
- $0.0024
- One turn
- $0.0056
- 1,000 turns
- $5.60