---
title: "Cursor Setup for Security Models: OpenAI Base URL Guide"
canonical: https://pentestllm.ai/agents/cursor
generated: 2026-11-11T18:03:39.673Z
source: https://pentestllm.ai/agents/cursor
base_url: https://api.pentestllm.ai/v1
---

![Patch cables in a network switch](https://pentestllm.ai/img/cables.webp)

## Steps

1. ### 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.
2. ### 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.
3. ### 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/v1
   ```
4. ### Add 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-cybersecurity
   ```
5. ### Confirm 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](https://pentestllm.ai/agents/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](https://pentestllm.ai/acceptable-use) says. The other [agent guides](https://pentestllm.ai/agents) 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](https://pentestllm.ai/models/qwen3.8-27b-cybersecurity) | $0.40 | $2.40 | 262,144 |
| [Gemma 4 26B A4B Cybersecurity](https://pentestllm.ai/models/gemma-4-26b-a4b-it-cybersecurity) | $0.4224 | $1.3376 | 262,144 |
| [GLM-5.3 Flash Cybersecurity](https://pentestllm.ai/models/glm-5.3-flash-cybersecurity) | $0.5093 | $1.6975 | 1,048,576 |
| [Red Team (Flash)](https://pentestllm.ai/models/uplink-red-team-flash) | $0.90 | $3.00 | not published |
| [Red Team (Pro)](https://pentestllm.ai/models/uplink-red-team-pro) | $1.50 | $6.00 | not published |
| [OrcaCyber MiniMax M3.1 Flash](https://pentestllm.ai/models/minimax-m3.1-flash-cybersecurity) | $2.00 | $4.00 | 261,632 |
| [OrcaCyber Qwen3.8 Flash Next](https://pentestllm.ai/models/orcacyber-qwen3.8-flash-next) | $2.00 | $4.00 | 261,632 |
| [Cyber Frontier](https://pentestllm.ai/models/cyber-frontier) | $5.25 | $15.75 | 1,048,576 |
| [OrcaCyber Zero 1.5](https://pentestllm.ai/models/orca-zero-1.5-cybersecurity) | $7.50 | $18.75 | 999,488 |

[Full price list and tool fees](https://pentestllm.ai/pricing) · [Every model](https://pentestllm.ai/models) · [API docs](https://pentestllm.ai/docs)

## 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 guides The same three values in every supported client.](https://pentestllm.ai/agents)
- [Cline The OpenAI Compatible provider fields in Cline.](https://pentestllm.ai/agents/cline)
- [OpenCode The opencode.json provider block for the security builds.](https://pentestllm.ai/agents/opencode)
- [Vulnerability research Models for code review, CVE and patch analysis, and advisory writing.](https://pentestllm.ai/vulnerability-research)
- [Bug bounty Models for scope reading, recon notes, code review and report drafting on programs you are enrolled in.](https://pentestllm.ai/bug-bounty)

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](https://cursor.com/help/models-and-usage/api-keys), [Cursor docs: Models and pricing](https://cursor.com/docs/models-and-pricing), [Cursor forum: managed models routed through the override](https://forum.cursor.com/t/cursor-managed-models-are-routed-through-override-openai-base-url/169088), [Cursor forum: custom OpenAI-compatible API setup](https://forum.cursor.com/t/how-to-use-a-custom-openai-compatible-api-in-cursor-setup-limits-and-tips/171497). 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](https://pentestllm.ai/acceptable-use) says what is not allowed.

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

usage, 1,000 agent turns on Qwen3.8 27B Cybersecurity

- 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

output price per million tokens, 9 builds

$1.3376 Gemma 4 26B A4B Cybersecurity OrcaCyber Zero 1.5 $18.75
