Set up Cursor with PentestLLM
Cursor can send its chat and agent requests to PentestLLM through its own-API-key settings: an OpenAI API key, the Override OpenAI Base URL switch set to https://api.pentestllm.ai/v1, and a custom model name. The override is global while it is on, so read the limits below before you rely on it.
https://api.pentestllm.ai/v1
Steps
Open the Models settings
In Cursor, open Cursor Settings and choose Models. Cursor’s help page describes this screen as the place where you paste a provider API key and save it.
Add your key as the OpenAI API key
Create a key in the PentestLLM console. In the OpenAI section, paste it into the API key field. Cursor treats the endpoint as OpenAI, so this is the field it reads.
Turn on Override OpenAI Base URL
Enable Override OpenAI Base URL and enter the PentestLLM base URL, including the
/v1. Save the settings.Override OpenAI Base URL https://api.pentestllm.ai/v1Add a model name and select it
Add a custom model with the exact id of a security build, then pick it in the chat panel’s model picker. This guide uses a named build because Cursor’s docs do not say how it treats a slash inside a custom model name.
model id gemma-4-26b-a4b-it-cybersecurityConfirm the key works outside Cursor
If Cursor reports that the key or model is invalid, list the models with curl. If this succeeds, the values are right and the issue is in Cursor’s settings.
shell curl https://api.pentestllm.ai/v1/models -H "Authorization: Bearer sk-ptl-live-…"
Where this information comes from
Cursor’s help page on own API keys, read on 11 November 2026, documents adding a key per provider under Cursor Settings, Models. It does not document the base URL field. The label Override OpenAI Base URL and the custom model step come from threads on Cursor’s own forum from August and September 2026. If your version of Cursor has no such field, use Cline inside the editor instead; it treats a custom endpoint as a normal provider.
Limits worth knowing
- The override is global
- A Cursor forum bug report from August 2026 says that while the override is on, requests for Cursor’s own OpenAI-family models also go to your endpoint and fail there. Turn the override off when you switch back to Cursor’s models.
- Chat models only
- Cursor’s help page says custom API keys only work with chat models and that Tab completion keeps using Cursor’s built-in models.
- Requests pass through Cursor
- The same page says your key is sent to Cursor’s backend with every request, because requests are routed through its servers for prompt building, and is not stored there.
- Plan limits
- Cursor’s pricing page says its Plus plan does not include your own API keys, and that Teams and Enterprise plans add Cursor’s own token rate to own-key requests.
- Privacy mode
- Cursor’s help page says its Zero Data Retention policy does not apply when you use your own API keys.
Routing without a slash in the name
If you want the router and Cursor will not take auto/security as a model name, create a key in the console with its auto router option set to auto/security. A key set that way routes every chat request as the router id, whatever model name the client sends, so the named build in the steps becomes a label and the router still picks per request.
What it costs and what it is for
Requests bill per token to your PentestLLM balance at the price of the build that answered; the table below is the live catalog on 2026-11-11. Agent requests carry the conversation, the files Cursor read and tool results, so input tokens are most of the bill.
The builds answer security questions other models decline, which is what makes them useful for reviewing code for vulnerabilities and drafting findings inside the editor. Refusals are reduced, not removed. Use them on code and systems you own or have written permission to test, as the acceptable use policy says. The other agent guides cover terminal tools.
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
Its Models settings include an Override OpenAI Base URL switch, named in Cursor forum threads from August and September 2026. Cursor’s help page on API keys, read in November 2026, does not document it.
A bug report on Cursor’s forum says the override also redirects requests for Cursor-managed OpenAI-family models to the custom endpoint. Turn Override OpenAI Base URL off when you switch back to them.
No. Cursor’s help page says custom API keys only work with chat models and Tab completion continues to use Cursor’s built-in models.
The exact id of a build from the models page, for example gemma-4-26b-a4b-it-cybersecurity. The display name will not work.
Cline is an editor extension with an OpenAI Compatible provider that takes a base URL, a key and a model id without affecting other models.
Read next
- All agent guidesThe same three values in every supported client.
- ClineThe OpenAI Compatible provider fields in Cline.
- OpenCodeThe opencode.json provider block for the security builds.
- Vulnerability researchModels for code review, CVE and patch analysis, and advisory writing.
- Bug bountyModels for scope reading, recon notes, code review and report drafting on programs you are enrolled in.
Facts about other products and tools on this page were read from their own pages on 11 November 2026: Cursor help: Bring your own API key, Cursor docs: Models and pricing, Cursor forum: managed models routed through the override, Cursor forum: custom OpenAI-compatible API setup. They change; check the source before relying on a figure.
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