Use PentAGI with a private, uncensored API

Connect PentAGI to the private Morse API, uncensored models included: set it up, pick a model, and check it works.

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

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 PentAGI 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 PentAGI's .env file, which its Docker Compose setup reads.

Set it up with a prompt

Paste this into a coding agent, such as Claude Code or Codex, and it sets up PentAGI for you. Or set it up by hand, below.

Setup prompt
Set up PentAGI to use Morse.

1. Use the OpenAI-compatible endpoint https://inference.trymorse.ai/v1
2. Read the key from the MORSE_API_KEY environment variable.
3. Default to the model z-ai/glm-5.3-uncensored.
4. Follow https://trymorse.ai/inference/docs/tools/pentagi, then run its check.

Change only PentAGI's settings. Leave everything else as it is.

Set up PentAGI

  1. Point PentAGI's custom provider at Morse

    In the .env file beside PentAGI's docker-compose.yml, set the custom provider's lines:

    .env
    LLM_SERVER_URL=https://inference.trymorse.ai/v1
    LLM_SERVER_KEY=sk_morse_...
    LLM_SERVER_MODEL=z-ai/glm-5.3-uncensored
    LLM_SERVER_CONFIG_PATH=
    LLM_SERVER_PROVIDER=
    • LLM_SERVER_URL keeps /v1. PentAGI adds /chat/completions itself.
    • With LLM_SERVER_CONFIG_PATH empty, every agent runs on LLM_SERVER_MODEL.
    • Leave LLM_SERVER_PROVIDER empty. It adds a prefix to the model id, for LiteLLM.

    Keep EMBEDDING_* on your own embedding provider, or set EMBEDDING_PROVIDER=none.

  2. Restart PentAGI

    In the same folder, run:

    Terminal
    docker compose up -d

    Then open https://localhost:8443 and start a flow.

Which model to pick

ModelContextInput / outputWhy
z-ai/glm-5.3-uncensored1M$1.75 / $5Uncensored, takes tools and JSON mode, and runs only in attested enclaves.
qwen/qwen3.8-27b-uncensored256K$0.35 / $1.75Uncensored and cheaper, with tools and JSON mode in an attested enclave.
google/gemma-4-26b-a4b-uncensored256K$0.175 / $0.85Uncensored, and the cheapest here, for short flows.

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

Check it works

Run PentAGI's provider tester on three agents. It sends about 23 requests, with tools and JSON mode:

Terminal
docker exec -it pentagi /opt/pentagi/bin/ctester \
  -agents simple,simple_json,primary_agent -groups basic,json

It prints [PASS] for each test that passed, then a Total: line. Read that line: the tester exits with 0 even when tests fail.

Keep it private

Set a privacy floor on PentAGI'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
failed to select primary docker image via llm callUse a model from the table: the first request of a flow is a tool call.
400 setting_not_forwardedPentAGI sends temperature, top_p, and n. Turn on Let my settings reach the model host on the key's page in the console. See Settings.
401 invalid_api_keyCheck the key you gave PentAGI 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.