# Morse API docs, in full > Make a key and send your first request to an OpenAI-compatible API for 89 chat models, 86 of them open-weight. Every page of https://trymorse.ai/inference/docs as Markdown, in the order https://trymorse.ai/inference/docs/llms.txt lists them. Each page starts at its description, then its Page line. --- The Morse API docs: a quickstart, privacy tiers and provider routing, streaming and tools, SDK guides, and the full API reference. Updated December 4, 2026. Page: https://trymorse.ai/inference/docs # Quickstart Make a key and send your first request to an OpenAI-compatible API for 89 chat models, 86 of them open-weight. Morse is an OpenAI-compatible API for 89 chat models, 86 of them open-weight, from DeepSeek, Kimi, and GLM to Qwen, MiniMax, and gpt-oss. Morse calls every provider from an attested enclave that keeps no prompt or response and never tells a provider who you are. Base URL ``` https://inference.trymorse.ai/v1 ``` 1. Make a keyIn the [console](https://console.trymorse.ai), choose **Create key**, name the key, choose **Create**, and copy the key it shows. Making a key needs a verified email, and the console shows the key only once.Add credits before your first call: a key pays from them.A $0 balance returns [`402 insufficient_balance`](https://trymorse.ai/inference/docs/api/errors#status-402): add credits from $5 at [console.trymorse.ai/credits](https://console.trymorse.ai/credits).Terminal`export MORSE_API_KEY="sk_morse_..."` 2. Send a requestGive any OpenAI client the base URL, your key, and a Morse model.cURL Python TypeScript`curl https://inference.trymorse.ai/v1/chat/completions \ -H "Authorization: Bearer $MORSE_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "model": "z-ai/glm-5.3-flash", "messages": [{"role": "user", "content": "Hello"}] }'`The response is a `chat.completion` object, in OpenAI's format. ## Files for tools and agents - [OpenAPI spec](https://trymorse.ai/inference/docs/openapi.json): the whole API as an OpenAPI 3.1 file. - [llms.txt](https://trymorse.ai/inference/docs/llms.txt): every page of the docs, linked. - [llms-full.txt](https://trymorse.ai/inference/llms-full.txt): every page of the docs in one Markdown file. - [agents.md](https://trymorse.ai/inference/agents.md): the base URL, the auth header, and each common error with its fix, for coding agents. ## Next steps [OpenAI compatibility Use the OpenAI SDKs with Morse, switch from OpenAI or OpenRouter, and see the parameters Morse treats differently.](https://trymorse.ai/inference/docs/openai-compatibility) [Models Model ids, how to list them, and what each model can do on each endpoint.](https://trymorse.ai/inference/docs/models) [Privacy tiers Set a privacy floor on a request, and see what Anonymous, Private, and TEE each protect.](https://trymorse.ai/inference/docs/privacy-tiers) --- Use the OpenAI SDKs with Morse, switch from OpenAI or OpenRouter, and see the parameters Morse treats differently. Updated November 30, 2026. Page: https://trymorse.ai/inference/docs/openai-compatibility # OpenAI compatibility Give the official OpenAI SDK Morse's base URL and your Morse key, and name a Morse model. Python TypeScript ``` pip install openai ``` ``` import os from openai import OpenAI client = OpenAI( base_url="https://inference.trymorse.ai/v1", api_key=os.environ["MORSE_API_KEY"], ) ``` ## Switch from OpenAI or OpenRouter Change the base URL, the key, and the model. From OpenAI From OpenRouter ``` client = OpenAI( base_url="https://inference.trymorse.ai/v1", # was https://api.openai.com/v1 api_key=os.environ["MORSE_API_KEY"], # was OPENAI_API_KEY ) client.chat.completions.create( model="moonshotai/kimi-k3.1-pro", # or openai/gpt-oss-120b messages=messages, ) ``` For which OpenRouter ids Morse serves, see [Switch from OpenRouter to Morse](https://trymorse.ai/inference/docs/switch/openrouter). ## Model ids Ids are `vendor/model`, lowercase, mostly as OpenRouter names them: `moonshotai/kimi-k3`, `z-ai/glm-5.3`. The older short names, such as `glm-5.3`, still work and keep the tier they had. See [Models](https://trymorse.ai/inference/docs/models). ## What works the same - `messages`, with text, images as `data:` URIs, and tool results - `stream` and `stream_options.include_usage` - `tools`, `tool_choice`, and `parallel_tool_calls`, on Private and most TEE endpoints. See [Tools on TEE](https://trymorse.ai/inference/docs/tool-calling#tiers). - `max_tokens`, `max_completion_tokens`, and `reasoning_effort` - The error shape, and the status codes the SDKs retry ## What's different - A new key sends `temperature`, `top_p`, `stop`, `seed`, and `n` of 1 to the provider as you send them. To stop a key sending them, see [Settings](https://trymorse.ai/inference/docs/api/parameters#settings). - Images and files go in a message as `data:` URIs. A link to a URL returns `400 remote_media`. - Each stream chunk carries a random `obfuscation` string. Ignore it. See [Streaming](https://trymorse.ai/inference/docs/streaming). - Of OpenRouter's `provider` parameters, Morse reads `min_privacy`, `zdr`, `data_collection`, `allow_fallbacks`, and `max_price`. Morse ignores `order` and `sort`, since it picks the provider itself. It refuses `only` and `ignore` with `400 provider_choice_unsupported`. See [Provider routing](https://trymorse.ai/inference/docs/provider-routing). - OpenRouter's `reasoning` object works as it does there. A `models` list of more than one model returns `400 unsupported_parameter`: Morse fails over between one model's providers, never to another model. ## Send Morse's own parameters In Python, put them in `extra_body`. In TypeScript, add them to the request. The SDKs pass unknown parameters through. Python ``` client.chat.completions.create( model="moonshotai/kimi-k3.1-pro", messages=messages, extra_body={"provider": {"min_privacy": "tee"}}, ) ``` ## The Responses API `client.responses.create` works at the same base URL. Morse stores no response, so send the whole conversation each time. See [OpenAI Responses API](https://trymorse.ai/inference/docs/responses-api). For agents, see [OpenAI Agents SDK](https://trymorse.ai/inference/docs/openai-agents-sdk). ## Retries Keep the SDKs' default of two retries or fewer. They retry a 429 and a 5xx by themselves and read `Retry-After`. Morse bills again for a retried request that reached the model. --- Move from OpenRouter to Morse in two lines: change the base URL and key, keep your model ids. 68 of our 89 ids match OpenRouter's. Updated December 4, 2026. Page: https://trymorse.ai/inference/docs/switch/openrouter # Switch from OpenRouter to Morse To switch from OpenRouter to Morse, change the base URL to `https://inference.trymorse.ai/v1` and use a Morse API key. 68 of Morse's 89 model ids are the same strings OpenRouter uses, so most code keeps its model names. Morse keeps no prompt and no response, on any tier and any plan. A provider sees Morse, never your account. See [What Morse keeps](https://trymorse.ai/inference/docs/data-retention). ## Change two lines Python TypeScript cURL ``` client = OpenAI( - base_url="https://openrouter.ai/api/v1", - api_key=os.environ["OPENROUTER_API_KEY"], + base_url="https://inference.trymorse.ai/v1", + api_key=os.environ["MORSE_API_KEY"], ) completion = client.chat.completions.create( model="moonshotai/kimi-k3.1-pro", # the same id on both messages=[{"role": "user", "content": "Hello"}], ) ``` Make the key under **API keys** in the [console](https://console.trymorse.ai). The OpenAI SDKs and every OpenAI-compatible client take the same two settings. ## Your model ids 68 ids work unchanged, and 21 are on Morse only. Prices are in dollars per million tokens, on each model's default endpoint. OpenRouter's list was read on 2026-11-30. ### The same on OpenRouter (68) | Model id | Model | Input / output | | --- | --- | --- | | `deepseek/deepseek-r1-0528` | DeepSeek R1 0528 | $0.55 / $2.19 | | `deepseek/deepseek-v3.2` | DeepSeek V3.2 | $0.28 / $0.42 | | `deepseek/deepseek-v4-flash` | DeepSeek V4 Flash 0423 | $0.14 / $0.28 | | `deepseek/deepseek-v4-flash-0731` | DeepSeek V4 Flash 0731 | $0.44 / $1.32 | | `deepseek/deepseek-v4-flash-vision-exp` | DeepSeek V4 Flash Vision Exp | $0.55 / $1.65 | | `deepseek/deepseek-v4-pro` | DeepSeek V4 Pro 0423 | $1.625 / $3.25 | | `deepseek/deepseek-v4-pro-0813` | DeepSeek V4 Pro | $1.32 / $3.96 | | `deepseek/deepseek-v4.1-flash` | DeepSeek V4.1 Flash | $0.30 / $1.20 | | `deepseek/deepseek-v4.1-flash-1017` | DeepSeek V4.1 Flash 1017 | $0.30 / $1.20 | | `google/gemma-3-12b-it` | Gemma 3 12B | $0.0625 / $0.1875 | | `google/gemma-3-27b-it` | Gemma 3 27B | $0.10 / $0.20 | | `google/gemma-3-4b-it` | Gemma 3 4B | $0.0625 / $0.125 | | `google/gemma-4-26b-a4b-it` | Gemma 4 26B A4B | $0.15 / $0.60 | | `google/gemma-4-31b-it` | Gemma 4 31B | $0.25 / $0.50 | | `inclusionai/ling-3.0-flash` | Ling 3.0 Flash | $0.075 / $0.225 | | `inclusionai/ling-3.0-flash-vl` | Ling 3.0 Flash VL | $0.075 / $0.225 | | `inclusionai/ling-3.1-flash` | Ling 3.1 Flash | $0.375 / $1.125 | | `meta-llama/llama-3.1-8b-instruct` | Llama 3.1 8B | $0.025 / $0.05 | | `meta-llama/llama-3.3-70b-instruct` | Llama 3.3 70B | $0.125 / $0.40 | | `meta-llama/llama-4-scout` | Llama 4 Scout | $0.125 / $0.375 | | `meta/muse-glimmer-30b` | Muse Glimmer 30B | $0.375 / $1.50 | | `minimax/minimax-m3` | MiniMax M3 | $0.30 / $1.20 | | `mistralai/mistral-nemo` | Mistral Nemo | $0.0363 / $0.0375 | | `mistralai/mistral-small-24b-instruct-2501` | Mistral Small 3 2501 | $0.10 / $0.30 | | `mistralai/mistral-small-3.2-24b-instruct` | Mistral Small 3.2 | $0.10 / $0.30 | | `moonshotai/kimi-k2-0905` | Kimi K2 0905 | $0.75 / $3.125 | | `moonshotai/kimi-k2.6` | Kimi K2.6 | $0.95 / $4 | | `moonshotai/kimi-k3` | Kimi K3 | $3 / $15 | | `moonshotai/kimi-k3.1-pro` | Kimi K3.1 Pro | $2 / $10 | | `nvidia/nemotron-3-super-120b-a12b` | Nemotron 3 Super | $0.0938 / $0.50 | | `nvidia/nemotron-3-ultra-550b-a55b` | Nemotron 3 Ultra | $0.625 / $2.75 | | `nvidia/nemotron-3.5-lightning` | Nemotron 3.5 Lightning | $0.075 / $0.20 | | `nvidia/nemotron-3.5-super-vl` | Nemotron 3.5 Super VL | $0.1875 / $0.625 | | `openai/gpt-oss-120b` | gpt oss 120b | $0.0463 / $0.2125 | | `openai/gpt-oss-20b` | gpt oss 20b | $0.0375 / $0.175 | | `qwen/qwen-2.5-72b-instruct` | Qwen2.5 72B Instruct | $0.45 / $0.50 | | `qwen/qwen3-14b` | Qwen3 14B | $0.35 / $1.40 | | `qwen/qwen3-235b-a22b-2507` | Qwen3 235B A22B Instruct 2507 | $0.23 / $0.92 | | `qwen/qwen3-30b-a3b` | Qwen3 30B A3B | $0.20 / $0.80 | | `qwen/qwen3-32b` | Qwen3 32B | $0.16 / $0.64 | | `qwen/qwen3-coder` | Qwen3 Coder 480B A35B | $0.375 / $1.25 | | `qwen/qwen3-next-80b-a3b-instruct` | Qwen3 Next 80B A3B Instruct | $0.15 / $1.20 | | `qwen/qwen3-vl-235b-a22b-instruct` | Qwen3 VL 235B A22B | $0.40 / $1.60 | | `qwen/qwen3-vl-30b-a3b-instruct` | Qwen3 VL 30B A3B | $0.20 / $0.80 | | `qwen/qwen3.5-27b` | Qwen3.5 27B | $0.30 / $2.40 | | `qwen/qwen3.5-35b-a3b` | Qwen3.5 35B A3B | $0.25 / $2 | | `qwen/qwen3.5-397b-a17b` | Qwen3.5 397B A17B | $0.60 / $3.60 | | `qwen/qwen3.5-9b` | Qwen3.5 9B | $0.125 / $0.1875 | | `qwen/qwen3.6-27b` | Qwen3.6 27B | $0.60 / $3.60 | | `qwen/qwen3.6-35b-a3b` | Qwen3.6 35B A3B | $0.375 / $2.25 | | `qwen/qwen3.8-2.4t-a95b` | Qwen3.8 Max | $2 / $6 | | `qwen/qwen3.8-27b` | Qwen3.8 27B | $0.50 / $3 | | `stepfun/step-3.7-flash` | Step 3.7 Flash | $0.20 / $1.15 | | `stepfun/step-5-preview` | Step 5 Preview | $1 / $2.70 | | `tencent/hy3` | Hy3 | $0.175 / $0.725 | | `tencent/hy4` | Hy4 | $0.834 / $2.501 | | `tencent/hy4-flash` | Hy4 Flash | $0.07 / $0.281 | | `thinkingmachines/inkling-small` | Inkling Small | $0.5625 / $1.50 | | `xiaomi/mimo-v2.6-flash` | MiMo V2.6 Flash | $0.14 / $0.28 | | `xiaomi/mimo-v2.6-pro` | MiMo V2.6 Pro | $0.435 / $0.87 | | `z-ai/glm-4.5-air` | GLM 4.5 Air | $0.20 / $1.10 | | `z-ai/glm-4.6` | GLM 4.6 | $0.60 / $2.20 | | `z-ai/glm-4.7` | GLM 4.7 | $0.60 / $2.20 | | `z-ai/glm-5` | GLM 5 | $1 / $3.20 | | `z-ai/glm-5.1` | GLM 5.1 | $1.40 / $4.40 | | `z-ai/glm-5.2` | GLM 5.2 | $1.40 / $4.40 | | `z-ai/glm-5.3` | GLM 5.3 | $1.40 / $4.40 | | `z-ai/glm-5.3-flash` | GLM 5.3 Flash | $0.15 / $0.50 | ### On Morse only (21) | Model id | Model | Input / output | | --- | --- | --- | | `abliteration/abliterated-model` | Abliterated Model | $1 / $3 | | `abliteration/abliterated-model-large-flash` | Abliterated Large Flash | $1 / $2 | | `abliteration/abliterated-model-large-v2` | Abliterated Large v2 | $3 / $5 | | `amazon/ergo-1.0` | Amazon Ergo 1.0 | $1.20 / $3.60 | | `amazon/ergo-1.0-uncensored` | Amazon Ergo 1.0 Uncensored | $1.25 / $4.20 | | `deepseek-ai/deepseek-v4.1-flash-uncensored` | DeepSeek V4.1 Flash Uncensored | $0.50 / $1.50 | | `deepseek/deepseek-v3` | DeepSeek V3 | $0.32 / $1.10 | | `deepseek/deepseek-v3.1` | DeepSeek V3.1 | $0.56 / $1.68 | | `deepseek/deepseek-v4.1-flash-1017-abliterated` | DeepSeek V4.1 Flash 1017 Uncensored | $0.50 / $1.50 | | `google/gemma-4-26b-a4b-uncensored` | Gemma 4 26B A4B Uncensored | $0.175 / $0.85 | | `inclusionai/ling-3.0-flash-fin` | Ling 3.0 Flash Fin | $0.0938 / $0.275 | | `inclusionai/ling-3.1-flash-uncensored` | Ling 3.1 Flash Uncensored | $0.35 / $1.20 | | `moonshotai/kimi-k2` | Kimi K2 | $0.60 / $2.50 | | `moonshotai/kimi-k3.1-pro-uncensored` | Kimi K3.1 Pro Uncensored | $5 / $18.75 | | `qwen/qwen-2.5-7b-instruct` | Qwen2.5 7B Instruct | $0.125 / $0.25 | | `qwen/qwen3.8-27b-uncensored` | Qwen3.8 27B Uncensored | $0.35 / $1.75 | | `tencent/hy4-uncensored` | Hy4 Uncensored | $1.50 / $4 | | `thinkingmachines/inkling-2-mini-uncensored` | Inkling 2 Mini Uncensored | $0.15 / $0.50 | | `xiaomi/mimo-v2.6-flash-uncensored` | MiMo V2.6 Flash Uncensored | $0.50 / $1.75 | | `z-ai/glm-5.3-flash-uncensored` | GLM 5.3 Flash Uncensored | $0.225 / $1 | | `z-ai/glm-5.3-uncensored` | GLM 5.3 Uncensored | $1.75 / $5 | Every model is on the [models page](https://trymorse.ai/inference/models). ## Parameters | OpenRouter sends | On Morse | | --- | --- | | `model` | The same id for the 68 models above. For another, pick a Morse model from the table. | | `messages`, `tools`, `tool_choice`, `stream` | The same. See [What works the same](https://trymorse.ai/inference/docs/openai-compatibility#same). | | `response_format` | Reaches only a model that lists it in `supported_parameters`. See [Structured outputs](https://trymorse.ai/inference/docs/structured-outputs). | | `reasoning` | Works as it does there, and so does `reasoning_effort`. See [Reasoning](https://trymorse.ai/inference/docs/reasoning). | | `provider` | Morse reads `zdr`, `data_collection`, `allow_fallbacks`, and `max_price`, and adds `min_privacy`. See [Provider routing](https://trymorse.ai/inference/docs/provider-routing). | | `models` | A list of more than one model returns `400 unsupported_parameter`. Morse fails over between one model's providers. | | `HTTP-Referer`, `X-Title` | Morse doesn't read these headers, so you can leave them in. | | `:free`, `:nitro` | Drop the suffix. A Morse id has none, and an id with one returns `404 model_not_found`. | Every difference is in [What's different](https://trymorse.ai/inference/docs/openai-compatibility#different). ## Tools you already use In a tool set up for OpenRouter, change the same two settings. Each guide names them: - [Aider](https://trymorse.ai/inference/docs/tools/aider) - [AnythingLLM](https://trymorse.ai/inference/docs/tools/anythingllm) - [Appsmith](https://trymorse.ai/inference/docs/tools/appsmith) - [Baserow](https://trymorse.ai/inference/docs/tools/baserow) - [bolt.diy](https://trymorse.ai/inference/docs/tools/bolt-diy) - [CC Switch](https://trymorse.ai/inference/docs/tools/cc-switch) - [Chatbox](https://trymorse.ai/inference/docs/tools/chatbox) - [Cherry Studio](https://trymorse.ai/inference/docs/tools/cherry-studio) - [Claude Code](https://trymorse.ai/inference/docs/tools/claude-code) - [Claude Cowork](https://trymorse.ai/inference/docs/tools/claude-cowork) - [Cline](https://trymorse.ai/inference/docs/tools/cline) - [CLIProxyAPI](https://trymorse.ai/inference/docs/tools/cliproxyapi) - [Cloudflare AI Gateway](https://trymorse.ai/inference/docs/tools/cloudflare-ai-gateway) - [Cloudflare Workers](https://trymorse.ai/inference/docs/tools/cloudflare-workers) - [Codex](https://trymorse.ai/inference/docs/tools/codex) - [Continue](https://trymorse.ai/inference/docs/tools/continue) - [Copilot for Obsidian](https://trymorse.ai/inference/docs/tools/copilot-for-obsidian) - [Cowrie](https://trymorse.ai/inference/docs/tools/cowrie) - [Crush](https://trymorse.ai/inference/docs/tools/crush) - [Cursor](https://trymorse.ai/inference/docs/tools/cursor) - [Dify](https://trymorse.ai/inference/docs/tools/dify) - [Dyad](https://trymorse.ai/inference/docs/tools/dyad) - [Flowise](https://trymorse.ai/inference/docs/tools/flowise) - [GitHub Copilot](https://trymorse.ai/inference/docs/tools/github-copilot) - [Goose](https://trymorse.ai/inference/docs/tools/goose) - [Grok CLI](https://trymorse.ai/inference/docs/tools/grok-cli) - [Hermes Agent](https://trymorse.ai/inference/docs/tools/hermes-agent) - [Jan](https://trymorse.ai/inference/docs/tools/jan) - [Kilo Code](https://trymorse.ai/inference/docs/tools/kilo-code) - [LibreChat](https://trymorse.ai/inference/docs/tools/librechat) - [LobeChat](https://trymorse.ai/inference/docs/tools/lobechat) - [n8n](https://trymorse.ai/inference/docs/tools/n8n) - [NocoDB](https://trymorse.ai/inference/docs/tools/nocodb) - [Open WebUI](https://trymorse.ai/inference/docs/tools/open-webui) - [OpenClaw](https://trymorse.ai/inference/docs/tools/openclaw) - [OpenCode](https://trymorse.ai/inference/docs/tools/opencode) - [Pi](https://trymorse.ai/inference/docs/tools/pi) - [promptfoo](https://trymorse.ai/inference/docs/tools/promptfoo) - [PwnDoc](https://trymorse.ai/inference/docs/tools/pwndoc) - [r2ai](https://trymorse.ai/inference/docs/tools/r2ai) - [SillyTavern](https://trymorse.ai/inference/docs/tools/sillytavern) - [Strands Agents](https://trymorse.ai/inference/docs/tools/strands) - [STRIDE GPT](https://trymorse.ai/inference/docs/tools/stride-gpt) - [Strix](https://trymorse.ai/inference/docs/tools/strix) - [Supabase Edge Functions](https://trymorse.ai/inference/docs/tools/supabase-edge-functions) - [Teable](https://trymorse.ai/inference/docs/tools/teable) - [Typebot](https://trymorse.ai/inference/docs/tools/typebot) - [Windmill](https://trymorse.ai/inference/docs/tools/windmill) - [Zed](https://trymorse.ai/inference/docs/tools/zed) ## What changes for privacy OpenRouter's zero data retention covers the providers OpenRouter sends your prompts to, not OpenRouter itself. OpenRouter's servers read every prompt in plain text, and their code is closed. Morse's enclave runs open-source code you can check, and a request your client encrypts for Morse's enclave can be decrypted only inside that enclave. See the [privacy page](https://trymorse.ai/privacy). ## Check it works List the models with your key, then send one chat completion with an id from the table. cURL ``` curl https://inference.trymorse.ai/v1/models \ -H "Authorization: Bearer $MORSE_API_KEY" curl https://inference.trymorse.ai/v1/chat/completions \ -H "Authorization: Bearer $MORSE_API_KEY" \ -H "Content-Type: application/json" \ -d '{"model": "moonshotai/kimi-k3.1-pro", "messages": [{"role": "user", "content": "Hello"}]}' ``` ## Questions ### Do my OpenRouter model ids work on Morse? 68 of Morse's 89 model ids are the same strings OpenRouter uses, so a request that names one works unchanged on Morse. ### Can I keep using OpenRouter for models Morse doesn't serve? Yes. Keep both keys, and send each request to the API that serves its model. ### How do I pay? Buy credits by card in the Morse console, $5 to $1,000 at a time. A key pays for each request from your credits. --- Send your key as a Bearer token, keep it on a server, and limit what each key can do. Updated November 30, 2026. Page: https://trymorse.ai/inference/docs/authentication # Authentication Send your key in the `Authorization` header of every request: HTTP ``` Authorization: Bearer sk_morse_... ``` Morse also takes the key in an `x-api-key` header, as Anthropic's SDK sends it. Every key starts with `sk_morse_` and ends with a short checksum, so a secret scanner can spot one that leaked. A missing, unknown, or revoked key returns `401 invalid_api_key`. ## Keep it on a server Treat your key as a password: anyone with it can spend your credits. Don't put a key in code that ships to a browser or a phone. Morse stores only a hash of it and shows it once. ## Make and revoke keys Make and revoke keys on the [console](https://console.trymorse.ai)'s API keys page. An account can hold 25 active keys and make 50 a day. Each key shows when it last paid for a request. A revoke is immediate, and it can't be undone. ## Limit a key Give each key only what it needs. Set each limit when you make the key, or later. | Limit | What it does | A refused request returns | | --- | --- | --- | | Spend limit | Caps what the key spends, resetting daily, weekly, monthly, or never. | `402 key_spend_limit_reached` | | Expiry | Stops the key at a time you choose. | `401 api_key_expired` | | Allowed IPs | Admits requests only from up to 100 addresses or CIDR ranges. | `403 ip_not_allowed` | | Privacy floor | Admits only models at this [tier](https://trymorse.ai/inference/docs/privacy-tiers) or above. A new key has no floor, so it admits every model. | `400 privacy_floor_unmet` | `GET /v1/models` lists only the models a key's floor admits. Without a key it lists every model a key can call, so a tool can read the catalog before you give it one. ## Check a key Call `GET /v1/key` with a key to read that key. It returns: - its name, prefix, and limits - what its spend limit has used so far - its account's requests per minute and requests at once - the account's balance, for a key without a spend limit, or `spend_remaining`, what is left of the limit, for a key with one It never returns the secret. It's free, and you may call it 60 times a minute, apart from your plan's limit. Check a key ``` curl https://inference.trymorse.ai/v1/key \ -H "Authorization: Bearer $MORSE_API_KEY" ``` To show a balance in a tool, read `account.balance_micros`. On a key with a spend limit, read `spend_remaining.micros` instead. Divide micros by 1,000,000 for US dollars. The [Key](https://trymorse.ai/inference/docs/api/key) reference lists every value it returns. ## What a key can't do A key calls chat completions, the model list, and the other endpoints in the [API reference](https://trymorse.ai/inference/docs/api). It can read itself, but it can't manage your account: your usage, keys, and purchases answer a key with `401 login_required`. --- Short answers about privacy, prices, limits, and what the API supports. Updated November 30, 2026. Page: https://trymorse.ai/inference/docs/faq # FAQ ## Can Morse read my prompts? Morse keeps no prompt and no response, on any tier and any plan. Morse's relay reads a request you don't seal, then the provider reads it on Private, and the model's enclave on TEE. At NEAR AI and Tinfoil, a gateway enclave that Morse verifies reads it too. See [What the tiers don't protect](https://trymorse.ai/inference/docs/privacy-tiers#limits). ## Which models are served on secure hardware? These 11 models are served on the TEE tier, where Morse verifies the provider's enclave before it sends a request. Set `provider.min_privacy` to `tee` to run a request there or have it refused. At NEAR AI and Tinfoil, a gateway enclave that Morse verifies also reads the prompt. At Phala and Tinfoil, Morse doesn't check the model's hardware. | Model | Id | | --- | --- | | DeepSeek V4.1 Flash 1017 Uncensored | `deepseek/deepseek-v4.1-flash-1017-abliterated` | | GLM 5.3 Uncensored | `z-ai/glm-5.3-uncensored` | | Gemma 4 26B A4B Uncensored | `google/gemma-4-26b-a4b-uncensored` | | Qwen3.8 27B Uncensored | `qwen/qwen3.8-27b-uncensored` | | GLM 5.3 | `z-ai/glm-5.3` | | GLM 5.3 Flash | `z-ai/glm-5.3-flash` | | DeepSeek V4.1 Flash 1017 | `deepseek/deepseek-v4.1-flash-1017` | | Kimi K3.1 Pro | `moonshotai/kimi-k3.1-pro` | | Qwen3.8 27B | `qwen/qwen3.8-27b` | | Qwen2.5 7B Instruct | `qwen/qwen-2.5-7b-instruct` | | Qwen3.6 35B A3B | `qwen/qwen3.6-35b-a3b` | See [Privacy tiers](https://trymorse.ai/inference/docs/privacy-tiers). ## Can I call Claude, GPT, Gemini, or Grok? Not with a key yet: Claude, GPT, Gemini, and Grok are in the Morse app only for now. See [Models](https://trymorse.ai/inference/docs/models). ## Can a key make images, search or read the web, transcribe, or use presets? Not yet: image generation, web search, page reading, and transcription are in the Morse app only for now, and presets aren't built yet. A key that calls one of the first four returns `404 model_not_found`. See [Models](https://trymorse.ai/inference/docs/models). ## Can I use my OpenAI key? No: Morse takes only its own keys, which start with `sk_morse_`. Make one in the [console](https://console.trymorse.ai), and it pays from your Morse credits. See [Quickstart](https://trymorse.ai/inference/docs). ## Can I call the API from a browser? No: the API refuses calls straight from a browser (CORS). Call it from your server or a backend function, and keep the key there. See [Keep it on a server](https://trymorse.ai/inference/docs/authentication#keep-it-secret). ## Does Morse send temperature and other sampling parameters? Yes: a new key sends `temperature`, `top_p`, `stop`, `seed`, and `n` of 1 to the provider as you send them. To stop a key sending them, see [Settings](https://trymorse.ai/inference/docs/api/parameters#settings). ## Do you support the Anthropic Messages API? Yes: `POST /v1/messages` takes an Anthropic Messages request on any chat model, streamed or whole, with tool calls. Give Anthropic's SDK or Claude Code the base URL `https://inference.trymorse.ai` and your Morse key. See [Anthropic Messages API](https://trymorse.ai/inference/docs/anthropic-messages). ## Does Morse support the Responses API? Yes: `POST /v1/responses` takes an OpenAI Responses request on any chat model, at the same base URL as Chat Completions. Morse stores no response, so every one returns `store: false`. See [OpenAI Responses API](https://trymorse.ai/inference/docs/responses-api). ## How does pricing compare with buying from each provider? A key pays each model's list price, which its maker publishes. Without one, the price is the median of its OpenRouter providers' prices, or more where Morse's provider charges more. See [Pricing and billing](https://trymorse.ai/inference/docs/pricing). ## Is there a free tier for the API? No: a key pays for every request from your credits, on every plan. Your first top-up adds extra credits: see [Buy credits](https://trymorse.ai/inference/docs/pricing#buy). ## Where are requests served from? Morse's relay and enclave run on AWS in the United States. The model runs wherever its provider runs it, and Morse doesn't pin a request to a region. See the [list of providers](https://trymorse.ai/privacy#subprocessors). --- Model ids, how to list them, and what each model can do on each endpoint. Updated December 4, 2026. Page: https://trymorse.ai/inference/docs/models # Models A model's id is `vendor/model`, lowercase: the lab that made the weights, then the model as the lab names it. Name it in `model` on any request. | Model | Id | Context | Input | Output | | --- | --- | --- | --- | --- | | Kimi K3.1 Pro | `moonshotai/kimi-k3.1-pro` | 1M | $2 | $10 | | GLM 5.3 | `z-ai/glm-5.3` | 1M | $1.40 | $4.40 | | DeepSeek V4.1 Flash | `deepseek/deepseek-v4.1-flash` | 1M | $0.30 | $1.20 | | MiniMax M3 | `minimax/minimax-m3` | 512K | $0.30 | $1.20 | | Qwen3.5 397B A17B | `qwen/qwen3.5-397b-a17b` | 256K | $0.60 | $3.60 | | gpt oss 120b | `openai/gpt-oss-120b` | 128K | $0.0463 | $0.2125 | Prices are in dollars per million tokens. Every model and its price on each tier is on the [models page](https://trymorse.ai/inference/models). ## List the models `GET /v1/models` lists every model your key may call, with its type and the tiers it's sold at, each with its limits and price. It's free and doesn't count toward your requests a minute; it has its own limit of 60 a minute. Each chat tier lists the request parameters it takes as `supported_parameters`. Without a key, the call lists every model a key can call. cURL Python TypeScript ``` curl https://inference.trymorse.ai/v1/models \ -H "Authorization: Bearer $MORSE_API_KEY" ``` ## One model, several endpoints Many models run in more than one place: GLM 5.3 runs on an open-model provider under zero retention, and in a secure enclave. Each is an endpoint of the one model, with its own tier, price, and limits. Morse picks the endpoint from the request's privacy floor, the key's floor, and your [provider preferences](https://trymorse.ai/inference/docs/provider-routing). ## Older names Names from before the `vendor/model` ids, such as `glm-5.3` and `glm-5.3-tee`, still work. Each stands for its model at the tier it always had, so `glm-5.3-tee` is `z-ai/glm-5.3` with a floor of `tee`. ## Retired ids When a model is replaced, its old id keeps working: Morse serves the request on the id that replaced it, at that model's price. The response says so in its `X-Model-Successor` header, which names the id that served it. To get exactly the model you name, switch to the id in the right column. | Retired id | Now served by | | --- | --- | | `qwen/qwen3.5-122b-a10b` | `qwen/qwen3.5-397b-a17b` | | `qwen3.5-122b-a10b` | `qwen3.5-397b-a17b` | | `z-ai/glm-4.5v` | `z-ai/glm-5.3-flash` | | `glm-4.5v` | `glm-5.3-flash` | | `z-ai/glm-4.6v` | `z-ai/glm-5.3-flash` | | `glm-4.6v` | `glm-5.3-flash` | | `z-ai/glm-4.7-flash` | `z-ai/glm-5.3-flash` | | `glm-4.7-flash` | `glm-5.3-flash` | | `moonshotai/kimi-k2.7-code` | `moonshotai/kimi-k3` | | `kimi-k2.7-code` | `kimi-k3` | | `moonshotai/kimi-k2.5` | `moonshotai/kimi-k2.6` | | `kimi-k2.5` | `kimi-k2.6` | | `moonshotai/kimi-k2-thinking` | `moonshotai/kimi-k3` | | `kimi-k2-thinking` | `kimi-k3` | | `minimax/minimax-m2.5` | `minimax/minimax-m3` | | `minimax-m2.5` | `minimax-m3` | | `minimax/minimax-m2.7` | `minimax/minimax-m3` | | `minimax-m2.7` | `minimax-m3` | | `deepseek/deepseek-r1` | `deepseek/deepseek-r1-0528` | | `deepseek-r1` | `deepseek-r1-0528` | | `tencent/hy4-preview` | `tencent/hy4` | | `hy4-preview` | `hy4` | | `deepseek/deepseek-v4.1-flash-uncensored` | `deepseek-v4.1-flash-uncensored` | | `deepseek-ai/DeepSeek-V4.1-Flash-1017-abliterated` | `phala/deepseek-v4.1-flash-1017-uncensored` | | `black-forest-labs/flux-2-max` | `black-forest-labs/flux-3` | | `flux-2-max` | `flux-3` | | `black-forest-labs/flux-2-pro` | `black-forest-labs/flux-3` | | `flux-2-pro` | `flux-3` | | `ideogram/ideogram-4.5` | `ideogram/ideogram-4.6` | | `ideogram-4.5` | `ideogram-4.6` | | `google/gemini-3.1-flash-image` | `google/gemini-nano-banana-2.1` | | `gemini-3.1-flash-image` | `gemini-nano-banana-2.1` | | `google/gemini-3.1-flash-lite-image` | `google/gemini-nano-banana-2.1` | | `gemini-3.1-flash-lite-image` | `gemini-nano-banana-2.1` | | `bytedance/seedream-5-pro-uncensored` | `bytedance/seedream-5.5-uncensored` | | `seedream-5-pro-uncensored` | `seedream-5.5-uncensored` | | `bytedance/seedream-5-lite-uncensored` | `bytedance/seedream-5.5-uncensored` | | `seedream-5-lite-uncensored` | `seedream-5.5-uncensored` | | `bytedance/seedream-4.5-uncensored` | `bytedance/seedream-5.5-uncensored` | | `seedream-4.5-uncensored` | `seedream-5.5-uncensored` | | `deepseek/deepseek-v4.1-flash-1017-ultrafast-uncensored` | `deepseek/deepseek-v4.1-flash-1017-abliterated` | | `deepseek-v4.1-flash-1017-ultrafast-uncensored` | `deepseek-v4.1-flash-1017-uncensored` | | `deepseek/deepseek-v4.1-flash-1017-uncensored-ultrafast` | `deepseek/deepseek-v4.1-flash-1017-abliterated` | | `deepseek-v4.1-flash-1017-uncensored-ultrafast` | `deepseek-v4.1-flash-1017-uncensored` | | `deepseek-ai/deepseek-v4.1-flash-1017-abliterated` | `deepseek/deepseek-v4.1-flash-1017-abliterated` | | `glm-5.3-uncensored` | `glm-5.3-uncensored-tee` | | `deepseek/deepseek-v4.1-flash-1017-ultrafast` | `deepseek/deepseek-v4.1-flash-1017` | | `deepseek-v4.1-flash-1017-ultrafast` | `deepseek-v4.1-flash-1017` | ## What a model can do Read what a model takes and does from `GET /v1/models`. Each model lists: - its input types: text, or text and images - whether it reasons, and which `reasoning_efforts` it takes - its context and output limits on each tier --- Set a privacy floor on a request, and see what Anonymous, Private, and TEE each protect. Updated November 29, 2026. Page: https://trymorse.ai/inference/docs/privacy-tiers # Privacy tiers Set `provider.min_privacy` to the least private tier a request may run at: `anon`, `private`, or `tee`. cURL Python TypeScript ``` curl https://inference.trymorse.ai/v1/chat/completions \ -H "Authorization: Bearer $MORSE_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "model": "z-ai/glm-5.3", "messages": [{"role": "user", "content": "Hello"}], "provider": {"min_privacy": "tee"} }' ``` Morse serves the request at that tier or a more private one, and never lower. A request no endpoint can meet returns `400 privacy_floor_unmet`, which names the floor and what set it. ## The floor that holds The floor is the highest of these three: - the request's `provider.min_privacy` - the tier of an older model name, if you used one - your key's floor. See [Limit a key](https://trymorse.ai/inference/docs/authentication#limits). Morse checks the request's floor inside its enclave and the key's at the relay, before it calls a provider or charges you. TEE is opt-in: with no floor, or one below `tee`, a request runs below TEE unless the model has no endpoint there. ## The tiers From least to most private, the tiers are Anonymous, Private, and TEE. | Tier | Who can read the prompt | What protects it | | --- | --- | --- | | **Anonymous** `anon` | The provider, never who sent it | Morse sends the request to the model's lab as itself, so the lab sees the prompt but not who sent it. Nothing else protects the prompt: no attested hardware, and this tier itself promises no zero data retention. Set provider.zdr to require that. | | **Private** `private` | Only the provider's hardware | The provider runs the model under a contract or its published policy to keep nothing (zero data retention). That's a promise, not a proof. | | **TEE** `tee` | The provider's enclaves: the model's, and a gateway in front of it | The model runs in a hardware enclave. Morse checks attestations before it forwards the request: at NEAR AI, the gateway's and the model's; at Phala and Tinfoil, the gateway's. | The Morse app also has an E2EE tier, which API keys can't use for now. A request a key encrypts to a model's enclave returns `403 e2ee_app_only`, before Morse calls a provider or charges you. You can still [seal a request](https://trymorse.ai/inference/docs/sealed-api-keys) to Morse's own enclave. ## What the tiers don't protect - On Private, the provider reads your prompt, and zero retention is its promise. - On a plain API call, TLS ends inside Morse's door, an attested enclave, which seals the request before Morse's relay receives it. The relay sees its metadata, not the prompt. A plain client doesn't check where its connection ends; the [verifier](https://trymorse.ai/inference/docs/verification) checks that for its own connection. To seal each request on your machine to a verified enclave, use [morse-seal](https://trymorse.ai/inference/docs/sealed-api-keys) or [`attested()`](https://trymorse.ai/inference/docs/sealed-api-keys#attested). On TEE, the prompt is in the clear inside Morse's enclaves, the provider's gateway enclave, and the model's enclave. At Phala and Tinfoil, Morse checks the gateway alone, not the model's enclave. - On every tier, Morse sees which model you called, when, and how many tokens it took, to bill you. --- Choose which providers may serve a request, and how Morse fails over between them. Updated November 29, 2026. Page: https://trymorse.ai/inference/docs/provider-routing # Provider routing Bound which providers may serve a request with the `provider` object. Morse picks the endpoint within those bounds, and a response doesn't name it. Python ``` client.chat.completions.create( model="moonshotai/kimi-k3.1-pro", messages=messages, extra_body={"provider": {"zdr": True, "max_price": {"prompt": 2, "completion": 10}}}, ) ``` Set the privacy floor with `provider.min_privacy`. See [Privacy tiers](https://trymorse.ai/inference/docs/privacy-tiers). ## Provider parameters `provider` takes OpenRouter's parameter names, but a request can't pick a provider by name. A parameter not listed here returns `400 invalid_parameter`. | Parameter | What it does | | --- | --- | | `zdr` | `true` raises the floor to `private` and keeps only the endpoints that retain no data. `data_collection: "deny"` does the same. | | `max_price` | `prompt` and `completion`, in dollars per million tokens. Morse drops every tier priced above a cap, and returns `400 max_price_unmet` when none is left. | | `allow_fallbacks` | `false` keeps the request at the first tier it can reach. It still fails over between that tier's endpoints. | | `quantizations` | The precisions a provider may serve the model at, such as `fp8` or `bf16`. Morse keeps only the providers that match, at the tiers the request already reaches, and returns `400 quantization_unmet` when none is left. | | `order`, `sort`, `preferred_min_throughput`, `preferred_max_latency`, `require_parameters` | Accepted and ignored, when their values are valid. | | `only`, `ignore`, `enforce_distillable_text` | `400 provider_choice_unsupported`. | ## Failover Morse tries the next endpoint at or above your floor when one fails before the first byte of its response: - a 429 or a 5xx - a dropped connection - no response in time When a streamed call's Private endpoint has sent nothing after a few seconds, Morse may send the same request again. It sends it to the next endpoint, or to the same one, and serves whichever responds first. Once a response has started, Morse doesn't fail over. --- What Morse records about a request, what it never records, and what a provider sees. Updated November 28, 2026. Page: https://trymorse.ai/inference/docs/data-retention # What Morse keeps Morse keeps no prompt and no response, on any tier and any plan, with nothing to turn on. ## What Morse records For each request, to bill you and keep the API up: - the model, its tier, and the endpoint that served it - input, cached, reasoning, and output token counts - how it ended, such as its finish reason or error code - what it cost, how long it took, and when - the key that sent it ## What Morse never records - the prompt, the response, or any file in them - `user`, `safety_identifier`, or `prompt_cache_key`, which Morse drops so a provider can't link one person's requests ## What a provider sees A provider sees Morse, never your account, your card, or your address. What it sees of the prompt depends on the [tier](https://trymorse.ai/inference/docs/privacy-tiers). Every provider Morse uses is listed on the [privacy page](https://trymorse.ai/privacy#subprocessors). --- Check that Morse's enclave runs the published release, and what an attestation does and doesn't prove. Updated November 29, 2026. Page: https://trymorse.ai/inference/docs/verification # Verification and attestation Run the published verifier to check that Morse's enclaves run a release published in trymorse/morse-enclave. It needs Node 24 or later and `git`, and no account. ## Check Morse's enclave Terminal ``` npx @askmorse/verify inference.trymorse.ai ``` Output ``` @askmorse/verify 2026.11.16 Checking the enclaves inference.trymorse.ai lists Attestation 2 enclaves, each signed by AWS Nitro (root 641a0321…8f79bb5b) key 30064edad963a935, signed 2 min ago key 5a7ad5acb8af73c3, signed 4 min ago PCR0 8dd60360e908…b2f0aa54 PCR1 3b4a7e1b5f13…a0974d03 PCR2 2fb01535bca6…87eeec15 Allowed on Morse's signed list of prod images, not revoked list 521, logged 33 min ago at Rekor entry 3869258094 https://search.sigstore.dev/?logIndex=3869258094 Source v2026.11.20, commit 8408d8fcdd12 on main of github.com/trymorse/morse-enclave, names these PCRs Rebuild not run. These PCRs are the ones Morse's CI wrote in that commit. Run with --rebuild to build it here and compare (Docker, ~2 min). TLS this connection to inference.trymorse.ai ended inside an attested enclave (key 51ff1bfcc71c78a3) Passed. The enclaves inference.trymorse.ai lists run v2026.11.20 of github.com/trymorse/morse-enclave, as published (not rebuilt here). Pin this release in CI: --release 8408d8fcdd1273dcccdebb2ebb3948b2ccbb9f38 ``` It runs these checks in order: | Step | What it checks | | --- | --- | | Attestation | `GET /v1/attestation` lists a document for each enclave. Each document must be signed by a chain that ends at AWS's Nitro root, and be at most 30 minutes old. It must carry the measurements of the image the enclave booted (its PCRs), and the key requests are sealed to. | | Allowed | The PCRs are on Morse's signed list of prod images, and not revoked. The list is the latest release of [trymorse/morse-pins](https://github.com/trymorse/morse-pins/releases), which Morse's CI signs and Sigstore's public log, Rekor, records. It must have been logged in the last 7 days. | | Source | A commit on `main` of [trymorse/morse-enclave](https://github.com/trymorse/morse-enclave) names those PCRs. Morse's CI writes one such commit for each release. | | Rebuild | Only with `--rebuild`: it builds that commit on your machine and compares the PCRs. | | TLS | It never fails. It shows that your connection to inference.trymorse.ai ended at a TLS key an attested enclave holds, so TLS ends inside the enclave. | | Exit | Means | | --- | --- | | 0 | Every check passed. | | 1 | A check failed, and it names the step: `Failed at `. Don't send anything to these enclaves. | | 2 | It couldn't finish: no network, a rate limit, no `git` or Docker, or bad arguments. Nothing past the step it names is proven. Run it again. | The documents it checks need no key: ``` curl https://inference.trymorse.ai/v1/attestation ``` Response ``` { "object": "proxy_attestation", "environment": "prod", "instances": [ "hEShATgioFkRlb9pbW9kdWxl…", "hEShATgioFkRlb9pbW9kdWxl…" ], "receipts": [{ "door": { … } }, { "door": { … } }], "proxy_time": 1794343743 } ``` Each of `instances` is a base64 COSE_Sign1 document that AWS's Nitro hardware signed. Nothing signs `environment` or `proxy_time`, so the verifier reads neither. ## What an attestation proves AWS's Nitro hardware measures the image an enclave booted, and signs those measurements together with a key the enclave made. Morse can't forge that signature. When every check passes, each key in the documents belongs to an enclave running a release whose source you can read on GitHub. A request sealed to one of those keys opens only inside that release. The Morse app seals every request this way, and so do [Sealed API keys](https://trymorse.ai/inference/docs/sealed-api-keys). ### What it doesn't prove - **That a plain API call is private.** Morse's relay reads every request that isn't sealed, and sees who sent each request, when, and how big it is. A plain request with an API key isn't sealed. See [Sealed API keys](https://trymorse.ai/inference/docs/sealed-api-keys). - **That a document is new.** A document carries no nonce, so the one you check can be up to 30 minutes old, or from an enclave that has since stopped. The claim is about keys and images, not about which machine answers you. - **That the source builds these PCRs**, unless you rebuild. Without `--rebuild`, Source only finds a commit whose message names them, and Morse's CI wrote that message. - **That Morse allowed no other image.** Morse's CI signs the list, so Morse can list any image it builds. The public log makes each list impossible to deny later; it doesn't stop one. - **That everyone sees the same list.** Nothing in the check watches Rekor for a list shown to only some people. - **What the model's provider runs.** Morse's enclave checks the provider's enclave before it forwards a request, not Phala's or Tinfoil's model hardware. See how Morse checks a provider's enclave. ## Rebuild the release With `--rebuild`, the verifier builds the release's commit on your machine and compares the PCRs it measures with the attested ones. It needs Docker, `bash`, `tar`, `jq`, and about 1 GB of images, and takes about 2 minutes. ``` npx @askmorse/verify inference.trymorse.ai --rebuild ``` Every release builds on arm64 Linux, and newer ones on x86_64 Linux too. For an older release on x86_64, turn on arm64 emulation first; the build then takes about 6 minutes. ``` docker run --privileged --rm tonistiigi/binfmt --install arm64 ``` To rebuild by hand, take the commit the Source step printed, then compare PCR0, PCR1, and PCR2 with the attested ones: ``` git clone --bare --filter=tree:0 --single-branch --branch main \ https://github.com/trymorse/morse-enclave enclave.git git -C enclave.git archive --format=tar > src.tar mkdir src && tar -xf src.tar -C src bash src/deploy/enclave/build.sh eif src.tar rebuild prod out jq .Measurements out/measurements.json ``` ## Check it in your deploys Run the verifier before each deploy. The deploy then stops when Morse's enclave runs an image off its signed list, or one whose source isn't public. Pin the verifier's version to the one you read. GitHub Actions ``` - uses: actions/setup-node@v7 with: node-version: 24 - run: npx -y @askmorse/verify@2026.11.16 inference.trymorse.ai ``` Exit 1 means a check refused what it was shown: stop. Exit 2 means it couldn't finish, from the network or a rate limit: retry before you treat it as a failure. Every version from 2026.11.15 on carries npm's provenance, naming the commit of [trymorse/morse-verifier](https://github.com/trymorse/morse-verifier) it was built from. Check it with `npm audit signatures` after you install it. ### Pin a release `--release` fails unless every enclave runs the release you name. Name its 40-character commit, which the last line of a passing run prints, since a release's name is only text in a commit message. ``` npx @askmorse/verify inference.trymorse.ai --release 8408d8fcdd1273dcccdebb2ebb3948b2ccbb9f38 ``` Morse releases several times a day, and a deploy replaces one enclave at a time. So a pinned release fails at Morse's next deploy, and for a few minutes during each. Pin one if you review each release before you send to it. ## How Morse checks a provider's enclave On TEE, a request goes to an enclave its provider runs. Morse's enclave checks that enclave's attestation before it forwards a request. At Phala and Tinfoil, it doesn't check the model's hardware behind it. That check is code in the release you verified above. The measurements it accepts start as pins in the release's source, in [`internal/attestation`](https://github.com/trymorse/morse-enclave/tree/main/internal/attestation). While it runs, the enclave also takes newer pins from trymorse/morse-pins, but only ones signed by the signer its release pins. | Provider | What it attests | What Morse pins | | --- | --- | --- | | Phala | An Intel TDX quote of Phala's gateway | The gateway's app, its key service, its OS images, and the gateway releases Morse has reviewed | | NEAR AI | Intel TDX quotes of NEAR AI's gateway and of the model's machine, and NVIDIA's verdict on its GPUs | Each machine's app, its key services, its OS images, and the firmware status Morse accepts | | Tinfoil | An AMD SEV-SNP report of Tinfoil's router | The router's releases, and its web address | - Morse's enclave checks each provider's report again every 10 minutes, and sooner after a failed try. - It reaches the provider over TLS pinned to the key the verified report binds, so a request can't reach a machine that didn't attest. - Morse trusts each endpoint's key until its report's own expiry, and at most an hour after the report that verified it. An endpoint a later report leaves out stops being trusted within the hour. - An endpoint also stops being trusted 30 minutes after the last verified report that covers it. When no report verifies, as when Intel's collateral is unreachable, Morse stops sending to those endpoints within 30 minutes. - When a model has no endpoint at or above your floor with a verified key, the request returns `503 upstream_unattested`. Morse tries the model's other attested endpoints first. Providers ship new releases without notice. Morse still serves a release it hasn't pinned yet when the rest of the report matches the pins. At Tinfoil, Sigstore must also prove that Tinfoil's release workflow published it with a newer tag than every pinned release. At Phala, an earlier pinned release must also have run the same launcher image. Morse logs it until it pins that release. Some pins merge on their own once automated checks pass, and a person reviews them after. A provider that moves to another app or key service is refused until a person reviews it. Call `GET /v1/attestation?model=` with your key and a `nonce` of 64 hex characters. It returns the provider's own report, bound to your nonce, beside Morse's documents. Checking it takes the provider's own verifier; the Morse app runs one on your device. `model` can also be a model id that is no served name, such as `z-ai/glm-5.3`. The response is then for the model's most private attested provider, and its `model` is the name that provider serves it under. `attester` names one provider, for a model that more than one provider attests. The most private can be the Morse app's E2EE provider, which a key can't send to. For `z-ai/glm-5.3`, set `attester` to `phala` for its TEE provider's report. A served name that attests nothing, such as a Private provider's, returns `404 attestation_not_available`, whatever `attester` says. A model id no route has returns `404 model_not_found`. ### What a provider's attestation doesn't prove - **Which weights run on NEAR AI.** Its measurements cover neither the inference server nor the weights, and the model's name in a report is NEAR AI's word. - **Where Phala's gateway sends a prompt.** Which model servers it counts as attested is Phala's configuration, which no report measures. - **Which model enclave Tinfoil's router uses.** Morse verifies the router alone. The router chooses where a prompt goes next. - **Who holds a provider's keys.** A provider's key service releases the same keys to any machine it admits, and those machines' signatures verify too. - **That each pinned OS image is the release it names.** Morse has rebuilt some of them, not all. --- Seal each request on your machine with morse-seal or attested(), so Morse's relay sees only ciphertext. Updated November 28, 2026. Page: https://trymorse.ai/inference/docs/sealed-api-keys # Sealed API keys Point your OpenAI SDK at a sealing sidecar or fetch. Each request is then encrypted on your machine, to a key only an attested enclave holds. Morse's relay, its load balancer, and the machines in front of the enclave see ciphertext only. A plain request is opened at the relay. ## Two ways to seal | Tool | For | How | | --- | --- | --- | | [`morse-seal`](https://github.com/trymorse/morse-seal) | Any language, any OpenAI SDK, curl | A sidecar on your machine that serves the OpenAI API at `http://127.0.0.1:4141/v1` and seals every request it forwards. | | `attested()` | Node 24 or later, with git | A `fetch` for the OpenAI SDK, from `@askmorse/verify`, that seals in your process. | Both check Morse's enclave before they seal anything, and both refuse to send a request the relay could read. ## Install morse-seal With Go 1.27.4 or later: Terminal ``` go install github.com/trymorse/morse-seal/cmd/morse-seal@latest ``` Or download a binary for Linux, macOS, or Windows, on amd64 or arm64, from the [releases](https://github.com/trymorse/morse-seal/releases). Each archive and the container image carry a GitHub build provenance attestation, which names the workflow run and commit that built them. Check it before you run the binary: ``` gh attestation verify morse-seal__linux_amd64.tar.gz --repo trymorse/morse-seal gh attestation verify oci://ghcr.io/trymorse/morse-seal:v --repo trymorse/morse-seal ``` Or run the container image: ``` docker run --rm -p 127.0.0.1:4141:4141 -e MORSE_API_KEY \ ghcr.io/trymorse/morse-seal --floor tee --upstream https://inference.trymorse.ai ``` ## Run it Start the sidecar with your key: ``` MORSE_API_KEY=sk_morse_... morse-seal --floor tee --upstream https://inference.trymorse.ai ``` `--upstream https://inference.trymorse.ai` is where a `sk_morse_` key is taken; `api.trymorse.ai` refuses one. `--floor tee` keeps every chat on a model in an attested enclave. When the sidecar first trusts an image, it prints the image's tag and the start of its PCR0. It also prints the commits that pin the image and publish its source: Output ``` morse-seal: trusting image v2026.11.24 pcr0 6314f0abf19cb012… pinned by trymorse/morse-pins@b98cc6bd09689d3dc57e387a92a10907cfc9f5a2, source commit 3d7113c7cc603e9a86d0bd8deb4c644914b6d172 ``` Then point your SDK at `http://127.0.0.1:4141/v1`. The SDK's own API key can be any value: the sidecar puts your `sk_morse_` key on the outer request. Python TypeScript cURL ``` from openai import OpenAI client = OpenAI(base_url="http://127.0.0.1:4141/v1", api_key="morse-seal") stream = client.chat.completions.create( model="z-ai/glm-5.3", stream=True, messages=[{"role": "user", "content": "Hello"}], ) for chunk in stream: print(chunk.choices[0].delta.content or "", end="") ``` Setting `OPENAI_BASE_URL=http://127.0.0.1:4141/v1` works too, in place of the base URL in code. ### Flags | Flag | Default | What it does | | --- | --- | --- | | `--key` | `$MORSE_API_KEY` | Your sk_morse_ key. It goes on the outer request only. | | `--floor` | None | The lowest tier a chat may use: `anon`, `private`, or `tee`. It sets `provider.min_privacy` inside the seal, and refuses every other content route. | | `--privacy-veil` | Off | Asks for the [Privacy Veil](https://trymorse.ai/inference/docs/privacy-veil) inside the seal on every chat, and withholds a response the enclave didn't veil. | | `--upstream` | `https://inference.trymorse.ai` | The Morse API. api.trymorse.ai refuses a sk_morse_ key. | | `--listen` | `127.0.0.1:4141` | The address to serve the OpenAI API on. | | `--pins-commit` | `main` of morse-pins | The morse-pins commit whose list of images to trust, so the list changes only when you change the flag. | `morse-seal --help` lists the rest. ### What --floor refuses The floor goes in a chat's body, so with `--floor` the sidecar seals only `POST /v1/chat/completions` and `POST /v1/chat/compact`. Every other content route, such as `/v1/messages` and `/v1/responses`, returns `400 floor_unsupported_route` rather than going out without the floor. Run a second sidecar without `--floor`, on another `--listen` port, for those. `GET /v1/models`, `GET /v1/attestation`, and the other requests that carry no content go to Morse unsealed. ## Seal in Node with attested() Give the OpenAI SDK `attested()` as its `fetch`, from `@askmorse/verify`. TypeScript ``` import OpenAI from "openai"; import { attested } from "@askmorse/verify"; const client = new OpenAI({ baseURL: "https://inference.trymorse.ai/v1", apiKey: process.env.MORSE_API_KEY, fetch: attested({ origin: "https://inference.trymorse.ai" }), }); ``` It runs the verifier's Attestation, Allowed, and Source checks, then seals each request to the keys that passed. See [Check Morse's enclave](https://trymorse.ai/inference/docs/verification#check). - It needs Node 24 or later and `git` on the `PATH`. So it doesn't run in a browser, on an edge runtime, or in an image without `git`, such as `node:24-slim`. - A request the enclave can't open sealed, such as `POST /v1/embeddings`, throws, and nothing is sent. - It checks again once the oldest document is 30 minutes old, so a revoked image stops receiving requests within 30 minutes. - When no key passes, it throws a `VerifyError` that names the step, and sends nothing. The OpenAI SDK throws it as an `APIConnectionError` whose `cause` is the `VerifyError`. The relay still sees your key, each request's size and timing, and the requests that carry no content, such as `GET /v1/models`. Morse's enclave opens the request, as with `morse-seal`. ## What it proves For each request, the sidecar seals the body to the keys of enclaves whose attestation documents pass every check below. When none pass, the request returns `502 attestation_failed`, and nothing is sent. - The document is signed by a chain that ends at AWS's Nitro root, which is built into the binary. Every certificate in the chain was valid when the document was signed. - It is at most 30 minutes old. - Its PCR0, PCR1, and PCR2 match an image that [trymorse/morse-pins](https://github.com/trymorse/morse-pins) lists for prod and doesn't mark revoked. - A tag of [trymorse/morse-enclave](https://github.com/trymorse/morse-enclave) names the same PCRs, so the image's source is public, and you can rebuild it and compare. - The document binds the key the request is sealed to. ### What it doesn't prove - **That your usage is hidden.** Morse still sees who calls and when, the model, and the token counts. It also sees the rough size of each request and response, and the timing of a stream. - **That the model's provider can't read it.** Morse's enclave opens the request. On Anonymous and Private, it forwards the prompt to the model's provider, which reads it. On TEE, it sends the prompt only to a provider's enclave whose attestation it checked. `morse-seal` seals to Morse's enclave, not to the model's. See [Privacy tiers](https://trymorse.ai/inference/docs/privacy-tiers). - **That you can skip trusting anyone.** You trust the machine the sidecar runs on, GitHub, and the publisher of morse-pins, who decides which images are on the list. Pass `--pins-commit` to move to a new list only when you choose. ## Require sealing on a key Turn on **Sealed only** on a key's sheet in the console, and Morse takes only sealed requests with it. A plain request with that key, from an SDK pointed at `https://inference.trymorse.ai/v1` or from curl, returns `403 sealed_required`. So a key that leaks, or a client someone forgot to point at the sidecar, can't send a prompt the relay reads. Use a second key for anything you don't seal. ## Errors | Code | Status | When | | --- | --- | --- | | `attestation_failed` | 502 | No enclave passed every check, so nothing was sent. The message names the first check each enclave failed. | | `privacy_floor_unmet` | 400 | The model has no endpoint at or above the floor. Pick a model at that tier, or lower --floor. | | `floor_unsupported_route` | 400 | --floor is set and the route isn't POST /v1/chat/completions or /v1/chat/compact. Run a second sidecar without --floor for it. | | `sealed_required` | 403 | A plain request on a key with Sealed only on. Send it through morse-seal or attested(). | | `privacy_veil_missing` | 502 | With --privacy-veil, a response the enclave didn't mark X-Privacy-Veil: applied. The sidecar withholds it. | | `privacy_veil_not_applicable` | 400 | With --privacy-veil, a route other than the two chat routes, or a chat encrypted to the model's enclave. | | `privacy_veil_required` | 400 | With --privacy-veil, a chat that sets privacy_veil to false. | | `origin_refused` | 403 | The request carries an Origin header, as a web page's does. So no page can spend your key. | | `host_refused` | 403 | The request is addressed to a name other than 127.0.0.1, ::1, localhost, or the --listen address. | | `invalid_path` | 400 | A path the sidecar won't forward as written, such as one with escaped characters or a .. segment. | | `invalid_json` | 400 | A request body that isn't a JSON object. | | `request_too_large` | 413 | A request body over 32 MiB. | | `upstream_unreachable` | 502 | The sidecar couldn't reach --upstream. | | `sealed_reply_missing` | 502 | Morse responded without sealing its response, so the sidecar can't tell it came from the enclave. | | `sealed_reply_invalid` | 502 | Morse's sealed response doesn't open. | Every other error comes from Morse as it would without the sidecar. See [Error codes](https://trymorse.ai/inference/docs/api/errors). --- Receive a response as the model writes it, read its events, get the token counts, and handle an error mid-stream. Updated November 27, 2026. Page: https://trymorse.ai/inference/docs/streaming # Streaming Set `"stream": true` to receive the response as the model writes it, as server-sent events. cURL Python TypeScript ``` curl -N https://inference.trymorse.ai/v1/chat/completions \ -H "Authorization: Bearer $MORSE_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "model": "moonshotai/kimi-k3.1-pro", "messages": [{"role": "user", "content": "Write a haiku about rain."}], "stream": true, "stream_options": {"include_usage": true} }' ``` ## Get the token counts Set `stream_options.include_usage` to `true`. The last chunk before `[DONE]` then carries `usage`, with an empty `choices` list. No other chunk carries it. With an API key, `usage.cost` is what the request cost in US dollars. With the [Privacy Veil](https://trymorse.ai/inference/docs/privacy-veil) on, the Veil's last text and its report follow the usage chunk. ## A stream on the wire Each event is a `data:` line and a blank line. A line that starts with a colon is a comment. Here, `…` stands for the parameters every chunk repeats: `object`, `created`, `model`, and `obfuscation`. Response ``` data: {"id":"chatcmpl-a1b2",…,"choices":[{"index":0,"delta":{"role":"assistant","content":""},"finish_reason":null}]} data: {"id":"chatcmpl-a1b2",…,"choices":[{"index":0,"delta":{"content":"Rain"},"finish_reason":null}]} data: {"id":"chatcmpl-a1b2",…,"choices":[{"index":0,"delta":{"content":" on the roof"},"finish_reason":null}]} : keepalive data: {"id":"chatcmpl-a1b2",…,"choices":[{"index":0,"delta":{},"finish_reason":"stop"}]} data: {"id":"chatcmpl-a1b2",…,"choices":[],"usage":{"prompt_tokens":14,"completion_tokens":19,"total_tokens":33}} data: [DONE] ``` ## Events | Line | What it is | | --- | --- | | `data: {…}` | A `chat.completion.chunk`, the next piece of the response. | | `data: {"choices": [], "usage": …}` | The usage chunk, with `stream_options.include_usage`. | | `: keepalive` | A comment Morse sends every 25 seconds while some reasoning models think. Clients that follow the server-sent events spec skip it. | | `data: {"error": …}` | The provider failed after the stream started. See how a stream ends. | | `data: [DONE]` | The response is complete. | ## The chunk ChatCompletionChunk ``` type ChatCompletionChunk = { id: string; // the same on every chunk of a response object: "chat.completion.chunk"; created: number; // Unix seconds model: string; choices: { index: number; delta: { role?: string; content?: string | null; // the next piece of the response's text reasoning_content?: string; // the next piece of a reasoning model's visible thinking tool_calls?: object[]; // pieces of tool calls, in OpenAI's format }; finish_reason: string | null; // set on the chunk that ends the choice }[]; usage?: Usage; // on one chunk at the end, with include_usage obfuscation: string; // padding, ignore it }; ``` Ignore `obfuscation`. It is a random string of 16 to 64 letters and digits, and it holds no data. It keeps a chunk's size from giving away the words in it. ## How a stream ends - `data: [DONE]`: the response is whole. - An error event and no `[DONE]`: the model failed after the status `200` was sent. Read the error's `code`, such as `upstream_error`. - The connection closes with neither: treat the response as incomplete. An error event ``` {"error":{"message":"The upstream model server failed.","type":"upstream_error","param":null,"code":"upstream_error"}} ``` An error before the first event isn't streamed. It returns as an ordinary error, with its HTTP status. See [Error codes](https://trymorse.ai/inference/docs/api/errors). ## Stop a stream Close the connection. A stream that stops early, for any reason, costs what it delivered. --- Let a model call your functions, with OpenAI's tools and tool_choice. Updated November 28, 2026. Page: https://trymorse.ai/inference/docs/tool-calling # Tool calling Describe your functions in `tools`, and the model can answer with a call to one instead of text. Run it, send the result back as a `tool` message, and the model continues. It works as it does with OpenAI on Private and TEE. Python TypeScript cURL ``` import json tools = [{ "type": "function", "function": { "name": "get_weather", "description": "The weather now in a city", "parameters": { "type": "object", "properties": {"city": {"type": "string"}}, "required": ["city"], }, }, }] def get_weather(city): return {"city": city, "raining": False} messages = [{"role": "user", "content": "Is it raining in Lisbon?"}] reply = client.chat.completions.create(model="moonshotai/kimi-k3.1-pro", messages=messages, tools=tools) message = reply.choices[0].message if message.tool_calls: messages.append({ "role": "assistant", "content": message.content, "tool_calls": [call.model_dump() for call in message.tool_calls], }) for call in message.tool_calls: result = get_weather(**json.loads(call.function.arguments)) messages.append({"role": "tool", "tool_call_id": call.id, "content": json.dumps(result)}) reply = client.chat.completions.create(model="moonshotai/kimi-k3.1-pro", messages=messages, tools=tools) print(reply.choices[0].message.content) ``` ## Send tool results back When the model calls tools, its message has `tool_calls`, and its `content` is `null` unless it also wrote text. Send the next request with the whole conversation so far: 1. The model's message, as `assistant` with its `tool_calls`. 2. One `tool` message for each call, with the call's `id` as `tool_call_id` and your result as `content`, a string. 3. The same `tools`, so the model can call again. Morse sends a model only `content`, `tool_calls`, and `reasoning_content` of an assistant message, and `content` and `tool_call_id` of a tool message. Send the ids back as you got them. Keep `reasoning_content` on the assistant message: see [Reasoning](https://trymorse.ai/inference/docs/reasoning#replay). ## Control when it calls | tool_choice | What the model does | | --- | --- | | `auto` | Decides for itself. The default. | | `none` | Answers in text. | | `required` | Calls at least one tool. | | `{"type": "function", ...}` | Calls the one you name. | Set `parallel_tool_calls` to `false` to get at most one call per response. Only function tools work. A function tool, or a named `tool_choice`, without a `name` returns `400 invalid_request`. OpenAI's older `functions` and `function_call` return a 400 that says to send `tools` and `tool_choice`. ## Stream tool calls With `"stream": true`, a call arrives in pieces. On Private, every provider's stream has one shape, and each chunk says one thing. The delta that opens a call carries its `index`, `id`, `type`, and `function.name`, with `arguments` empty. Later deltas carry only `index` and a piece of `function.arguments`. The `finish_reason` comes alone, on an empty delta. choices[0] of each chunk ``` {"index":0,"delta":{"role":"assistant","content":""},"finish_reason":null} {"index":0,"delta":{"tool_calls":[{"index":0,"id":"call_RYxz3qXbJ0b5mW7nK2pT9vLc","type":"function","function":{"name":"get_weather","arguments":""}}]},"finish_reason":null} {"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"{\"city\": "}}]},"finish_reason":null} {"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"\"Lisbon\"}"}}]},"finish_reason":null} {"index":0,"delta":{},"finish_reason":"tool_calls"} ``` Join the pieces by `index`. On TEE, the stream comes as the model's server sent it, so take the id, the name, and the arguments from whichever delta carries them: Python ``` calls = {} for chunk in stream: if not chunk.choices: continue for d in chunk.choices[0].delta.tool_calls or []: call = calls.setdefault(d.index, {"id": None, "name": None, "arguments": ""}) if d.id: call["id"] = d.id if d.function and d.function.name: call["name"] = d.function.name if d.function and d.function.arguments: call["arguments"] += d.function.arguments ``` On Private, a call's id is `call_` and 24 letters and digits, whichever provider served it. ## Tools on TEE The tool parameters are `tools`, `tool_choice`, `parallel_tool_calls`, an assistant message's `tool_calls`, and a `tool` message. They work with OpenAI's shapes on Private and TEE, and whoever reads the messages on that [tier](https://trymorse.ai/inference/docs/privacy-tiers) reads them too. Morse doesn't test or rank how well models use tools. --- Get a response as JSON that follows your schema, on chat completions, Messages, and Responses. Updated November 27, 2026. Page: https://trymorse.ai/inference/docs/structured-outputs # Structured outputs Set `response_format` to a JSON schema, and the model's response follows it. Python TypeScript ``` import json import os from openai import OpenAI client = OpenAI( base_url="https://inference.trymorse.ai/v1", api_key=os.environ["MORSE_API_KEY"], ) completion = client.chat.completions.create( model="moonshotai/kimi-k3.1-pro", messages=[{"role": "user", "content": "Name a city and its country."}], response_format={ "type": "json_schema", "json_schema": { "name": "city", "strict": True, "schema": { "type": "object", "properties": { "city": {"type": "string"}, "country": {"type": "string"}, }, "required": ["city", "country"], "additionalProperties": False, }, }, }, ) print(json.loads(completion.choices[0].message.content)) ``` For JSON with no schema, set `response_format` to `{"type": "json_object"}`. `{"type": "text"}` is the default and passes on every model. ## Find a model that takes it Read `supported_parameters` in [GET /v1/models](https://trymorse.ai/inference/docs/api/models): | Listed | The model takes | | --- | --- | | `structured_outputs` | `json_schema` | | `response_format` | `json_object` | Python ``` import requests models = requests.get("https://inference.trymorse.ai/v1/models").json()["data"] for m in models: if "structured_outputs" in m["supported_parameters"]: print(m["id"]) ``` A model lists a format when at least one of its providers honours it. Morse sends the request only to those providers. ## Errors | Status and code | When | | --- | --- | | `400 unsupported_parameter` | No provider of the model honours the format you asked for. | | `400 setting_not_forwarded` | The key has **Let my settings reach the model host** on the key's page in the [console](https://console.trymorse.ai) turned off. | Morse refuses before it calls the model or holds any credit. See [Settings](https://trymorse.ai/inference/docs/api/parameters#settings). ## Messages and Responses Ask for a schema in each API's own parameter. Morse sends it as `response_format`, so the same models and errors apply. | API | Parameter | Types | | --- | --- | --- | | [Anthropic Messages](https://trymorse.ai/inference/docs/anthropic-messages) | `output_config.format` | `json_schema` | | [OpenAI Responses](https://trymorse.ai/inference/docs/responses-api) | `text.format` | `json_object`, `json_schema` | Messages Responses ``` curl https://inference.trymorse.ai/v1/messages \ -H "x-api-key: $MORSE_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "model": "moonshotai/kimi-k3.1-pro", "max_tokens": 1024, "messages": [{"role": "user", "content": "Name a city and its country."}], "output_config": { "format": { "type": "json_schema", "schema": { "type": "object", "properties": {"city": {"type": "string"}, "country": {"type": "string"}}, "required": ["city", "country"] } } } }' ``` The OpenAI SDK's `responses.parse` and the Agents SDK's `output_type` use `text.format`, so both work. --- Choose how hard a reasoning model thinks, and send its reasoning back between tool calls. Updated November 28, 2026. Page: https://trymorse.ai/inference/docs/reasoning # Reasoning Set `reasoning_effort` to choose how hard a reasoning model thinks before it answers: `none`, `minimal`, `low`, `medium`, `high`, `xhigh`, or `max`. Python ``` client.chat.completions.create( model="moonshotai/kimi-k3.1-pro", messages=[{"role": "user", "content": "Prove there are infinitely many primes."}], reasoning_effort="high", ) ``` ## The nearest effort a model takes Each model lists the efforts it takes as `reasoning_efforts` in `GET /v1/models`. Morse sends the lowest listed effort at or above the one you asked for, or the highest listed. A model with none listed is sent no effort. Without `reasoning_effort`, the model's default applies. ## OpenRouter's reasoning object Code written for OpenRouter can send `reasoning` instead. Morse reads `effort` as the effort, `max_tokens` as a thinking budget it turns into the nearest effort, and `enabled: false` as `none`. `exclude: true` leaves the reasoning out of the response. ``` client.chat.completions.create( model="moonshotai/kimi-k3.1-pro", messages=messages, extra_body={"reasoning": {"effort": "high", "exclude": True}}, ) ``` ## Send reasoning back between tool calls Keep `reasoning_content` on the assistant message when you send it back with a tool's result. A response carries the model's reasoning there, and a model keeps nothing between requests. Morse passes it to an open model's provider, and the model continues from its earlier reasoning. Morse also takes it under OpenRouter's name, `reasoning`. Replayed reasoning counts as prompt tokens. ## What reasoning costs Reasoning tokens are output tokens, priced and counted as output. A higher effort writes more of them, so leave room in `max_completion_tokens`. See [Pricing and billing](https://trymorse.ai/inference/docs/pricing). --- Send images in a message as data URIs. Updated November 28, 2026. Page: https://trymorse.ai/inference/docs/vision # Images as input Send images in a message's content as `data:` URIs in base64. Morse never fetches media for you: a link to a URL returns `400 remote_media`. cURL Python TypeScript ``` curl https://inference.trymorse.ai/v1/chat/completions \ -H "Authorization: Bearer $MORSE_API_KEY" \ -H "Content-Type: application/json" \ -d @- < ({ city, raining: true }), }), }, stopWhen: isStepCount(5), prompt: "Is it raining in Lisbon?", }); console.log(result.text); console.log(result.steps.flatMap((step) => step.toolCalls)); ``` `result.text` is the last step's text. See [Tool calling](https://trymorse.ai/inference/docs/tool-calling) for `tool_choice` and parallel calls. ## Set a privacy floor Put Morse's `provider` object under `providerOptions.morse`. The SDK copies everything there into the request body as it is. The key, `morse`, is the `name` you gave `createOpenAICompatible`. ``` const { text } = await generateText({ model: morse("z-ai/glm-5.3"), prompt: "Summarize this contract.", providerOptions: { morse: { provider: { min_privacy: "tee" } }, }, }); ``` See [Provider routing](https://trymorse.ai/inference/docs/provider-routing) for the floor and the other `provider` parameters. To hold every request at a floor without passing it each time, set it on the key: see [Limit a key](https://trymorse.ai/inference/docs/authentication#limits). ## Use Morse in a Next.js route Stream a chat to `useChat` from a route handler. The route runs on your server, so your key never reaches the browser. app/api/chat/route.ts ``` import { convertToModelMessages, createUIMessageStreamResponse, streamText, toUIMessageStream, type UIMessage, } from "ai"; import { morse } from "@/lib/morse"; export const maxDuration = 30; export async function POST(req: Request) { const { messages }: { messages: UIMessage[] } = await req.json(); const result = streamText({ model: morse("moonshotai/kimi-k3.1-pro"), messages: await convertToModelMessages(messages), }); return createUIMessageStreamResponse({ stream: toUIMessageStream({ stream: result.stream }), }); } ``` `@/lib/morse` is the `createOpenAICompatible` provider from above, alone in its own file. On the page, `useChat` from `@ai-sdk/react` posts to `/api/chat` by default. Raise `maxDuration` for a reasoning model if your platform allows it, since it can think for a while before it writes. ## Settings and structured output The SDK sends `temperature`, `topP`, `stopSequences`, and `seed` only when you set them. They reach the provider only while **Let my settings reach the model host** on the key's page in the [console](https://console.trymorse.ai) is on. See [Settings](https://trymorse.ai/inference/docs/api/parameters#settings). --- Run OpenAI Agents SDK agents on Morse's private, OpenAI-compatible API: set the base URL, pick a model, and check it works. Updated December 3, 2026. Page: https://trymorse.ai/inference/docs/openai-agents-sdk # OpenAI Agents SDK Give the Agents SDK an OpenAI client with Morse's base URL and your key, and turn its tracing off. Python TypeScript ``` pip install openai-agents ``` ``` import os from agents import Agent, OpenAIChatCompletionsModel, Runner, set_tracing_disabled from openai import AsyncOpenAI set_tracing_disabled(True) client = AsyncOpenAI( base_url="https://inference.trymorse.ai/v1", api_key=os.environ["MORSE_API_KEY"], ) agent = Agent( name="Assistant", instructions="Answer in one sentence.", model=OpenAIChatCompletionsModel(model="moonshotai/kimi-k3.1-pro", openai_client=client), ) result = Runner.run_sync(agent, "What is a TEE?") print(result.final_output) ``` ## Name a model by its id In Python, set the client once and put `openai/` before the Morse id. Without the prefix, the SDK reads the part before the slash as a provider and raises `Unknown prefix`. Python ``` from agents import set_default_openai_api, set_default_openai_client set_default_openai_client( AsyncOpenAI(base_url="https://inference.trymorse.ai/v1", api_key=os.environ["MORSE_API_KEY"]), use_for_tracing=False, ) set_default_openai_api("chat_completions") agent = Agent(name="Assistant", model="openai/moonshotai/kimi-k3.1-pro") ``` The SDK sends the id without the prefix. In TypeScript, name the Morse id as it is. ## Tools Function tools, handoffs, sessions, and guardrails work. The SDK sends each function tool in `tools` and runs the calls the model returns. ``` from agents import function_tool @function_tool def get_weather(city: str) -> str: """The weather now in a city.""" return f"It's raining in {city}." agent = Agent( name="Assistant", model=OpenAIChatCompletionsModel(model="moonshotai/kimi-k3.1-pro", openai_client=client), tools=[get_weather], ) print(Runner.run_sync(agent, "Is it raining in Lisbon?").final_output) ``` Morse refuses the SDK's hosted tools, such as web search and file search, since they run on OpenAI's servers. ## Send Morse's own parameters Put them in `extra_body` on the agent's `ModelSettings`. ``` from agents import ModelSettings agent = Agent( name="Assistant", model=OpenAIChatCompletionsModel(model="z-ai/glm-5.3", openai_client=client), model_settings=ModelSettings(extra_body={"provider": {"min_privacy": "tee"}}), ) ``` ## The Responses API Use `OpenAIResponsesModel`, and set `store` to `False`. Morse stores no response, so the SDK sends the whole conversation each turn. ``` from agents import ModelSettings, OpenAIResponsesModel agent = Agent( name="Assistant", model=OpenAIResponsesModel(model="moonshotai/kimi-k3.1-pro", openai_client=client), model_settings=ModelSettings(store=False), ) ``` Don't pass `previous_response_id` or a conversation id to a run. See [OpenAI Responses API](https://trymorse.ai/inference/docs/responses-api) for what Morse refuses. --- Use Morse as a chat model in LangChain. Updated November 27, 2026. Page: https://trymorse.ai/inference/docs/langchain # LangChain Point LangChain's `ChatOpenAI` at Morse's base URL, with your key and a model id. Python ``` import os from langchain_openai import ChatOpenAI llm = ChatOpenAI( base_url="https://inference.trymorse.ai/v1", api_key=os.environ["MORSE_API_KEY"], model="moonshotai/kimi-k3.1-pro", ) print(llm.invoke("Hello").content) ``` `ChatOpenAI` sends `temperature`, `top_p`, and `stop` only when you set them. They reach the provider only while **Let my settings reach the model host** on the key's page in the [console](https://console.trymorse.ai) is on. See [Settings](https://trymorse.ai/inference/docs/api/parameters#settings). ## Send Morse's own parameters Put them in `extra_body`. `model_kwargs` fails on a parameter OpenAI doesn't know. ``` llm = ChatOpenAI( base_url="https://inference.trymorse.ai/v1", api_key=os.environ["MORSE_API_KEY"], model="z-ai/glm-5.3", extra_body={"provider": {"min_privacy": "tee"}}, ) ``` ## Tools and agents Bind tools to the model, and its response carries the calls it wants to make. ``` from langchain_core.tools import tool @tool def get_weather(city: str) -> str: """The weather now in a city.""" return f"It's raining in {city}." reply = llm.bind_tools([get_weather]).invoke("Is it raining in Lisbon?") print(reply.tool_calls) ``` `create_agent` runs the calls and sends the results back until the model answers. ``` from langchain.agents import create_agent agent = create_agent( llm, tools=[get_weather], system_prompt="You answer questions about the weather.", ) result = agent.invoke( {"messages": [{"role": "user", "content": "Is it raining in Lisbon?"}]} ) print(result["messages"][-1].content) ``` ## Streaming ``` llm = ChatOpenAI( base_url="https://inference.trymorse.ai/v1", api_key=os.environ["MORSE_API_KEY"], model="moonshotai/kimi-k3.1-pro", stream_usage=True, ) for chunk in llm.stream("Write a haiku about rain."): print(chunk.content, end="", flush=True) ``` `ChatOpenAI` asks for the token counts only on OpenAI's own base URL, so set `stream_usage=True` to get them. Add the chunks together, and the sum's `usage_metadata` holds them. ## LangGraph In a graph of your own, the model is a node like any other. This one calls the model, runs its tool calls, and loops until the model answers. ``` from langgraph.graph import START, MessagesState, StateGraph from langgraph.prebuilt import ToolNode, tools_condition tools = [get_weather] model = llm.bind_tools(tools) def call_model(state: MessagesState): return {"messages": [model.invoke(state["messages"])]} builder = StateGraph(MessagesState) builder.add_node("model", call_model) builder.add_node("tools", ToolNode(tools)) builder.add_edge(START, "model") builder.add_conditional_edges("model", tools_condition) builder.add_edge("tools", "model") graph = builder.compile() graph.invoke({"messages": [{"role": "user", "content": "Is it raining in Lisbon?"}]}) ``` LangGraph's `create_react_agent` has moved to LangChain's `create_agent`, above. --- Use Morse's private, OpenAI-compatible API as the LLM in LlamaIndex for chat, agents, and queries: set it up and check it works. Updated December 3, 2026. Page: https://trymorse.ai/inference/docs/llamaindex # LlamaIndex Give LlamaIndex's `OpenAILike` Morse's base URL, your key, a model id, and that model's context window. Terminal ``` pip install llama-index-llms-openai-like ``` Python ``` import os from llama_index.llms.openai_like import OpenAILike llm = OpenAILike( model="moonshotai/kimi-k3.1-pro", api_base="https://inference.trymorse.ai/v1", api_key=os.environ["MORSE_API_KEY"], is_chat_model=True, is_function_calling_model=True, context_window=1048576, ) print(llm.complete("Hello").text) ``` - `is_chat_model=True` sends `/v1/chat/completions`. Without it, LlamaIndex calls the legacy completions endpoint, which Morse doesn't serve. - `is_function_calling_model=True` lets agents send tools. - `context_window` is the model's context, from the [models page](https://trymorse.ai/inference/models). ## Streaming ``` from llama_index.core.llms import ChatMessage messages = [ChatMessage(role="user", content="Write a haiku about rain.")] for chunk in llm.stream_chat(messages): print(chunk.delta, end="", flush=True) ``` ## Agents A `FunctionAgent` sends its tools with each request and runs the calls the model returns. ``` import asyncio from llama_index.core.agent.workflow import FunctionAgent def get_weather(city: str) -> str: """The weather now in a city.""" return f"It's raining in {city}." agent = FunctionAgent(tools=[get_weather], llm=llm) async def main(): print(await agent.run("Is it raining in Lisbon?")) asyncio.run(main()) ``` ## Send Morse's own parameters Put them in `extra_body` inside `additional_kwargs`. ``` llm = OpenAILike( model="z-ai/glm-5.3", api_base="https://inference.trymorse.ai/v1", api_key=os.environ["MORSE_API_KEY"], is_chat_model=True, is_function_calling_model=True, context_window=1048576, additional_kwargs={"extra_body": {"provider": {"min_privacy": "tee"}}}, ) ``` Morse serves no embeddings. For an index, set `Settings.embed_model` to an embedding model from elsewhere. See [API reference](https://trymorse.ai/inference/docs/api#endpoints). --- Add Morse to a LiteLLM proxy or SDK call. Updated November 27, 2026. Page: https://trymorse.ai/inference/docs/litellm # LiteLLM Call `completion` with Morse's base URL, your key, and the model id after an `openai/` prefix. Python ``` import os from litellm import completion reply = completion( model="openai/moonshotai/kimi-k3.1-pro", api_base="https://inference.trymorse.ai/v1", api_key=os.environ["MORSE_API_KEY"], messages=[{"role": "user", "content": "Hello"}], ) ``` The `openai/` prefix tells LiteLLM to speak OpenAI's format, and the rest is Morse's model id. Pass Morse's own parameters in `extra_body`, such as `extra_body={"provider": {"min_privacy": "tee"}}`. A reasoning model's thinking comes back in `reasoning_content`. ## The LiteLLM proxy List each Morse model you want under a name of your own. Parameters in `extra_body` go into every request to that model. config.yaml ``` model_list: - model_name: kimi litellm_params: model: openai/moonshotai/kimi-k3.1-pro api_base: https://inference.trymorse.ai/v1 api_key: os.environ/MORSE_API_KEY - model_name: glm-tee litellm_params: model: openai/z-ai/glm-5.3 api_base: https://inference.trymorse.ai/v1 api_key: os.environ/MORSE_API_KEY extra_body: provider: min_privacy: tee ``` The proxy won't start without a master key. Your clients send it in place of your Morse key, which stays with the proxy. Terminal ``` export MORSE_API_KEY="sk_morse_..." export LITELLM_MASTER_KEY="sk-..." litellm --config config.yaml ``` ``` client = OpenAI( base_url="http://localhost:4000", api_key=os.environ["LITELLM_MASTER_KEY"], ) client.chat.completions.create( model="kimi", messages=[{"role": "user", "content": "Hello"}], ) ``` ## Fallbacks Morse already fails over between a model's endpoints, at or above your floor: see [Failover](https://trymorse.ai/inference/docs/provider-routing#failover). When a request to one model fails, a LiteLLM fallback sends it to another model. ``` router_settings: fallbacks: [{"kimi": ["glm-tee"]}] litellm_settings: num_retries: 2 ``` Give a fallback a privacy floor at least as high as the model it replaces, or set the floor on your Morse key. Without one, a fallback can run at a lower tier than the request it replaces. Keep `num_retries` low, since a retry that reached the model is billed again. --- Run CrewAI agents and crews on Morse's private, OpenAI-compatible API: set the base URL, pick a model, and check it works. Updated December 3, 2026. Page: https://trymorse.ai/inference/docs/crewai # CrewAI Make a CrewAI `LLM` with `openai/` before the Morse model id, Morse's base URL, and your key. Terminal ``` pip install crewai ``` Python ``` import os from crewai import LLM llm = LLM( model="openai/moonshotai/kimi-k3.1-pro", base_url="https://inference.trymorse.ai/v1", api_key=os.environ["MORSE_API_KEY"], context_window_size=1048576, ) print(llm.call("Hello")) ``` The `openai/` prefix and the base URL send the request through CrewAI's OpenAI client, as `moonshotai/kimi-k3.1-pro`. Set `context_window_size` to the model's context. Without it, CrewAI assumes the model takes 8,192 tokens. ## Give it to a crew Pass the same LLM to each agent. ``` from crewai import Agent, Crew, Task writer = Agent( role="Writer", goal="Explain technical terms in one sentence", backstory="You write short, plain explanations.", llm=llm, ) task = Task( description="Explain what a TEE is.", expected_output="One sentence.", agent=writer, ) print(Crew(agents=[writer], tasks=[task]).kickoff()) ``` Give every agent the `llm`. An agent without one calls CrewAI's default, an OpenAI model on OpenAI's API. ## Send Morse's own parameters Pass them as `extra_body`. ``` llm = LLM( model="openai/z-ai/glm-5.3", base_url="https://inference.trymorse.ai/v1", api_key=os.environ["MORSE_API_KEY"], context_window_size=1048576, extra_body={"provider": {"min_privacy": "tee"}}, ) ``` --- Use Morse's private, OpenAI-compatible API as the model of a Pydantic AI agent: set it up, pick a model, and check it works. Updated December 3, 2026. Page: https://trymorse.ai/inference/docs/pydantic-ai # Pydantic AI Give an `OpenAIChatModel` an `OpenAICompatibleProvider` with Morse's base URL and your key. Terminal ``` pip install "pydantic-ai-slim[openai]" ``` Python ``` import os from pydantic_ai import Agent from pydantic_ai.models.openai import OpenAIChatModel from pydantic_ai.providers.openai_compatible import OpenAICompatibleProvider provider = OpenAICompatibleProvider( "morse", base_url="https://inference.trymorse.ai/v1", api_key=os.environ["MORSE_API_KEY"], ) agent = Agent( OpenAIChatModel("moonshotai/kimi-k3.1-pro", provider=provider), instructions="Answer in one sentence.", ) result = agent.run_sync("What is a TEE?") print(result.output) ``` The provider's name, `morse`, labels the run in its message history and traces. Pydantic AI reads the part of the id before the slash to choose how it builds each request for that model's family. ## Tools A tool is a function on the agent. Pydantic AI sends it in `tools` and runs the calls the model returns. ``` @agent.tool_plain def get_weather(city: str) -> str: """The weather now in a city.""" return f"It's raining in {city}." print(agent.run_sync("Is it raining in Lisbon?").output) ``` ## Streaming ``` async with agent.run_stream("Write a haiku about rain.") as result: async for text in result.stream_text(delta=True): print(text, end="", flush=True) ``` ## Send Morse's own parameters Put them in `extra_body` in the agent's `model_settings`. ``` agent = Agent( OpenAIChatModel("z-ai/glm-5.3", provider=provider), model_settings={"extra_body": {"provider": {"min_privacy": "tee"}}}, ) ``` --- Point a coding agent, editor, or chat app at Morse, and pick a model for coding. Updated December 1, 2026. Page: https://trymorse.ai/inference/docs/tools # Tools and coding agents Give a tool Morse's base URL, your key, and a model id. Each tool's page says where they go: - [Aider](https://trymorse.ai/inference/docs/tools/aider) - [AnythingLLM](https://trymorse.ai/inference/docs/tools/anythingllm) - [Appsmith](https://trymorse.ai/inference/docs/tools/appsmith) - [Baserow](https://trymorse.ai/inference/docs/tools/baserow) - [bolt.diy](https://trymorse.ai/inference/docs/tools/bolt-diy) - [CC Switch](https://trymorse.ai/inference/docs/tools/cc-switch) - [Chatbox](https://trymorse.ai/inference/docs/tools/chatbox) - [Cherry Studio](https://trymorse.ai/inference/docs/tools/cherry-studio) - [Claude Code](https://trymorse.ai/inference/docs/tools/claude-code) - [Claude Cowork](https://trymorse.ai/inference/docs/tools/claude-cowork) - [Cline](https://trymorse.ai/inference/docs/tools/cline) - [CLIProxyAPI](https://trymorse.ai/inference/docs/tools/cliproxyapi) - [Cloudflare AI Gateway](https://trymorse.ai/inference/docs/tools/cloudflare-ai-gateway) - [Cloudflare Workers](https://trymorse.ai/inference/docs/tools/cloudflare-workers) - [Codex](https://trymorse.ai/inference/docs/tools/codex) - [Continue](https://trymorse.ai/inference/docs/tools/continue) - [Copilot for Obsidian](https://trymorse.ai/inference/docs/tools/copilot-for-obsidian) - [Cowrie](https://trymorse.ai/inference/docs/tools/cowrie) - [Crush](https://trymorse.ai/inference/docs/tools/crush) - [Cursor](https://trymorse.ai/inference/docs/tools/cursor) - [Dify](https://trymorse.ai/inference/docs/tools/dify) - [Dyad](https://trymorse.ai/inference/docs/tools/dyad) - [Flowise](https://trymorse.ai/inference/docs/tools/flowise) - [GitHub Copilot](https://trymorse.ai/inference/docs/tools/github-copilot) - [Goose](https://trymorse.ai/inference/docs/tools/goose) - [Grok CLI](https://trymorse.ai/inference/docs/tools/grok-cli) - [Hermes Agent](https://trymorse.ai/inference/docs/tools/hermes-agent) - [Jan](https://trymorse.ai/inference/docs/tools/jan) - [Kilo Code](https://trymorse.ai/inference/docs/tools/kilo-code) - [LibreChat](https://trymorse.ai/inference/docs/tools/librechat) - [LobeChat](https://trymorse.ai/inference/docs/tools/lobechat) - [n8n](https://trymorse.ai/inference/docs/tools/n8n) - [NocoDB](https://trymorse.ai/inference/docs/tools/nocodb) - [Open WebUI](https://trymorse.ai/inference/docs/tools/open-webui) - [OpenClaw](https://trymorse.ai/inference/docs/tools/openclaw) - [OpenCode](https://trymorse.ai/inference/docs/tools/opencode) - [Pi](https://trymorse.ai/inference/docs/tools/pi) - [promptfoo](https://trymorse.ai/inference/docs/tools/promptfoo) - [PwnDoc](https://trymorse.ai/inference/docs/tools/pwndoc) - [r2ai](https://trymorse.ai/inference/docs/tools/r2ai) - [SillyTavern](https://trymorse.ai/inference/docs/tools/sillytavern) - [Strands Agents](https://trymorse.ai/inference/docs/tools/strands) - [STRIDE GPT](https://trymorse.ai/inference/docs/tools/stride-gpt) - [Strix](https://trymorse.ai/inference/docs/tools/strix) - [Supabase Edge Functions](https://trymorse.ai/inference/docs/tools/supabase-edge-functions) - [Teable](https://trymorse.ai/inference/docs/tools/teable) - [Typebot](https://trymorse.ai/inference/docs/tools/typebot) - [Windmill](https://trymorse.ai/inference/docs/tools/windmill) - [Zed](https://trymorse.ai/inference/docs/tools/zed) Any other tool that takes an OpenAI-compatible base URL takes `https://inference.trymorse.ai/v1`. Give each tool its own key with a spend limit, so one tool can't spend all your credits. To keep a tool at a privacy floor, set the floor on its key. See [Limit a key](https://trymorse.ai/inference/docs/authentication#limits). ## Which models suit coding Pick a model with tool calls and a long context: an agent calls tools on every turn and reads a lot of code. Each of these takes tools on every endpoint a key reaches without a floor. | Model | Context | Input / output | Why | | --- | --- | --- | --- | | `qwen/qwen3-coder` | 256K | $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). --- Connect Aider to the private Morse API, uncensored models included: set it up, pick a model, and check it works. Updated December 4, 2026. Page: https://trymorse.ai/inference/docs/tools/aider # Use Aider with a private, uncensored API Give [Aider](https://aider.chat) the base URL `https://inference.trymorse.ai/v1` and a Morse API key. It calls the OpenAI API. The same key also calls 15 uncensored models. [See them](https://trymorse.ai/inference/uncensored). ## Before you start Make a key for Aider 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 Aider 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 Aider for you. Or set it up by hand, below. Setup prompt ``` Set up Aider 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/aider, then run its check. Change only Aider's settings. Leave everything else as it is. ``` ## Set up Aider 1. Describe the model to AiderAdd an entry for the model to `.aider.model.settings.yml`, in your home directory or your repository. It sets the edit format, leaves out `temperature`, and lets `--reasoning-effort` reach the model..aider.model.settings.yml`- name: openai/qwen/qwen3-coder edit_format: diff use_repo_map: true use_temperature: false accepts_settings: ["reasoning_effort"]`The name must match `--model` exactly. An entry replaces everything Aider would guess about the model, so keep `edit_format` in it. 2. Give Aider the model's limits and pricesAdd the model to `.aider.model.metadata.json`, in the same folder. It gives the model's context window, output limit, and prices, so Aider keeps the chat within the window and shows what it costs..aider.model.metadata.json`{ "openai/qwen/qwen3-coder": { "max_input_tokens": 229376, "max_output_tokens": 32768, "max_tokens": 32768, "input_cost_per_token": 3.75e-7, "output_cost_per_token": 0.00000125, "litellm_provider": "openai", "mode": "chat" } }`To keep the file elsewhere, start Aider with `--model-metadata-file` and its path. 3. Start AiderIn your repository, point Aider at Morse and start it. To use another model from the table below, change `--model` and both entries' names and numbers.Terminal`export OPENAI_API_BASE=https://inference.trymorse.ai/v1 export OPENAI_API_KEY="$MORSE_API_KEY" aider --model openai/qwen/qwen3-coder` ## Which model to pick | Model | Context | Input / output | Why | | --- | --- | --- | --- | | `qwen/qwen3-coder` | 256K | $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 Ask Aider to change a line in one of your files. It writes the edit as text and commits it, so a new commit shows that Morse took the request. Aider needs no tool calls. ## Keep it private Set a privacy floor on Aider'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 | | --- | --- | | `400 setting_not_forwarded` | Add `use_temperature: false` to the model's entry. | | `401 invalid_api_key` | Check that `MORSE_API_KEY` is set where Aider 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). --- Connect AnythingLLM to the private Morse API, uncensored models included: set it up, pick a model, and check it works. Updated December 4, 2026. Page: https://trymorse.ai/inference/docs/tools/anythingllm # Use AnythingLLM with a private, uncensored API Give [AnythingLLM](https://anythingllm.com) the base URL `https://inference.trymorse.ai/v1` and a Morse API key. It calls the OpenAI API. The same key also calls 15 uncensored models. [See them](https://trymorse.ai/inference/uncensored). For uncensored chat, use `z-ai/glm-5.3-flash-uncensored` (GLM 5.3 Flash Uncensored, abliterated), which supports tool calling. ## Before you start Make a key for AnythingLLM 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 AnythingLLM's settings, or into its `.env` file. ## Set up AnythingLLM 1. Choose Generic OpenAIIn AnythingLLM, open **Settings > AI Providers > LLM**. Under **LLM Provider**, choose **Generic OpenAI**. 2. Fill in Morse's details**Base URL**: `https://inference.trymorse.ai/v1`**API Key**: your key **Model context window**: `262144`**Max Tokens**: `8192`**Selected Model**: `qwen/qwen3-coder`Once the URL and key are in, **Selected Model** lists Morse's models. Choose **Save changes**. 3. Or set it in the .env fileFor AnythingLLM in Docker, put these in the `.env` file it starts with..env`LLM_PROVIDER='generic-openai' GENERIC_OPEN_AI_BASE_PATH='https://inference.trymorse.ai/v1' GENERIC_OPEN_AI_API_KEY='sk_morse_...' GENERIC_OPEN_AI_MODEL_PREF='qwen/qwen3-coder' GENERIC_OPEN_AI_MODEL_TOKEN_LIMIT=262144 GENERIC_OPEN_AI_MAX_TOKENS=8192` ## Which model to pick | Model | Context | Input / output | Why | | --- | --- | --- | --- | | `qwen/qwen3-coder` | 256K | $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 A filled **Selected Model** list shows that Morse took your key. Then send a message in a workspace: the response streams in from Morse. ## Keep it private Set a privacy floor on AnythingLLM'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 | | --- | --- | | **Selected Model** is empty | Check that **Base URL** ends in `/v1`, and that the key is whole. | | `401 invalid_api_key` | Check the key you gave AnythingLLM 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). --- Connect Appsmith to the private Morse API, uncensored models included: set it up, pick a model, and check it works. Updated December 4, 2026. Page: https://trymorse.ai/inference/docs/tools/appsmith # Use Appsmith with a private, uncensored API Give [Appsmith](https://www.appsmith.com) the base URL `https://inference.trymorse.ai/v1` and a Morse API key. It calls the OpenAI API. The same key also calls 15 uncensored models. [See them](https://trymorse.ai/inference/uncensored). ## Before you start Make a key for Appsmith 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 an Appsmith datasource. Appsmith keeps it encrypted on its server, which calls Morse, so your app's users never see it. ## Set up Appsmith 1. Make an Authenticated API datasourceChoose **Create datasource**, and under **APIs**, choose **Authenticated API**. Fill in:**URL**: `https://inference.trymorse.ai/v1`**Authentication type**: **Bearer token** **Bearer token**: your key, without the word Bearer Choose **Save**. Don't use the OpenAI datasource: it calls OpenAI's address whatever you set. 2. Add a query that calls MorseOn the datasource, add a query named `AskMorse`. Set the method to **POST**, the path to `/chat/completions`, and the header `content-type` to `application/json`. Give it this body:Body`{ "model": "qwen/qwen3-coder", "messages": [{ "role": "user", "content": {{Input1.text}} }], "max_tokens": 1024 }`In the query's **Settings**, set **API timeout** to `60000`, its most. Appsmith waits 10 seconds by default. 3. Show the responseBind a Text widget to `{{AskMorse.data.choices[0].message.content}}`, and run the query from a button. Don't call Morse with `fetch` in a JS Object: that runs in the browser, which Morse's API refuses. ## Which model to pick | Model | Context | Input / output | Why | | --- | --- | --- | --- | | `qwen/qwen3-coder` | 256K | $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 Choose **Run** on the query. A `200` with `choices[0].message.content` shows that Morse took the request. Appsmith's datasource test sends nothing, so **Run** is the check. ## Keep it private Set a privacy floor on Appsmith'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 | | --- | --- | | `404 not_found` | Keep `/v1` on the datasource's **URL**, and use `/chat/completions` as the path. | | The query times out | Lower `max_tokens`, or pick a faster model. Appsmith stops waiting after 60 seconds at most. | | `401 invalid_api_key` | Check the key you gave Appsmith 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). --- Connect Baserow to the private Morse API, uncensored models included: set it up, pick a model, and check it works. Updated December 4, 2026. Page: https://trymorse.ai/inference/docs/tools/baserow # Use Baserow with a private, uncensored API Give [Baserow](https://baserow.io) the base URL `https://inference.trymorse.ai/v1` and a Morse API key. It calls OpenAI's Responses API, which Morse serves too. The same key also calls 15 uncensored models. [See them](https://trymorse.ai/inference/uncensored). ## Before you start Make a key for Baserow 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 Baserow's AI providers. Baserow's server calls Morse, so the key never reaches the browser. ## Set up Baserow 1. Open AI providersFor every workspace, an instance admin opens **Admin tools > AI providers**. For one workspace, a workspace admin opens the workspace's **Settings > AI providers**. 2. Add Morse as the OpenAI providerChoose **Add provider**, set **Provider type** to **OpenAI**, and fill in:**API key**: your key **Organization**: leave it empty **Base URL**: `https://inference.trymorse.ai/v1`Each page takes one OpenAI provider. If OpenAI already has the instance's, add Morse on a workspace instead. 3. Add a modelUnder **Models**, choose **Add model**. Type `qwen/qwen3-coder` in **Model identifier**, and tick the features it serves under **Available for**. To run Kuma on Morse, pick it for Kuma under **AI features**. ## Which model to pick | Model | Context | Input / output | Why | | --- | --- | --- | --- | | `qwen/qwen3-coder` | 256K | $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 Choose **Test model**. Baserow sends Morse a short request, and a tool call when Kuma is ticked. It shows **Test passed** when Morse returns them. ## Keep it private Set a privacy floor on Baserow'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 | | --- | --- | | Changing `BASEROW_OPENAI_API_KEY` or `BASEROW_OPENAI_BASE_URL` does nothing | Baserow 2.4 reads those once, into **AI providers**. Change the key and base URL there. | | An AI prompt over a PDF or a long document fails | Baserow uploads those to OpenAI's Files API, which Morse doesn't serve. Text up to 10 KB and images work. | | `401 invalid_api_key` | Check the key you gave Baserow 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). --- Connect bolt.diy to the private Morse API, uncensored models included: set it up, pick a model, and check it works. Updated December 4, 2026. Page: https://trymorse.ai/inference/docs/tools/bolt-diy # Use bolt.diy with a private, uncensored API Give [bolt.diy](https://github.com/stackblitz-labs/bolt.diy) the base URL `https://inference.trymorse.ai/v1` and a Morse API key. It calls the OpenAI API. The same key also calls 15 uncensored models. [See them](https://trymorse.ai/inference/uncensored). ## Before you start Make a key for bolt.diy 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 put the key in bolt.diy's `.env.local` file. bolt.diy's server reads it there, so it never reaches the browser. ## Set it up with a prompt Paste this into a coding agent, such as Claude Code or Codex, and it sets up bolt.diy for you. Or set it up by hand, below. Setup prompt ``` Set up bolt.diy 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/bolt-diy, then run its check. Change only bolt.diy's settings. Leave everything else as it is. ``` ## Set up bolt.diy 1. Give OpenAILike Morse's detailsIn the bolt.diy folder, add these lines to `.env.local`:.env.local`OPENAI_LIKE_API_BASE_URL=https://inference.trymorse.ai/v1 OPENAI_LIKE_API_KEY=sk_morse_...`bolt.diy adds `/chat/completions` and `/models` to the base URL itself. Keep `.env.local` out of git. 2. Restart bolt.diyStop bolt.diy, and start it again with `pnpm run dev`, or with `docker compose` as you started it. bolt.diy reads `.env.local` only as it starts, and then turns on **OpenAILike**. 3. Pick a Morse modelIn the chat box, choose **OpenAILike** as the provider. bolt.diy lists every model Morse serves. Pick `qwen/qwen3-coder`. ## Which model to pick | Model | Context | Input / output | Why | | --- | --- | --- | --- | | `qwen/qwen3-coder` | 256K | $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 Ask bolt.diy to build a small app. The code streams in from Morse, and bolt.diy writes the files. A key Morse refuses shows `Invalid or missing API key` in the chat. ## Keep it private Set a privacy floor on bolt.diy'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 | | --- | --- | | OpenAILike lists no models | Check the key in .env.local, and restart bolt.diy. Morse refuses the model list request when the key is wrong. | | **Provider Status** shows OpenAILike as unhealthy | Ignore it. That check calls Morse from your browser, which Morse's API refuses. Chats run on bolt.diy's server. | | Responses stop partway through a long file | bolt.diy sends OpenAILike models an output limit of 8,192 tokens. Ask it to continue, or to split the file. | | `401 invalid_api_key` | Check the key you gave bolt.diy 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). --- Connect CC Switch to the private Morse API, uncensored models included: set it up, pick a model, and check it works. Updated December 4, 2026. Page: https://trymorse.ai/inference/docs/tools/cc-switch # Use CC Switch with a private, uncensored API Give [CC Switch](https://github.com/farion1231/cc-switch) the base URL `https://inference.trymorse.ai` and a Morse API key. It calls Anthropic's Messages API, which Morse serves too. The same key also calls 15 uncensored models. [See them](https://trymorse.ai/inference/uncensored). ## Before you start Make a key for CC Switch 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 CC Switch, which writes it into Claude Code's settings as written. ## Set up CC Switch 1. Add Morse for Claude CodeChoose **Claude Code** at the top of CC Switch, then **Add Provider**. Pick **Custom Configuration** and name it Morse.Paste your key in **API Key**.Set **API Endpoint** to `https://inference.trymorse.ai`, without `/v1`. Claude Code adds `/v1/messages` itself.Under **Advanced Options**, leave **Upstream Format** on **Anthropic Messages (Native)**. 2. Set the modelsUnder **Model Mapping**, type `moonshotai/kimi-k3.1-pro` and choose **Quick Set** to give it every role. Set **Default fallback model** to the same id, then choose **Add**. Claude Code sends background work to its Haiku role, which can take a cheaper model from the table below. 3. Switch to MorseChoose **Enable** on the Morse card, then start a new Claude Code session in your project's folder. 4. Add Morse for CodexTo switch Codex too, choose **Codex** at the top, then **Add Provider** and **Custom Configuration**.Paste your key in **API Key**.Set **API Request URL** to `https://inference.trymorse.ai/v1`, with `/v1`.Leave **Upstream Format** on **OpenAI Responses API (Native)**, and set **Default Model** to `moonshotai/kimi-k3.1-pro`.Choose **Add**, then **Enable**, and restart Codex. ## Which model to pick | Model | Context | Input / output | Why | | --- | --- | --- | --- | | `qwen/qwen3-coder` | 256K | $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 Ask Claude Code to change a line in one of your files. It reads the file and edits it with its tools, so a finished edit shows that Morse took the request and its tool calls. ## Keep it private Set a privacy floor on CC Switch'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 | | --- | --- | | Claude Code reports a problem with the selected model | Take `/v1` off **API Endpoint**, and check that each role in **Model Mapping** names a model from the table above. | | Codex still uses its own models | Restart Codex after you choose Enable. Codex reads its settings only as it starts. | | `401 invalid_api_key` | Check the key you gave CC Switch 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). --- Connect Chatbox to the private Morse API, uncensored models included: set it up, pick a model, and check it works. Updated December 4, 2026. Page: https://trymorse.ai/inference/docs/tools/chatbox # Use Chatbox with a private, uncensored API Give [Chatbox](https://chatboxai.app) the base URL `https://inference.trymorse.ai/v1` and a Morse API key. It calls the OpenAI API. The same key also calls 15 uncensored models. [See them](https://trymorse.ai/inference/uncensored). ## Before you start Make a key for Chatbox 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 Chatbox's settings. ## Set up Chatbox 1. Add Morse as a providerIn the Chatbox desktop app, open **Settings > Model Provider** and choose **Add**. Name it Morse, set **API Mode** to **OpenAI API Compatible**, and choose **Add**. 2. Enter Morse's detailsPaste your key in **API Key**.Set `API Host` to `https://inference.trymorse.ai/v1`, with `/v1`.Leave **API Path** empty. Chatbox adds `/chat/completions` itself.The preview under them reads `https://inference.trymorse.ai/v1/chat/completions`. 3. Add modelsUnder **Model**, choose **Fetch** and add `qwen/qwen3-coder`, or choose **New** and type its id. Edit the model: under **Capabilities**, tick **Tool use**, and set **Context Window** to 262,144. Chatbox sends tools only to a model with Tool use ticked. ## Which model to pick | Model | Context | Input / output | Why | | --- | --- | --- | --- | | `qwen/qwen3-coder` | 256K | $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 Choose **Check** on the provider's page. Then start a new chat, pick `qwen/qwen3-coder` under Morse, and send a message. The response streams in from Morse. ## Keep it private Set a privacy floor on Chatbox'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 | | --- | --- | | `404` with `/v1/v1/` in the URL | Put `/v1` in `API Host` alone, and leave **API Path** empty. | | Chatbox on the web shows a network error | Use the desktop app. The web version calls Morse from your browser, which Morse's API refuses. | | `401 invalid_api_key` | Check the key you gave Chatbox 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). --- Connect Cherry Studio to the private Morse API, uncensored models included: set it up, pick a model, and check it works. Updated December 4, 2026. Page: https://trymorse.ai/inference/docs/tools/cherry-studio # Use Cherry Studio with a private, uncensored API Give [Cherry Studio](https://www.cherry-ai.com) the base URL `https://inference.trymorse.ai/v1` and a Morse API key. It calls the OpenAI API. The same key also calls 15 uncensored models. [See them](https://trymorse.ai/inference/uncensored). ## Before you start Make a key for Cherry Studio 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 Cherry Studio's settings. ## Set up Cherry Studio 1. Add Morse as a providerOpen **Settings** with the gear icon, choose **Model Provider**, then **Add Provider**. Name it Morse, paste your key in **API Key**, and under **Endpoint settings** set the OpenAI endpoint's **Base URL** to `https://inference.trymorse.ai/v1`. The **Request path** under it reads `https://inference.trymorse.ai/v1/chat/completions`. Choose **Add**. 2. Add modelsChoose **Sync models** to read Morse's models, then **+** beside `qwen/qwen3-coder` and any others from the table below. To add one by hand, choose **Add Model** and type its id in **Model ID**. 3. Turn Morse onTurn Morse on in the provider list, so its models show in Cherry Studio's model menu. ## Which model to pick | Model | Context | Input / output | Why | | --- | --- | --- | --- | | `qwen/qwen3-coder` | 256K | $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 Start a new chat, choose `qwen/qwen3-coder` under Morse, and send a message. The response streams in from Morse. ## Keep it private Set a privacy floor on Cherry Studio'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 | | --- | --- | | `401 invalid_api_key` | Check the key you gave Cherry Studio 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). --- Connect Claude Code to the private Morse API, uncensored models included: set it up, pick a model, and check it works. Updated December 4, 2026. Page: https://trymorse.ai/inference/docs/tools/claude-code # Use Claude Code with a private, uncensored API Give [Claude Code](https://code.claude.com/docs) the base URL `https://inference.trymorse.ai` and a Morse API key. It calls Anthropic's Messages API, which Morse serves too. The same key also calls 15 uncensored models. [See them](https://trymorse.ai/inference/uncensored). ## Before you start Make a key for Claude Code 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 Claude Code 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 Claude Code for you. Or set it up by hand, below. Setup prompt ``` Set up Claude Code to use Morse. 1. Use the Anthropic Messages endpoint https://inference.trymorse.ai 2. Read the key from the MORSE_API_KEY environment variable. 3. Default to the model moonshotai/kimi-k3.1-pro. 4. Follow https://trymorse.ai/inference/docs/tools/claude-code, then run its check. Change only Claude Code's settings. Leave everything else as it is. ``` ## Set up Claude Code 1. Point Claude Code at MorseSet these in the shell you start Claude Code from. Put them in your shell's profile to keep them.Terminal`export ANTHROPIC_BASE_URL=https://inference.trymorse.ai export ANTHROPIC_AUTH_TOKEN="$MORSE_API_KEY" export ANTHROPIC_MODEL=moonshotai/kimi-k3.1-pro export ANTHROPIC_DEFAULT_OPUS_MODEL=moonshotai/kimi-k3.1-pro export ANTHROPIC_DEFAULT_SONNET_MODEL=moonshotai/kimi-k3.1-pro export ANTHROPIC_DEFAULT_HAIKU_MODEL=z-ai/glm-5.3-flash export CLAUDE_CODE_MAX_OUTPUT_TOKENS=32000 export CLAUDE_CODE_AUTO_COMPACT_WINDOW=200000``ANTHROPIC_BASE_URL` is Morse's address without `/v1`: Claude Code adds `/v1/messages` itself, and with `/v1` on the end it reports a problem with the selected model.`ANTHROPIC_MODEL` is the model your session runs on. Claude Code still sends background work, such as naming the session, and some sub-agents to its opus, sonnet, and haiku models. Morse doesn't serve those names, so without the other three lines those requests fail with `404` before Claude Code falls back and warns you. Pick any models from the table below.The haiku line names the table's cheapest model, for background work. To use one model for everything, put its id on all four model lines.`CLAUDE_CODE_MAX_OUTPUT_TOKENS` is the output limit, at most the output limit of each model the lines name. Claude Code compacts the conversation as it nears `CLAUDE_CODE_AUTO_COMPACT_WINDOW`: the model's context window, or 200,000 tokens if the window is larger.Terminal`export CLAUDE_AUTOCOMPACT_PCT_OVERRIDE=12 export CLAUDE_CODE_FILE_READ_MAX_OUTPUT_TOKENS=6000 export MAX_THINKING_TOKENS=0 claude --tools=Bash,Read,Grep,Glob,Edit,Write` 2. Start Claude CodeIn your project's folder, run:Terminal`claude` ## Which model to pick | Model | Context | Input / output | Why | | --- | --- | --- | --- | | `qwen/qwen3-coder` | 256K | $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 Ask Claude Code to change a line in one of your files. It reads the file and edits it with its tools, so a finished edit shows that Morse took the request and its tool calls. Its responses stream as it works, and a model that reasons shows its thinking as it goes. ## Keep it private Set a privacy floor on Claude Code'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 | | --- | --- | | `401 invalid_api_key` | Check that `MORSE_API_KEY` is set where Claude Code 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). --- Connect Claude Cowork to the private Morse API, uncensored models included: set it up, pick a model, and check it works. Updated December 4, 2026. Page: https://trymorse.ai/inference/docs/tools/claude-cowork # Use Claude Cowork with a private, uncensored API Give [Claude Cowork](https://claude.com/docs/cowork/3p/gateway) the base URL `https://inference.trymorse.ai` and a Morse API key. It calls Anthropic's Messages API, which Morse serves too. The same key also calls 15 uncensored models. [See them](https://trymorse.ai/inference/uncensored). ## Before you start Make a key for Claude Cowork 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 the Claude app, which keeps it encrypted for your user. ## Set up Claude Cowork 1. Turn on Developer ModeIn the Claude desktop app, choose **Help > Troubleshooting > Enable Developer Mode**. Then choose **Developer > Configure Third-Party Inference**. 2. Add Morse as a gatewayChoose **Gateway**, and enter the values below. Or import them from a file with **Import configuration**.claude-cowork.json`{ "inferenceProvider": "gateway", "inferenceGatewayBaseUrl": "https://inference.trymorse.ai", "inferenceGatewayApiKey": "sk_morse_...", "inferenceGatewayAuthScheme": "bearer", "inferenceModels": [ { "name": "moonshotai/kimi-k3.1-pro", "labelOverride": "Kimi K3.1 Pro (Morse)" } ], "autoModeEnabled": false, "inferenceGatewayAutoModeServerChecks": false }``inferenceGatewayBaseUrl` is Morse's address without `/v1`. The app adds `/v1/messages` itself.`inferenceModels` names each model Cowork offers. Add any model from the table below.`autoModeEnabled` is off: Auto mode checks each action with a Claude model, which Morse doesn't serve. 3. Apply and restartChoose **Test connection**, then **Apply Changes**. Quit the app fully and open it again: it reads the settings only as it starts. ## Which model to pick | Model | Context | Input / output | Why | | --- | --- | --- | --- | | `qwen/qwen3-coder` | 256K | $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 Open Cowork, pick the Morse model, and ask it to make a short file in a folder you share with it. A finished file shows that Morse took the request and its tool calls. ## Keep it private Set a privacy floor on Claude Cowork'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 | | --- | --- | | No Morse model in the model menu | Name each model in `inferenceModels`. The app lists only Claude ids from a gateway's model list. | | Auto mode blocks an action | Set `autoModeEnabled` and `inferenceGatewayAutoModeServerChecks` to `false`, then restart the app. | | `401 invalid_api_key` | Check the key you gave Claude Cowork 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). --- Connect Cline to the private Morse API, uncensored models included: set it up, pick a model, and check it works. Updated December 4, 2026. Page: https://trymorse.ai/inference/docs/tools/cline # Use Cline with a private, uncensored API Give [Cline](https://cline.bot) the base URL `https://inference.trymorse.ai/v1` and a Morse API key. It calls the OpenAI API. The same key also calls 15 uncensored models. [See them](https://trymorse.ai/inference/uncensored). ## Before you start Make a key for Cline 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 Cline's settings. For Cline's CLI, keep it in your environment as `MORSE_API_KEY`. ## Set it up with a prompt Paste this into a coding agent, such as Claude Code or Codex, and it sets up Cline for you. Or set it up by hand, below. Setup prompt ``` Set up Cline 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/cline, then run its check. Change only Cline's settings. Leave everything else as it is. ``` ## Set up Cline 1. Choose OpenAI CompatibleOpen Cline's settings with the gear icon, and set **API Provider** to **OpenAI Compatible**. 2. Enter Morse's detailsSet **Base URL** to `https://inference.trymorse.ai/v1` and paste your key in **OpenAI Compatible API Key**. Cline then lists Morse's models under **Model ID**. Pick `qwen/qwen3-coder`, or any model from the table below. 3. Set the model's limitsOpen **Model Configuration**. Set **Context Window Size** to 262,144 and **Max Output Tokens** to 32,768. Leave **Temperature** empty so Cline sends none. 4. Or set it up in your terminalCline's CLI takes the provider, key, model, and base URL in one command, and keeps them for every run after. It has no option for the context window or the output limit.Terminal`npm install -g cline cline auth -p openai-compatible -k "$MORSE_API_KEY" -m qwen/qwen3-coder -b https://inference.trymorse.ai/v1` ## Which model to pick | Model | Context | Input / output | Why | | --- | --- | --- | --- | | `qwen/qwen3-coder` | 256K | $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 Ask Cline to change a line in one of your files. It reads the file and edits it with its tools, so a finished edit shows that Morse took the request and its tool calls. In a terminal, one command does the same: Terminal ``` cline "In README.md, fix the first typo you find." ``` ## Keep it private Set a privacy floor on Cline'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 | | --- | --- | | `401 invalid_api_key` | Check the key you gave Cline 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). --- Connect CLIProxyAPI to the private Morse API, uncensored models included: set it up, pick a model, and check it works. Updated December 4, 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 15 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` | 256K | $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). --- Connect Cloudflare AI Gateway to the private Morse API, uncensored models included: set it up, pick a model, and check it works. Updated December 4, 2026. Page: https://trymorse.ai/inference/docs/tools/cloudflare-ai-gateway # Use Cloudflare AI Gateway with a private, uncensored API Give [Cloudflare AI Gateway](https://developers.cloudflare.com/ai-gateway/) the base URL `https://inference.trymorse.ai/v1` and a Morse API key. It calls the OpenAI API. The same key also calls 15 uncensored models. [See them](https://trymorse.ai/inference/uncensored). ## Before you start Make a key for Cloudflare AI Gateway 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). Your app sends it in the `Authorization` header of each request, and AI Gateway passes it on to Morse. Keep it in your app's environment, where the examples below read it. ## Set up Cloudflare AI Gateway 1. Add Morse as a custom providerIn the Cloudflare dashboard, go to **Compute & AI > AI Gateway > Custom Providers** and select **Add Custom Provider**. Enter:**Provider Name**: `Morse`**Provider Slug**: `morse`**Base URL**: `https://inference.trymorse.ai/v1`Select **Save**. Your Morse key doesn't go in this form: it travels with each request, in its `Authorization` header. 2. Make a gateway with logs offIn **AI Gateway**, select **Create Gateway** and name it. Then open the gateway's **Settings**:Turn **Logs** off, so AI Gateway stores no prompts or responses.Select **Create authentication token**, and save the token. Cloudflare shows it once.Keep the token, your account ID and the gateway's ID beside your Morse key:Terminal`export MORSE_API_KEY="sk_morse_..." export CF_ACCOUNT_ID="your-account-id" export CF_GATEWAY_ID="your-gateway-id" export CF_AIG_TOKEN="your-gateway-token"` 3. Call Morse through the Unified APIAI Gateway's Unified API takes OpenAI's chat completions at `/compat/chat/completions`. Name the model `custom-morse/` followed by a Morse model's id from the table below. The gateway's token goes in `cf-aig-authorization`, and `cf-aig-collect-log: false` keeps the request out of the logs.Terminal`curl "https://gateway.ai.cloudflare.com/v1/$CF_ACCOUNT_ID/$CF_GATEWAY_ID/compat/chat/completions" \ -H "Authorization: Bearer $MORSE_API_KEY" \ -H "cf-aig-authorization: Bearer $CF_AIG_TOKEN" \ -H "cf-aig-collect-log: false" \ -H "Content-Type: application/json" \ -d '{ "model": "custom-morse/deepseek/deepseek-v4.1-flash-1017-abliterated", "messages": [{"role": "user", "content": "Say hello in five words."}] }'`With the OpenAI package for Python, point the client at the gateway's `/compat` address. It adds `/chat/completions` itself.hello.py`import os from openai import OpenAI client = OpenAI( api_key=os.environ["MORSE_API_KEY"], base_url=f"https://gateway.ai.cloudflare.com/v1/{os.environ['CF_ACCOUNT_ID']}/{os.environ['CF_GATEWAY_ID']}/compat", default_headers={ "cf-aig-authorization": f"Bearer {os.environ['CF_AIG_TOKEN']}", "cf-aig-collect-log": "false", }, ) response = client.chat.completions.create( model="custom-morse/deepseek/deepseek-v4.1-flash-1017-abliterated", messages=[{"role": "user", "content": "Say hello in five words."}], ) print(response.choices[0].message.content)` ## Which model to pick | Model | Context | Input / output | Why | | --- | --- | --- | --- | | `deepseek/deepseek-v4.1-flash-1017-abliterated` | 1M | $0.50 / $1.50 | Uncensored, reads images, and costs little. | | `z-ai/glm-5.3-uncensored` | 1M | $1.75 / $5 | Uncensored, and runs in an attested enclave (TEE). | | `moonshotai/kimi-k3.1-pro-uncensored` | 1M | $5 / $18.75 | Uncensored, and the most capable of these. | 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 the Python example: Terminal ``` python hello.py ``` It prints the model's five words, so the request went through AI Gateway to Morse and back. The curl answers with a `chat.completion` whose `choices[0].message.content` holds the same kind of response. The gateway's **Logs** keep no entry for it. ## Keep it private Keep AI Gateway's logging off for these requests: **Logs** off in the gateway's **Settings**, and `cf-aig-collect-log: false` on each request, as the examples send. Then AI Gateway stores no log of your prompts or Morse's responses. Leave **Caching** off, as it is on a new gateway. Add no Logpush job to this gateway: the header doesn't change what Logpush exports. AI Gateway forwards each request to Morse over its own TLS connection. Set a privacy floor on Cloudflare AI Gateway'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 | | --- | --- | | `401` from AI Gateway, code `2009` | Send the gateway's token in `cf-aig-authorization`, as `Bearer` and the token. If it's right, check the Morse key in `Authorization`: AI Gateway also answers 2009 when Morse turns a key away. | | `404` from AI Gateway, with no Morse error in the body | Start the model with `custom-` and the provider's slug exactly as saved, as `custom-morse/`. Check the account ID and the gateway's ID in the URL. | | `404 not_found` naming `/v1/v1/chat/completions` | Take `/v1` off the custom provider's **Base URL**, so it reads `https://inference.trymorse.ai`. | | `404 not_found` naming `POST /chat/completions` | Set the custom provider's **Base URL** to `https://inference.trymorse.ai/v1`, with `/v1`. | | `401 invalid_api_key` | Check the key you gave Cloudflare AI Gateway 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). --- Connect Cloudflare Workers to the private Morse API, uncensored models included: set it up, pick a model, and check it works. Updated December 4, 2026. Page: https://trymorse.ai/inference/docs/tools/cloudflare-workers # Use Cloudflare Workers with a private, uncensored API Give [Cloudflare Workers](https://developers.cloudflare.com/workers/) the base URL `https://inference.trymorse.ai/v1` and a Morse API key. It calls the OpenAI API. The same key also calls 15 uncensored models. [See them](https://trymorse.ai/inference/uncensored). ## Before you start Make a key for Cloudflare Workers 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). Store it as a secret of your Worker. For `wrangler dev`, put it in `.dev.vars`, and keep that file out of git. Terminal ``` npx wrangler secret put MORSE_API_KEY ``` .dev.vars ``` 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 Cloudflare Workers for you. Or set it up by hand, below. Setup prompt ``` Set up Cloudflare Workers 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/cloudflare-workers, then run its check. Change only Cloudflare Workers's settings. Leave everything else as it is. ``` ## Set up Cloudflare Workers 1. Call Morse from your WorkerInstall the OpenAI package with `npm install openai`. Then give it Morse's base URL and the secret:src/index.ts`import OpenAI from "openai"; export default { fetch: async (request, env): Promise => { const client = new OpenAI({ apiKey: env.MORSE_API_KEY, baseURL: "https://inference.trymorse.ai/v1", }); const completion = await client.chat.completions.create({ model: "qwen/qwen3-coder", messages: [{ role: "user", content: "Say hello in five words." }], }); return Response.json({ text: completion.choices[0]?.message?.content }); }, } satisfies ExportedHandler;`The package adds `/chat/completions` to the base URL itself. Plain `fetch` to `https://inference.trymorse.ai/v1/chat/completions` works too. 2. Check the Worker's settingsSet a `compatibility_date` of 2026-08-04 or later, which turns on the Node.js APIs the package needs. `secrets` makes Wrangler stop if the key is missing.wrangler.jsonc`{ "$schema": "./node_modules/wrangler/config-schema.json", "name": "morse-worker", "main": "src/index.ts", "compatibility_date": "2026-12-01", "secrets": { "required": ["MORSE_API_KEY"] } }` 3. Send it through AI GatewayTo log and cache the requests in AI Gateway, add Morse as a custom provider. In the dashboard, open **AI Gateway > Custom Providers** and choose **Add Custom Provider**:Set the slug to `morse`.Set the base URL to `https://inference.trymorse.ai`, without `/v1`. The gateway adds the path your Worker sends.Then point the client at the gateway, with a gateway token in `cf-aig-authorization`:src/index.ts`const client = new OpenAI({ apiKey: env.MORSE_API_KEY, baseURL: `https://gateway.ai.cloudflare.com/v1/${env.CF_ACCOUNT_ID}/${env.CF_GATEWAY_ID}/custom-morse/v1`, defaultHeaders: { "cf-aig-authorization": `Bearer ${env.CF_AIG_TOKEN}` }, });` ## Which model to pick | Model | Context | Input / output | Why | | --- | --- | --- | --- | | `qwen/qwen3-coder` | 256K | $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 Run the Worker on your machine, and call it: ``` npx wrangler dev curl http://localhost:8787 ``` The response holds the model's text, so Morse took the request. Then deploy it with `npx wrangler deploy`. ## Keep it private Set a privacy floor on Cloudflare Workers'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 | | --- | --- | | `404` with `/v1/v1/` in the URL | Take `/v1` off the custom provider's base URL in AI Gateway. | | `401` from AI Gateway | Send a gateway token with Run permission in `cf-aig-authorization`. Your Morse key stays in the OpenAI client's `apiKey`. | | `401 invalid_api_key` | Check the key you gave Cloudflare Workers 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). --- Connect Codex to the private Morse API, uncensored models included: set it up, pick a model, and check it works. Updated December 4, 2026. Page: https://trymorse.ai/inference/docs/tools/codex # Use Codex with a private, uncensored API Give [Codex](https://developers.openai.com/codex) the base URL `https://inference.trymorse.ai/v1` and a Morse API key. It calls OpenAI's Responses API, which Morse serves too. The same key also calls 15 uncensored models. [See them](https://trymorse.ai/inference/uncensored). ## Before you start Make a key for Codex 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 Codex 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 Codex for you. Or set it up by hand, below. Setup prompt ``` Set up Codex to use Morse. 1. Use the OpenAI Responses endpoint https://inference.trymorse.ai/v1 2. Read the key from the MORSE_API_KEY environment variable. 3. Default to the model moonshotai/kimi-k3.1-pro. 4. Follow https://trymorse.ai/inference/docs/tools/codex, then run its check. Change only Codex's settings. Leave everything else as it is. ``` ## Set up Codex 1. Add Morse as a providerAdd this to `~/.codex/config.toml`. It names Morse's base URL, the variable your key is in, and the model Codex starts on. `web_search = "disabled"` keeps Codex to the tools it runs on your machine.config.toml`model = "moonshotai/kimi-k3.1-pro" model_provider = "morse" web_search = "disabled" model_context_window = 1048576 model_auto_compact_token_limit = 200000 [model_providers.morse] name = "Morse" base_url = "https://inference.trymorse.ai/v1" env_key = "MORSE_API_KEY" wire_api = "responses"``model_context_window` is the model's context window, 1,048,576 tokens. Codex compacts the conversation when it reaches `model_auto_compact_token_limit`, three quarters of the window or 200,000 tokens, whichever is less. The response then still fits, and a long session's turns stay cheaper. 2. Start CodexIn your project's folder, run `codex`. To use another model, change `model` in the file to any model from the table below, and set the two limits from its context window.Terminal`codex` ## Which model to pick | Model | Context | Input / output | Why | | --- | --- | --- | --- | | `qwen/qwen3-coder` | 256K | $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 Ask Codex to change a line in one of your files. It edits files with `apply_patch`, so a finished edit shows that Morse took the request and its tool call. Morse keeps nothing: every response says `store: false`. ## Keep it private Set a privacy floor on Codex'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 | | --- | --- | | `Model metadata for ... not found` | Codex says this for every model that isn't OpenAI's, and still runs. Keep `model_context_window` and `model_auto_compact_token_limit` set as above, so it compacts before the window is full. | | `400 unsupported_parameter` | If it names `web_search`, set `web_search = "disabled"` in `config.toml`. | | `401 invalid_api_key` | Check that `MORSE_API_KEY` is set where Codex 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). --- Connect Continue to the private Morse API, uncensored models included: set it up, pick a model, and check it works. Updated December 4, 2026. Page: https://trymorse.ai/inference/docs/tools/continue # Use Continue with a private, uncensored API Give [Continue](https://www.continue.dev) the base URL `https://inference.trymorse.ai/v1` and a Morse API key. It calls the OpenAI API. The same key also calls 15 uncensored models. [See them](https://trymorse.ai/inference/uncensored). ## Before you start Make a key for Continue 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). Continue's extensions read the key from `~/.continue/.env`, so put it there: ~/.continue/.env ``` MORSE_API_KEY=sk_morse_... ``` Its CLI also reads `MORSE_API_KEY` from your environment. ## Set it up with a prompt Paste this into a coding agent, such as Claude Code or Codex, and it sets up Continue for you. Or set it up by hand, below. Setup prompt ``` Set up Continue 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/continue, then run its check. Change only Continue's settings. Leave everything else as it is. ``` ## Set up Continue 1. Add Morse as a modelAdd this to `~/.continue/config.yaml`. It names Morse's base URL, the secret your key is in, and the model's limits. `tool_use` lets Continue's agent mode call its tools on the model.config.yaml`name: Morse version: 1.0.0 schema: v1 models: - name: Qwen3 Coder 480B A35B provider: openai model: qwen/qwen3-coder apiBase: https://inference.trymorse.ai/v1 apiKey: ${{ secrets.MORSE_API_KEY }} roles: - chat - edit - apply capabilities: - tool_use defaultCompletionOptions: contextLength: 262144 maxTokens: 32768`To add another model from the table below, add another entry under `models` with its id. 2. Pick the modelIn VS Code or JetBrains, choose **Qwen3 Coder 480B A35B** in Continue's model menu. In a terminal, install the CLI and start it on the same file:Terminal`npm install -g @continuedev/cli cn --config ~/.continue/config.yaml` ## Which model to pick | Model | Context | Input / output | Why | | --- | --- | --- | --- | | `qwen/qwen3-coder` | 256K | $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 In agent mode, ask Continue to change a line in one of your files. It edits files with its tools, so a finished edit shows that Morse took the request and its tool calls. In a terminal, one command does the same: Terminal ``` cn -p "In README.md, fix the first typo you find." --config ~/.continue/config.yaml --allow Edit ``` ## Keep it private Set a privacy floor on Continue'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 | | --- | --- | | `401 invalid_api_key` | Check the key you gave Continue 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). --- Connect Copilot for Obsidian to the private Morse API, uncensored models included: set it up, pick a model, and check it works. Updated December 4, 2026. Page: https://trymorse.ai/inference/docs/tools/copilot-for-obsidian # Use Copilot for Obsidian with a private, uncensored API Give [Copilot for Obsidian](https://github.com/logancyang/obsidian-copilot) the base URL `https://inference.trymorse.ai/v1` and a Morse API key. It calls the OpenAI API. The same key also calls 15 uncensored models. [See them](https://trymorse.ai/inference/uncensored). ## Before you start Make a key for Copilot for Obsidian 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 Copilot's settings in Obsidian. ## Set up Copilot for Obsidian 1. Add Morse as a custom providerIn Obsidian, open **Settings > Copilot > BYOK** and choose **Add a provider**. At the bottom of the list, choose **Add a custom provider**. 2. Enter Morse's detailsSet **Display name** to Morse.Paste your key in **API key**.Set **Base URL** to `https://inference.trymorse.ai/v1`, with `/v1`. Copilot adds `/chat/completions` itself.Turn **Enable CORS** on. Morse's API refuses calls from a web page, and this sends them through Obsidian instead.Choose **Test**. Once it shows **Verified**, the model list fills from Morse. 3. Pick models and saveTick `qwen/qwen3-coder` and any others from the table below, or type an id and choose **Add**. Choose **Save**. To start new chats on it, open **Basic**, then the **Quick Chat** tab, and set **Default model**. ## Which model to pick | Model | Context | Input / output | Why | | --- | --- | --- | --- | | `qwen/qwen3-coder` | 256K | $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 Run **New Copilot Quick Chat** from the command palette, pick the Morse model, and send a message. The whole response arrives at once, since Enable CORS turns streaming off. ## Keep it private Set a privacy floor on Copilot for Obsidian'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 | | --- | --- | | Test passes, but Quick Chat fails | Turn **Enable CORS** on. Test always calls through Obsidian, so it passes without it. | | `401 invalid_api_key` | Check the key you gave Copilot for Obsidian 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). --- Connect Cowrie to the private Morse API, uncensored models included: set it up, pick a model, and check it works. Updated December 4, 2026. Page: https://trymorse.ai/inference/docs/tools/cowrie # Use Cowrie with a private, uncensored API Give [Cowrie](https://github.com/cowrie/cowrie) the base URL `https://inference.trymorse.ai/v1` and a Morse API key. It calls the OpenAI API. The same key also calls 15 uncensored models. [See them](https://trymorse.ai/inference/uncensored). ## Before you start Make a key for Cowrie 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 Cowrie 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 Cowrie for you. Or set it up by hand, below. Setup prompt ``` Set up Cowrie 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-flash-uncensored. 4. Follow https://trymorse.ai/inference/docs/tools/cowrie, then run its check. Change only Cowrie's settings. Leave everything else as it is. ``` ## Set up Cowrie 1. Why an uncensored modelCowrie is an SSH and Telnet honeypot. Its LLM backend has a model write the shell's output, so it answers any command.Run Cowrie only on servers and networks you control.Attackers type commands that fetch and run malicious scripts. A stock model can answer those with a refusal, which tells the attacker the shell isn't real. An uncensored model keeps playing the server. 2. Point the LLM backend at MorseIn `etc/cowrie.cfg`, change `backend = shell` under `[honeypot]` to `backend = llm`. Then set these lines under the `[llm]` section already in the file.Don't add either section a second time, or Cowrie won't start. Cowrie joins `host` and `path` into the URL it calls, so the `/v1` goes in `path`:etc/cowrie.cfg`[honeypot] backend = llm [llm] host = https://inference.trymorse.ai path = /v1/chat/completions model = z-ai/glm-5.3-flash-uncensored max_tokens = 2000`Keep the key out of the file. Cowrie reads any setting from an environment variable named `COWRIE_
_