> ## Documentation Index
> Fetch the complete documentation index at: /docs/llms.txt
> Use this file to discover all available pages before exploring further.

# OpenRouter setup

> Use OpenRouter to access hundreds of cloud AI models without a local server.

OpenRouter is a cloud AI service that lets you access hundreds of hosted models using your own API key. When OpenRouter is enabled, LMSA bypasses the local server entirely and sends requests directly to OpenRouter's cloud API.

**1. Create an OpenRouter account**

Go to [openrouter.ai](https://openrouter.ai) and create a free account. Generate an API key from your dashboard.

**2. Enable OpenRouter in LMSA**

Open **Settings** in LMSA and scroll to the **Use OpenRouter (Cloud AI)** toggle. Switch it on.

**3. Enter your API key**

Paste your API key into the **OpenRouter API Key** field that appears.

**4. Select a model**

Open the sidebar, tap **Options**, then the **Models** button. The full OpenRouter model catalog loads automatically. Tap **Load** next to any model to select it. Your selection is saved and remembered next session.

**5. Start chatting**

Return to the chat and send your first message. No local server is required.

## Key differences from local mode

* **No local server needed**: LM Studio and Ollama are not used when OpenRouter is active
* **Internet required**: All requests are sent to OpenRouter's cloud servers
* **Usage costs**: Most models charge per token; check OpenRouter's pricing page for details. Some free-tier models are available
* **Reasoning models**: Models with built-in reasoning (for example, DeepSeek R1) are fully supported and will display their thinking process
* **Model loading/ejecting**: Cloud models activate instantly; there is no download or hardware constraint

## Privacy notice

When OpenRouter is enabled, your messages are sent to OpenRouter's servers and then forwarded to the chosen model provider. Do not share sensitive personal information, passwords, or private data in your conversations. Review OpenRouter's privacy policy for details on how your data is handled.

Your API key is stored locally on your device only and is never sent to LMSA's servers.

## Troubleshooting

| Problem | Solution |
| - | - |
| No models loading | Verify your API key is correct and has not expired. Re-enter it in Settings if needed |
| "Server not running" error | Make sure the OpenRouter toggle is on and a valid API key is entered |
| Responses failing mid-stream | Check your internet connection and ensure your OpenRouter account has sufficient credits |
| Switching back to local | Turn the OpenRouter toggle off in Settings to return to LM Studio or Ollama mode |


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.