Connect bolt.diy to the private Morse API, uncensored models included: set it up, pick a model, and check it works. Updated December 2, 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 12 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` | 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

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).
