You have scripts on the OpenAI SDK and a model that declines half of what an engagement asks. Every build in this catalog speaks the OpenAI wire format, so pointing those scripts at an uncensored or security-tuned build is two environment variables and no code change. This page shows the calls in Python, TypeScript, curl and the Vercel AI SDK, the error codes, and the live cost of a request.
What you need: two variables
Any client built on the OpenAI API honors OPENAI_BASE_URL and OPENAI_API_KEY. Export both and none of the snippets below needs a URL or a key written into it. Stop the URL at /v1. The key is created in the console, begins with sk-ptl-, is shown to you once, and draws on credit you add from $10.
export OPENAI_BASE_URL="https://api.pentestllm.ai/v1"export OPENAI_API_KEY="sk-ptl-live-…"- OPENAI_BASE_URL
- https://api.pentestllm.ai/v1stops at /v1
- OPENAI_API_KEY
- sk-ptl-live-…from the console
- model
- glm-5.3-uncensoredany id listed on the models page
No install at all: the prompt box on the home page gives a few free turns, and the playground runs the same builds from the browser once you hold a key.
Python
Stock openai package, nothing patched. Because the response keeps the OpenAI shape, scripts you already have for triage or report drafting read it unchanged. The sample asks about a token bypass on an endpoint inside your scope, the kind of question a stock model tends to decline.
from openai import OpenAI client = OpenAI() # reads OPENAI_BASE_URL and OPENAI_API_KEY response = client.chat.completions.create( model="glm-5.3-uncensored", messages=[{"role": "user", "content": "Explain how a JWT alg=none bypass works and how to test for it on an in-scope login endpoint."}], max_tokens=600,)print(response.choices[0].message.content)Streaming is the usual stream=True; chunks arrive while the model writes, which suits long report sections.
with client.chat.completions.create( model="glm-5.3-uncensored", messages=[{"role": "user", "content": "Draft the methodology section of a web application pentest report."}], stream=True,) as events: for chunk in events: piece = chunk.choices[0].delta.content if piece: print(piece, end="", flush=True)TypeScript
The openai npm client accepts baseURL and apiKey as constructor options; read them from the two variables.
import OpenAI from 'openai'; const client = new OpenAI({ baseURL: process.env.OPENAI_BASE_URL, apiKey: process.env.OPENAI_API_KEY,}); const response = await client.chat.completions.create({ model: 'glm-5.3-uncensored', messages: [{ role: 'user', content: 'Explain how a JWT alg=none bypass works and how to test for it on an in-scope login endpoint.' }], max_tokens: 600,});console.log(response.choices[0]?.message.content);Vercel AI SDK
Give @ai-sdk/openai the base URL and call provider.chat(id), which keeps requests on Chat Completions, the route every listed build answers. streamText, generateText and generateObject all run on it. The AI SDK guide goes deeper, tool calls included.
import { createOpenAI } from '@ai-sdk/openai';import { streamText } from 'ai'; const provider = createOpenAI({ baseURL: process.env.OPENAI_BASE_URL, apiKey: process.env.OPENAI_API_KEY,}); const result = streamText({ model: provider.chat('glm-5.3-uncensored'), prompt: 'Explain how a JWT alg=none bypass works and how to test for it on an in-scope login endpoint.',});for await (const piece of result.textStream) process.stdout.write(piece);Prove it with curl
Listing models is free and confirms the key and URL together. The chat call after it is a single billed request.
curl https://api.pentestllm.ai/v1/models -H "Authorization: Bearer sk-ptl-live-…"curl https://api.pentestllm.ai/v1/chat/completions \ -H "Authorization: Bearer sk-ptl-live-…" \ -H "Content-Type: application/json" \ -d '{"model": "glm-5.3-uncensored", "messages": [{"role": "user", "content": "Hello"}]}'Each response carries a request id header, and a non-streamed response also carries its charge in USD. The usage page of the console shows both.
Cost per request
A request of 600 input tokens and 250 output tokens, across four builds, at the catalog prices of 2026-11-17:
| Model | One request | 1,000 requests |
|---|---|---|
| GLM-5.3 Uncensored | $0.00038 | $0.38 |
| DeepSeek V4.1 Flash Abliterated | $0.00093 | $0.93 |
| GLM-5.3 Flash Uncensored | $0.00016 | $0.16 |
| Kimi K3 Uncensored | $0.01 | $10.62 |
| GLM-5.3 Uncensored | Uncensored | $0.282 | $0.846 |
| DeepSeek V4.1 Flash Abliterated | Abliterated | $0.8488 | $1.6975 |
| GLM-5.3 Flash Uncensored | Uncensored | $0.1053 | $0.3685 |
| Kimi K3 Uncensored | Uncensored | $5.745 | $28.68 |
JSON, streaming, tools
Ask for a JSON body with response_format set to json_object; findings tables and detection rules are easier to parse that way. If the answer misses the format you asked for, the charge is refunded and the receipt’s refund field says so. stream: true is accepted on every model. Tool calling depends on the base model; each model page states whether its build takes it.
response = client.chat.completions.create( model="glm-5.3-uncensored", messages=[{"role": "user", "content": "Return the three OWASP Top 10 categories most likely on a login form as JSON with keys category and first_test."}], response_format={"type": "json_object"},)When it fails
401 invalid_api_key: wrong or revoked key. Recopy it from the console.402 insufficient_balance: too little credit for this request.402 monthly_limit_reached: the monthly cap you set on the key is used up.404 model_not_found: that id is not on the models page. Compare the spelling.429 rate_limited: the key’s rate limit tripped; wait as long asretry-aftersays.- Nothing is charged for a request that fails before a model answers.
Questions
The API answers the Anthropic messages format too; the Claude Code setup page shows that path. This guide stays on the OpenAI format because every listed build answers it, from the OpenAI SDKs, the Vercel AI SDK, LiteLLM or plain HTTP. See the Claude Code setup page.
Yes. Build a second client with baseURL https://api.pentestllm.ai/v1 and this key, and leave your default client and its variables untouched.
Whatever you set per key in the console; a 429 carries retry-after. Beyond the balance itself there is no account-wide ceiling.
On the models page, or from GET /v1/models with your key, which returns exactly the ids that key may call. 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.