Use Strix with a private API

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

Give 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. Then one tool can't spend all your credits. See Limit a key. 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 Morse

    Use Strix only on code, apps, and servers you own or are authorized to test. Morse's acceptable-use policy 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 scan

    Strix 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

ModelContextInput / outputWhy
deepseek/deepseek-v4.1-flash-1017-abliterated1M$0.50 / $1.50Uncensored, takes tools on its TEE endpoint too, and has a long context for big codebases.
moonshotai/kimi-k3.1-pro-uncensored1M$5 / $18.75Uncensored, and the strongest reasoner here for long agent runs.
z-ai/glm-5.3-uncensored1M$1.75 / $5Uncensored, 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

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.

Terminal
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 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
LLM CONNECTION FAILEDCheck 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 progressUse 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 scanRaise 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_keyCheck that MORSE_API_KEY is set where Strix starts, and that the key 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.