Use Continue with a private API

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

Continue is an open-source coding assistant for VS Code and JetBrains, with a CLI, cn, that runs the same setup in your terminal. It speaks the OpenAI API, so it works with Morse: give it the base URL https://inference.trymorse.ai/v1 and a Morse API key, and its requests run on Morse's private inference, where Morse keeps nothing and no provider learns who you are.

Before you start

In the console, open API keys and make a key for Continue alone, with a spend limit, so a runaway session can't spend all your credits. See Limit a key.

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 up Continue

  1. Add Morse as a model

    Add 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: Kimi K2.7 Code
        provider: openai
        model: moonshotai/kimi-k2.7-code
        apiBase: https://inference.trymorse.ai/v1
        apiKey: ${{ secrets.MORSE_API_KEY }}
        roles:
          - chat
          - edit
          - apply
        capabilities:
          - tool_use
          - image_input
        defaultCompletionOptions:
          contextLength: 262144
          maxTokens: 32768

    To add another model from the table below, add another entry under models with its id.

  2. Pick the model

    In VS Code or JetBrains, choose Kimi K2.7 Code 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

ModelContextInput / outputWhy
moonshotai/kimi-k2.7-code262.1K$0.95 / $4Kimi's coding model. It doesn't reason, so it starts writing sooner.
moonshotai/kimi-k3.1-pro1M$2 / $10Reasons, and reads images.
z-ai/glm-5.31M$1.40 / $4.40Reasons, and takes tools at TEE too.
deepseek/deepseek-v4-pro-08131M$1.32 / $3.96Reasons, at a lower price.
z-ai/glm-5.3-flash1M$0.15 / $0.50Cheap 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.

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

A request runs on its model's default privacy tier. To hold Continue to a tier, such as one where only attested hardware reads your prompts, set a privacy floor on its key. See Privacy tiers and Provider routing.

If something goes wrong

What you seeWhat to do
401The key is missing or wrong. Check that MORSE_API_KEY is set where Continue starts, and that the key isn't revoked.
402Add credits, or raise the key's limit. Morse holds credit for a request's output limit before it starts. See Holds.
404Use a model's id exactly as the table above writes it, lab and all.

Every code is in Errors. For other tools, see Coding agents and editors.