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

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

# Use CLIProxyAPI with a private, uncensored API

Give [CLIProxyAPI](https://github.com/router-for-me/CLIProxyAPI) the base URL `https://inference.trymorse.ai/v1` and a Morse API key. It calls the OpenAI API.

The same key also calls 12 uncensored models. [See them](https://trymorse.ai/inference/uncensored).

## Before you start

Make a key for CLIProxyAPI 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 CLIProxyAPI's `config.yaml`, which reads it as written.

## Set it up with a prompt

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

Setup prompt

```
Set up CLIProxyAPI 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 qwen/qwen3-coder.
4. Follow https://trymorse.ai/inference/docs/tools/cliproxyapi, then run its check.

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

## Set up CLIProxyAPI

1. Add Morse as a providerAdd Morse under `api-keys.openai-compatibility` in `config.yaml`, next to the binary. Paste your Morse key in `api-key`.config.yaml`config-version: 8 server: host: "127.0.0.1" port: 8317 access: api-keys: - "a-key-you-choose" api-keys: openai-compatibility: - name: "morse" base-url: "https://inference.trymorse.ai/v1" keys: - api-key: "sk_morse_..." models: - name: "qwen/qwen3-coder" - name: "moonshotai/kimi-k3.1-pro" - name: "z-ai/glm-5.3" - name: "deepseek/deepseek-v4-pro-0813" - name: "z-ai/glm-5.3-flash"``base-url` keeps `/v1`. CLIProxyAPI adds `/chat/completions` itself.Each `name` is a model id as Morse writes it. Your tools call the model by the same id.`access.api-keys` holds the keys your tools send to CLIProxyAPI. Choose your own, not your Morse key.
2. Start CLIProxyAPIIn the binary's folder, run:Terminal`./cli-proxy-api -config config.yaml`
3. Point your tools at CLIProxyAPIGive each tool the base URL `http://127.0.0.1:8317/v1` and a key from `access.api-keys`. CLIProxyAPI takes chat completions, Messages, and Responses requests, and sends each to Morse as a chat completion.

## Which model to pick

| Model | Context | Input / output | Why |
| --- | --- | --- | --- |
| `qwen/qwen3-coder` | 262.1K | $0.375 / $1.25 | Qwen's coding model. It doesn't reason, so it starts writing sooner. |
| `moonshotai/kimi-k3.1-pro` | 1M | $2 / $10 | Reasons, and reads images. |
| `z-ai/glm-5.3` | 1M | $1.40 / $4.40 | Reasons, and takes tools at TEE too. |
| `deepseek/deepseek-v4-pro-0813` | 1M | $1.32 / $3.96 | Reasons, at a lower price. |
| `z-ai/glm-5.3-flash` | 1M | $0.15 / $0.50 | Cheap and fast for small edits, and takes tools at TEE too. |

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

Put the key you chose under `access.api-keys` in `CLIPROXYAPI_KEY`, and send a request through CLIProxyAPI:

Terminal

```
curl http://127.0.0.1:8317/v1/chat/completions \
  -H "Authorization: Bearer $CLIPROXYAPI_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model": "qwen/qwen3-coder", "messages": [{"role": "user", "content": "Say hello"}]}'
```

The response comes from Morse. `GET http://127.0.0.1:8317/v1/models` lists each model in your `config.yaml`.

## Keep it private

Set a privacy floor on CLIProxyAPI'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 |
| --- | --- |
| `unknown provider for model` | Call the model by its `name` in `config.yaml`. A model with an `alias` answers only to the alias. |
| `{"error":"Invalid API key"}` | Send a key from `access.api-keys`, not your Morse key. |
| `401 invalid_api_key` | Check the key you gave CLIProxyAPI 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).
