Connect Strix to the private Morse API: set it up, pick a model, and check it works. Updated November 30, 2026.

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

# Use Strix with a private API

Give [Strix](https://github.com/usestrix/strix) 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 Strix 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). Keep the key in your environment, where Strix reads it.

Terminal

```
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 Strix for you. Or set it up by hand, below.

Setup prompt

```
Set up Strix 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 deepseek/deepseek-v4.1-flash-1017-abliterated.
4. Follow https://trymorse.ai/inference/docs/tools/strix, then run its check.

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

## Set up Strix

1. Point Strix at MorseUse Strix only on code, apps, and servers you own or are authorized to test. Morse's [acceptable-use policy](https://trymorse.ai/terms) bans creating malware and attacking systems or people you're not authorized to test.Strix reads its model from four environment variables. `STRIX_LLM` takes a model in LiteLLM's format: `openai/` says the endpoint speaks the OpenAI API, and the rest is the Morse model id.Terminal`export STRIX_LLM="openai/deepseek/deepseek-v4.1-flash-1017-abliterated" export LLM_API_BASE="https://inference.trymorse.ai/v1" export LLM_API_KEY="$MORSE_API_KEY" export STRIX_API_TYPE="chat_completions"``STRIX_API_TYPE` holds Strix to chat completions, the API Morse serves for these models. Once Strix reaches the model, it saves these settings to `~/.strix/cli-config.json`, the key too, readable only by you. The next run remembers them.
2. Give Strix the model's price (optional)Strix can't look up a Morse model's price, so its run report and `--max-budget` count it as free. Give it the price per million tokens:Terminal`export STRIX_LLM_INPUT_COST_PER_MTOK=0.5 export STRIX_LLM_OUTPUT_COST_PER_MTOK=1.5 export STRIX_LLM_CACHED_INPUT_COST_PER_MTOK=0.05`These are `deepseek/deepseek-v4.1-flash-1017-abliterated`'s prices. For another model, use its prices from the table below.
3. Run a scanStrix runs its tools in a Docker sandbox, so start Docker first. Then point it at a folder of your own code:Terminal`strix --target ./app-directory`

## 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 big codebases. |
| `moonshotai/kimi-k3.1-pro-uncensored` | 1M | $5 / $18.75 | Uncensored, and the strongest reasoner here for long agent runs. |
| `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](https://trymorse.ai/inference/models).

## Check it works

Run a quick scan without the interface. Strix first checks for Docker and pulls its sandbox image. Then it checks that it can reach the model, and stops with `LLM CONNECTION FAILED` if the base URL, key, or model is wrong.

```
strix -n --target ./app-directory --scan-mode quick
```

Findings, or a clean finish, show that Morse took the requests and their tools.

## Keep it private

Set a privacy floor on Strix'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 |
| --- | --- |
| `LLM CONNECTION FAILED` | Check that `LLM_API_BASE` is `https://inference.trymorse.ai/v1`. Check that `STRIX_LLM` is `openai/` and then the model id, exactly as the table writes it. |
| The agent prints tool calls as text and makes no progress | Use a model from the table: each takes tools. On a key with a privacy floor of `tee`, use one whose TEE endpoint takes tools. |
| The run stops partway on a long scan | Raise the key's spend limit. To spend less per turn, have the model reason less: `export LLM_EXTRA_BODY='{"reasoning_effort":"low"}'`. Strix sends `STRIX_REASONING_EFFORT` only to models it can look up, so it doesn't change a Morse model. |
| `401 invalid_api_key` | Check that `MORSE_API_KEY` is set where Strix 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](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).
