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

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

# Use Cursor with a private API

Give [Cursor](https://cursor.com) the base URL `https://inference.trymorse.ai/v1` and a Morse API key. It calls the OpenAI API.

## Before you start

Make a key for Cursor 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 Cursor's settings.

## Set up Cursor

1. Add a Morse modelOpen **Cursor Settings > Models** and choose **Add Custom Model**. Type `qwen/qwen3-coder`, choose **Add**, and turn the model on.
2. Point Cursor's OpenAI key at MorseOn the same page, open **API Keys**. In the **OpenAI API Key** group:Paste your key in **API Key**.Turn **Use OpenAI API Key** on, and confirm.Turn **Override OpenAI Base URL** on, and set **Base URL** to `https://inference.trymorse.ai/v1`. Cursor adds `/chat/completions` itself.Cursor sends each request through its own servers, which build the prompt and then call Morse.
3. Pick the modelIn the chat's model picker, choose `qwen/qwen3-coder`. Chat and Agent use Morse. Tab and cloud agents keep using Cursor's own models.

## Which model to pick

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

Prices are in dollars per million tokens, on each model's default endpoint. Every model is on the [models page](https://trymorse.ai/inference/models).

## Check it works

In Agent mode, ask Cursor to list the files in your folder. It calls a tool to read them, so an answer shows that Morse took both the request and its tools.

## Keep it private

Set a privacy floor on Cursor'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 |
| --- | --- |
| Cursor's own OpenAI models stop working | The override sends every OpenAI model to Morse. Turn **Override OpenAI Base URL** off to use Cursor's models again. |
| A pop-up asks for an OpenAI key and fails to check it | Close it, and paste the key under **API Keys** in Cursor Settings. The pop-up checks the key from Cursor's window, which Morse's API refuses. |
| `401 invalid_api_key` | Check the key you gave Cursor 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).
