Use PwnDoc with a private API

Connect PwnDoc to the private Morse API: set it up, pick a model, and check it works.

Give PwnDoc the base URL https://inference.trymorse.ai/v1 and a Morse API key. It calls the OpenAI API.

Before you start

Make a key for PwnDoc alone, with a spend limit, under API keys in the console. Then one tool can't spend all your credits. See Limit a key.

You'll paste the key into PwnDoc's AI settings. PwnDoc shows it masked, and never sends it back to the browser.

Set up PwnDoc

  1. Turn on AI in PwnDoc

    PwnDoc writes penetration-test reports. Its AI integration drafts finding text and checks reports for quality.

    Use it for reports on authorized tests only. Morse's acceptable-use policy bans creating malware and attacking systems or people you're not authorized to test.

    AI arrived in PwnDoc 1.7.0, so update first if you run an older version. As an admin, open Settings and switch on AI Integration in the card's header.

  2. Enter Morse's details on the OpenAI tab

    PwnDoc's OpenAI tab works with any OpenAI-compatible API. Fill in:

    SettingValue
    OpenAI Base URLhttps://inference.trymorse.ai/v1, with nothing after /v1
    OpenAI Modeldeepseek/deepseek-v4.1-flash-1017-abliterated
    OpenAI API KeyYour Morse key

    OpenAI is PwnDoc's default provider, so every AI button uses Morse. If you changed the default, tick Set as default provider on the OpenAI tab. Then choose Save settings.

  3. Keep client data in an enclave

    A report holds a client's hostnames, credentials, and weaknesses. For client data, give PwnDoc's key a privacy floor of tee. Then every request runs in an attested enclave or is refused.

Which model to pick

ModelContextInput / outputWhy
deepseek/deepseek-v4.1-flash-1017-abliterated1M$0.50 / $1.50Uncensored, so it writes exploitation steps plainly, and runs in an attested enclave on a TEE key.
z-ai/glm-5.3-uncensored1M$1.75 / $5Uncensored, and runs only in attested enclaves, for client data that must stay sealed.
z-ai/glm-5.3-flash-uncensored1M$0.225 / $1Uncensored, and the cheapest here, for QA runs over many findings.

Prices are in dollars per million tokens, on each model's default endpoint. Every model is on the models page.

Check it works

Choose Test connection on the OpenAI tab. PwnDoc sends Morse a short request and shows Connection successful with the model that answered. It tests what's in the form, so you can test before you save. Then open an audit, go to a finding, and use the AI assistant button on its description to draft text.

Keep it private

Set a privacy floor on PwnDoc'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 seeWhat to do
Test connection shows HTTP 404Check that OpenAI Base URL is https://inference.trymorse.ai/v1, with no /chat/completions after it.
The AI buttons are missingCheck that AI Integration is switched on. Then check that the user's role has the audits:ai-assist permission. PwnDoc's built-in user role doesn't, so grant it through a custom role.
401 invalid_api_keyCheck the key you gave PwnDoc in full, and that it isn't revoked.
402 insufficient_balance or key_spend_limit_reachedAdd credits, or raise the key's spend limit. A request holds credit for its output limit before it starts: see Holds.
404 model_not_foundUse 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.