Cursor custom API key: a security-tuned model in the chat panel

Enter your key in Cursor’s OpenAI API Key field, swap the base URL, add a security or uncensored id to the picker. Works in Ask and Agent; errors and fixes.

Steps checked October 26, 2026 · prices as of November 17, 2026

You review client code in Cursor and the stock model balks the moment a file looks like an exploit. Cursor lets you bring your own OpenAI-format key and base URL in its Models settings. Three fields, one id from the models page, and a security-tuned or uncensored build answers in the chat panel and in Agent mode.

What you need

  • Cursor installed, any plan.
  • A key from the console with prepaid credit on it.
  • One or more ids from the models page. The builds tagged security are tuned for engagement work; auto/security picks one by request difficulty.

Find the fields

Open Cursor Settings with Cmd/Ctrl + , and choose Models. Scroll past the model list: the API key and base URL controls are underneath it.

Shortest path to a first reply

  1. Enable OpenAI API Key and paste the key you made in the console.
  2. Enable Override OpenAI Base URL and type https://api.pentestllm.ai/v1.
  3. Press Save. On older builds of Cursor the same button reads Verify.
  4. Back under Models, add each id you want to see in the picker. Anything on the models page is valid:
model ids
1glm-5.3-uncensored
2glm-5.3-flash-uncensored
3deepseek-v4-pro-uncensored
4nemotron-3-ultra-550b-a55b-uncensored

Select one in the chat panel and ask something from the job: a rundown of what a Nmap service scan of an in-scope host tells you, or a review of a client’s auth middleware for logic bugs. Ask mode and Agent mode both answer. To try the same build without installing anything, the home page has a few free demo turns and the playground runs every id on a key.

The three settings

OpenAI API Key
the whole sk-ptl- key
what Cursor attaches to every request as the credential
Override OpenAI Base URL
https://api.pentestllm.ai/v1
redirects those requests to this API; keep the trailing /v1
Models
the ids the picker offers
one entry per id, typed exactly as the models page prints it

Which build, and what a turn costs

Cursor speaks the OpenAI format, and every build on the models page answers it. Enter the id, not the display name: glm-5.3-uncensored, for instance. An Agent turn ships the whole conversation plus the files Cursor opened and every tool result, so input tokens drive the bill, and the build with the lowest input price is the cheapest per turn.

ModelOne Agent turn
GLM-5.3 Uncensored$0.01
GLM-5.3 Flash Uncensored$0.0047
DeepSeek V4 Pro Uncensored$0.04
Nemotron 3 Ultra 550B Uncensored$0.05

Priced at 40,000 input tokens and 1,200 output tokens, catalog prices on 2026-11-17.

Uncensored models and their prices per million tokens
GLM-5.3 Uncensoredglm-5.3-uncensoredUncensored$0.282$0.846
GLM-5.3 Flash Uncensoredglm-5.3-flash-uncensoredUncensored$0.1053$0.3685
DeepSeek V4 Pro Uncensoreddeepseek-v4-pro-uncensoredUncensored$0.97$1.94
Nemotron 3 Ultra 550B Uncensorednemotron-3-ultra-550b-a55b-uncensoredUncensored$1.0913$6.402

Prices per million tokens, read from the live catalog on 2026-11-17.

Prove it outside Cursor

First, ask the API which models your key may call:

shell
1curl https://api.pentestllm.ai/v1/models -H "Authorization: Bearer sk-ptl-live-…"

Next, replay the kind of request Cursor sends. -i prints the response headers, which include a request id and, when the answer is not streamed, the charge in USD.

shell
1curl -i https://api.pentestllm.ai/v1/chat/completions \
2 -H "Authorization: Bearer sk-ptl-live-…" \
3 -H "Content-Type: application/json" \
4 -d '{"model": "glm-5.3-uncensored", "messages": [{"role": "user", "content": "Reply with the single word ok."}]}'

Then, in Cursor, send a message with one of your ids selected. It appears on the console’s usage page with its token counts and its charge.

How you are billed

  • Each request is charged per token at the build’s catalog price and drawn from your prepaid credit.
  • If the response reports cached input tokens, those bill at the build’s cached rate rather than the input rate. A long thread that keeps the same prefix is cheaper per turn than a new one.
  • Cursor’s Teams and Enterprise plans count own-key requests toward Cursor’s usage and charge their own per-token fee, paid to Cursor, not here. Cursor’s API key docs say individual plans are exempt.

When it breaks

  • 401 invalid_api_key: the key is wrong or has been revoked. Paste a fresh copy from the console.
  • 404 model_not_found: the id you typed into the picker is not on the models page. Compare the spelling.
  • 402 insufficient_balance: your credit will not cover the request. Top up in the console. 402 monthly_limit_reached means the key reached the monthly cap you set on it.
  • 403 scope_denied: the key is scoped to specific models and the selected one is outside that scope.
  • 429 rate_limited: the key is over its rate limit. The response carries retry-after.
  • TLS failures: Settings → Network → HTTP Compatibility Mode → HTTP/1.1.

Questions

No. Tab keeps using Cursor’s own models. The key and base URL only affect the chat panel, Ask and Agent.

No. Your ids appear in the same picker next to Cursor’s, and you can change per conversation.

Yes, on builds whose base model supports tool calls. Agent mode sends tools in the OpenAI format, and each model page states whether the build handles them.

A strong build for the code review or exploit edit, a fast one for the quick questions around it. The table above prices one Agent turn on each at the live rate. See the models page.

Every model above is on the uncensored model list with its live price per million tokens. Per-token pricing sets the whole catalog side by side, and the family directory groups the builds by base model.

Get a keyPrepaid from $10, no subscription.

New models and price changes, once a month.

New uncensored builds with their prices, price moves, and what the daily model check found.

Help