An agent that halts a red team exercise to question whether you are allowed to read your own scan output is a liability. OpenClaw takes a custom provider in ~/.openclaw/openclaw.json: a base URL, the Chat Completions adapter, a key reference and the model ids. With that single block a security-tuned or abliterated build drives the agent, tool calls for files and shell included, billed per token under the PentestLLM name. The same ids also work in Hermes Agent and OpenCode.
What you need
OpenClaw installed with its Gateway running, a key from the console, and an editor open on ~/.openclaw/openclaw.json. That file is JSON5, so comments and trailing commas are legal, and the Gateway watches it: most changes take effect the moment you save. A custom provider is a single entry under models.providers holding a base URL, an API adapter, a key reference and the list of models you intend to call. The reference ${PENTESTLLM_API_KEY} pulls the key from the environment, so the key itself never lands in the file. To try a security build before any of this, the home page prompt box gives a few free turns and the playground runs the same catalog.
Shortest path to a first reply
- Make a key for OpenClaw alone, so its traffic is easy to pick out on the usage page when you reconcile an engagement, and place it where OpenClaw actually looks for the variable: the process environment or the global env file. A
.envin your working directory is not read for provider keys.
# ~/.openclaw/.envPENTESTLLM_API_KEY=sk-ptl-live-…- Paste the block into
openclaw.json. Theinput,contextWindowandmaxTokensfields on each entry are taken from the catalog wherever it publishes them. Any further id from the models page belongs in the same array with, at minimum, itsid:
// ~/.openclaw/openclaw.json{ agents: { defaults: { model: { primary: "pentestllm/glm-5.3-uncensored" } }, }, models: { mode: "merge", providers: { pentestllm: { baseUrl: "https://api.pentestllm.ai/v1", apiKey: "${PENTESTLLM_API_KEY}", api: "openai-completions", models: [ { id: "glm-5.3-uncensored", name: "GLM-5.3 Uncensored" }, { id: "glm-5.3-flash-uncensored", name: "GLM-5.3 Flash Uncensored" }, { id: "deepseek-v4.1-flash-abliterated", name: "DeepSeek V4.1 Flash Abliterated" }, { id: "deepseek-v4-pro-uncensored", name: "DeepSeek V4 Pro Uncensored" }, { id: "glm-5.3-abliterated", name: "GLM-5.3 Abliterated" }, { id: "kimi-k3.1-pro-uncensored", name: "Kimi K3.1 Pro Uncensored", contextWindow: 1048576, maxTokens: 131072 }, ], }, }, },}- See what OpenClaw made of it, then start a conversation:
openclaw models list --provider pentestllmopenclaw models statusmodels list --provider pentestllm echoes the ids you declared and models status reports the resolved primary model with its auth state. Swap the default later with openclaw models set pentestllm/glm-5.3-flash-uncensored. A first message, for instance asking the agent to read a scan log and group the findings by host, lands on the console’s usage page within seconds, token counts and charge included.
Each field of the entry
- baseUrl
- https://api.pentestllm.ai/v1keep the trailing /v1; OpenClaw appends /chat/completions itself
- apiKey
- ${PENTESTLLM_API_KEY}the full sk-ptl- key, resolved from the environment when OpenClaw starts
- api
- openai-completionsthe Chat Completions adapter; every build in the catalog speaks it
- models
- [{ id, name, … }]the ids this provider exposes; an id with no entry here cannot be referenced anywhere
- mode
- mergeadds this provider beside OpenClaw's bundled ones; replace would remove them
- agents.defaults.model.primary
- pentestllm/glm-5.3-uncensoredthe build OpenClaw opens with, written as provider/model
Which build to start with
On each turn of an agent session the conversation and all tool output go back to the model, so the input rate is what you are really paying for. Where an entry omits a field, OpenClaw substitutes its own defaults: input: ["text"], reasoning: false, a 200,000-token context budget when none is declared, and its own output ceiling. The cost column below prices a single turn of 30,000 tokens in and 1,000 out from the catalog as of 2026-11-17. OpenClaw sends no prompt-cache hints to a custom provider, so budget at the full input rate.
| Build | Single turn | Session of 40 turns |
|---|---|---|
| GLM-5.3 Uncensored | $0.0093 | $0.37 |
| GLM-5.3 Flash Uncensored | $0.0035 | $0.14 |
| DeepSeek V4.1 Flash Abliterated | $0.03 | $1.09 |
| DeepSeek V4 Pro Uncensored | $0.03 | $1.24 |
| GLM-5.3 Abliterated | $0.07 | $2.79 |
| Kimi K3.1 Pro Uncensored | $0.04 | $1.63 |
| GLM-5.3 Uncensored | Uncensored | $0.282 | $0.846 |
| GLM-5.3 Flash Uncensored | Uncensored | $0.1053 | $0.3685 |
| DeepSeek V4.1 Flash Abliterated | Abliterated | $0.8488 | $1.6975 |
| DeepSeek V4 Pro Uncensored | Uncensored | $0.97 | $1.94 |
| GLM-5.3 Abliterated | Abliterated | $2.1825 | $4.365 |
| Kimi K3.1 Pro Uncensored | Uncensored | $1.164 | $5.82 |
If the agent’s job is mostly reviewing code for vulnerabilities, the coding guide compares the code builds and prices a full day on each. The AI pentesting page covers where an agent fits in an engagement.
Confirm it works
Prove the key and the endpoint from the shell before you blame OpenClaw. The -i flag shows the response headers, which carry a request id and, on a non-streamed reply, the charge in USD.
curl -i https://api.pentestllm.ai/v1/chat/completions \ -H "Authorization: Bearer $PENTESTLLM_API_KEY" \ -H "Content-Type: application/json" \ -d '{"model": "glm-5.3-uncensored", "max_tokens": 16, "messages": [{"role": "user", "content": "Reply with the single word ok."}]}'When something fails
${PENTESTLLM_API_KEY}stays unresolved and the log warns about it: the variable is set in neither of the two places OpenClaw reads (a project-folder.envdoes not count). Export it, or add the line to~/.openclaw/.envand save.- A ref like
pentestllm/glm-5.3-flash-uncensoredis rejected: that id has nomodels[]entry under the provider. Add one, even if it is only theid. 401 invalid_api_key: bad or revoked key. Copy a fresh one from the console and verify which variable it ends up in.402 insufficient_balance: the balance cannot cover this call; add credit in the console. A402 monthly_limit_reachedinstead means the key reached the monthly spend ceiling you gave it.404 model_not_found: the id is not on the models page. Check the part of the ref after the slash.429 rate_limited: the key is over its rate limit. Readretry-afteron the response.- The Gateway will not come up after your edit: the file fails schema validation. OpenClaw rejects unknown keys, so recheck every field name, or let
openclaw doctor --fixrepair it.
Sources
Field names and defaults come from OpenClaw’s custom providers documentation, read 2026-11-06. Prices come from the live catalog when the page renders.
Questions
One models.providers.pentestllm entry in ~/.openclaw/openclaw.json: baseUrl https://api.pentestllm.ai/v1, api "openai-completions", apiKey "${PENTESTLLM_API_KEY}" and a models array. Then point agents.defaults.model.primary at pentestllm/<model-id>.
In the environment variable that apiKey names, PENTESTLLM_API_KEY here. OpenClaw checks the process environment first and ~/.openclaw/.env second. It skips provider keys in a working-directory .env, and the key is never written into openclaw.json.
Each model of a custom provider needs its own models[] entry with at least an id. agents.defaults.models only carries aliases and metadata; it registers nothing. Add the entry, save, and confirm with openclaw models list --provider pentestllm.
All of them. Each id on the models page serves /v1/chat/completions in OpenAI format under one shared key, so any id can go into the models array, spelled as the page spells it. See the models page.
You pay per token at the model’s listed price out of prepaid credit, with no subscription required. The table above prices a typical agent turn per build at the current rate. If a response reports cached input tokens, they are charged at that model’s discounted cache price where one exists.
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.