Use PentestGPT with a private, uncensored API
Connect PentestGPT to the private Morse API, uncensored models included: set it up, pick a model, and check it works.
Give PentestGPT the base URL https://inference.trymorse.ai and a Morse API key. It calls Anthropic's Messages API, which Morse serves too.
The same key also calls 17 uncensored models. See them.
Cybersecurity: Test, monitor, and defend your systems without safety filters blocking real security work.
Before you start
Make a key for PentestGPT alone, with a spend limit, under API keys in the console. Then one tool can't spend all your credits. See Limit a key. Keep the key in your environment, where PentestGPT reads it.
export MORSE_API_KEY="sk_morse_..."Set it up with a prompt
Paste this into a coding agent, such as Claude Code or Codex, and it sets up PentestGPT for you. Or set it up by hand, below.
Set up PentestGPT to use Morse.
1. Use the Anthropic Messages endpoint https://inference.trymorse.ai
2. Read the key from the MORSE_API_KEY environment variable.
3. Default to the model deepseek/deepseek-v4.1-flash-1017-abliterated.
4. Follow https://trymorse.ai/inference/docs/tools/pentestgpt, then run its check.
Change only PentestGPT's settings. Leave everything else as it is.Set up PentestGPT
Install PentestGPT
Install
uvfirst. Then install PentestGPT's agent with its Claude Code backend, which brings its own copy of Claude Code:Terminal git clone https://github.com/GreyDGL/PentestGPT.git cd PentestGPT/pentestgpt_agent uv sync --extra claudePoint Claude Code at Morse
PentestGPT starts Claude Code with your shell's environment, so set these in the shell you run it from:
Terminal export ANTHROPIC_BASE_URL=https://inference.trymorse.ai export ANTHROPIC_AUTH_TOKEN="$MORSE_API_KEY" export ANTHROPIC_MODEL=deepseek/deepseek-v4.1-flash-1017-abliterated export ANTHROPIC_DEFAULT_OPUS_MODEL=deepseek/deepseek-v4.1-flash-1017-abliterated export ANTHROPIC_DEFAULT_SONNET_MODEL=deepseek/deepseek-v4.1-flash-1017-abliterated export ANTHROPIC_DEFAULT_HAIKU_MODEL=deepseek/deepseek-v4.1-flash-1017-abliteratedANTHROPIC_BASE_URLis Morse's address without/v1: Claude Code adds/v1/messagesitself. The four model lines send all of Claude Code's work to one model. For more of its settings, see Claude Code's guide.Run the agent
In
pentestgpt_agent, name the model with--model, and give the agent a goal and a target:Terminal uv run pentestgpt-agent --backend claude --model deepseek/deepseek-v4.1-flash-1017-abliterated \ --goal "Assess the target for exploitable vulnerabilities." --target 10.10.11.234
Which model to pick
| Model | Context | Input / output | Why |
|---|---|---|---|
deepseek/deepseek-v4.1-flash-1017-abliterated | 1M | $0.50 / $1.50 | Uncensored, takes tools on its TEE endpoint too, and has a long context for long runs. |
moonshotai/kimi-k3.1-pro-uncensored | 1M | $5 / $18.75 | Uncensored, and the strongest reasoner here for multi-stage attacks. |
z-ai/glm-5.3-uncensored | 1M | $1.75 / $5 | Uncensored, runs only in attested enclaves, and takes tools there. |
Prices are in dollars per million tokens, on each model's default endpoint. Every model is on the models page.
Check it works
The agent prints one line when it ends, TRIAL_RESULT= and then JSON. "status": "completed" shows that Morse took the requests and their tools. Each run's files are in runs/.
Keep it private
Set a privacy floor on PentestGPT's key to hold it to a tier, such as TEE. Without a floor, a request runs on its model's default privacy tier. The floor only decides which endpoints serve the requests. See Privacy tiers and Provider routing.
On a plain API call, TLS ends inside Morse's door, an attested enclave, which seals the request before the relay receives it. A plain client checks the door's certificate, not its attestation. To check the attestation yourself, see Sealed API keys.
If something goes wrong
| What you see | What to do |
|---|---|
Claude Code is not authenticated | Check that ANTHROPIC_AUTH_TOKEN is set in the shell you run PentestGPT from, and that the key isn't revoked. PentestGPT shows this for every 401, and doesn't read ~/.claude/settings.json. |
Supervisor did not return a structured object | Use a model from the table: PentestGPT needs every step's answer as a tool call. |
401 invalid_api_key | Check that MORSE_API_KEY is set where PentestGPT starts, and that the key isn't revoked. |
402 insufficient_balance or key_spend_limit_reached | Add credits, or raise the key's spend limit. A request holds credit for its output limit before it starts: see Holds. |
404 model_not_found | Use a model's id exactly as the table above writes it, with the part before the slash. |
Every code is in Error codes. For other tools, see Tools and coding agents.