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

Page: https://trymorse.ai/inference/docs/tools/pentagi

# Use PentAGI with a private, uncensored API

Give [PentAGI](https://github.com/vxcontrol/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](https://trymorse.ai/inference/uncensored).

**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](https://console.trymorse.ai). Then one tool can't spend all your credits. See [Limit a key](https://trymorse.ai/inference/docs/authentication#limits).

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 MorseIn 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 PentAGIIn the same folder, run:Terminal`docker compose up -d`Then open `https://localhost:8443` and start a flow.

## Which model to pick

| Model | Context | Input / output | Why |
| --- | --- | --- | --- |
| `z-ai/glm-5.3-uncensored` | 1M | $1.75 / $5 | Uncensored, takes tools and JSON mode, and runs only in attested enclaves. |
| `qwen/qwen3.8-27b-uncensored` | 256K | $0.35 / $1.75 | Uncensored and cheaper, with tools and JSON mode in an attested enclave. |
| `google/gemma-4-26b-a4b-uncensored` | 256K | $0.175 / $0.85 | Uncensored, 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](https://trymorse.ai/inference/models).

## 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](https://trymorse.ai/inference/docs/privacy-tiers) and [Provider routing](https://trymorse.ai/inference/docs/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](https://trymorse.ai/inference/docs/sealed-api-keys).

## If something goes wrong

| What you see | What to do |
| --- | --- |
| `failed to select primary docker image via llm call` | Use a model from the table: the first request of a flow is a tool call. |
| `400 setting_not_forwarded` | PentAGI 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](https://trymorse.ai/inference/docs/api/parameters#settings). |
| `401 invalid_api_key` | Check the key you gave PentAGI in full, and that it 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](https://trymorse.ai/inference/docs/pricing#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](https://trymorse.ai/inference/docs/api/errors). For other tools, see [Tools and coding agents](https://trymorse.ai/inference/docs/tools).
