LM Link is a new feature in LM Studio that provides a way to access local models across devices, wherever you are. Links are custom made, end-to-end encrypted networks intended for loading and serving LLMs across devices you own, made possible in partnership with Tailscale.
What can I do with LM Link? [#what-can-i-do-with-lm-link]
LM Link unlocks the full potential of your hardware by sharing compute across connected devices.
For example, you might have a powerful desktop in your home office, and a lightweight laptop you carry on the go. With LM Link, you can run large open-weight models on a powerful machine, and use them seamlessly from your laptop or your iPhone as if they were local.
To use LM Link on iPhone, [download Locally](https://apps.apple.com/us/app/locally-ai-local-ai-chat/id6741426692), link it to LM Studio, and those models are now in your pocket wherever you are. All communication and data transfer between devices is always end-to-end encrypted, thanks to Tailscale.
Use Cases [#use-cases]
LM Link use cases span individuals as well as teams.
You can manage a private link to keep your prized gaming GPU busy even when you're on the go. Moreover, LM Link allows you to set up LLM serving in a server and start using it with just few clicks.
Use LM Link with [#use-lm-link-with]
* **CLI** — manage LM Link from the terminal with [`lms link`](/docs/cli/link/link-enable)
* **REST API** — use remote models via the REST API with [LM Link](/docs/developer/core/lmlink)
* **Integrations** — use remote models with coding tools like Claude Code and Codex via [LM Link](/docs/integrations/lmlink)
[Locally](https://apps.apple.com/us/app/locally-ai-local-ai-chat/id6741426692) is LM Studio's mobile app, available for iPhone and iPad. Enable LM Link in Locally to use your largest local models running in LM Studio directly from your phone. All data and communication between your devices stay end-to-end encrypted.
Getting Started [#getting-started]
1. If you don't yet have LM Studio, [download it here](https://lmstudio.ai/download).
2. Sign in to your LM Studio account, and make sure LM Link is enabled in LM Studio.
3. [Download the Locally app](https://apps.apple.com/us/app/locally-ai-local-ai-chat/id6741426692) on your iPhone or iPad.
4. Sign in to Locally with the same account you used for LM Studio, and enable LM Link in Locally.
Your Locally and LM Studio devices will discover each other over the link, and you can begin using your largest models running in LM Studio, directly from your phone.
FAQ [#faq]
Use your integration as normal [#use-your-integration-as-normal]
Start LM Studio's server on your local machine and configure your tool to point to it. Model loads are routed to the device the model is loaded on or the preferred device if set.
Your local machine handles the API surface at `localhost:1234`, while the model runs on the device the model is present on.
```bash
lms server start --port 1234
```
Claude Code [#claude-code]
```bash
export ANTHROPIC_BASE_URL=http://localhost:1234
export ANTHROPIC_AUTH_TOKEN=lmstudio
claude --model qwen3-8b
```
See the full [Claude Code](/docs/integrations/claude-code) guide.
Codex [#codex]
```bash
codex --oss -m qwen3-8b
```
See the full [Codex](/docs/integrations/codex) guide.
Set a preferred device [#set-a-preferred-device]
To use a model on a specific remote device, set the device as the preferred device.
See [set a preferred device](/docs/lmlink/basics/preferred-device) for more details.
If you're running into trouble, hop onto our [Discord](https://discord.gg/lmstudio)
OpenClaw now supports LM Studio as a native model provider.
See: [OpenClaw Docs](https://docs.openclaw.ai/providers/lmstudio).
This will open the `mcp.json` file in the in-app editor. You can add MCP servers by editing this file.
Example MCP to try: Hugging Face MCP Server [#example-mcp-to-try-hugging-face-mcp-server]
This MCP server provides access to functions like model and dataset search.
```json
{
"mcpServers": {
"hf-mcp-server": {
"url": "https://huggingface.co/mcp",
"headers": {
"Authorization": "Bearer
Import Presets from File [#import-presets-from-file]
Once you click the Import button, you can select the source of the preset you want to import. You can either import from a file or from a URL.
Import Presets from URL [#import-presets-from-url]
Presets that are [published](/docs/app/presets/publish) to the LM Studio Hub can be imported by providing their URL.
Importing public presets does not require logging in within LM Studio.
Using `lms` CLI [#using-lms-cli]
You can also use the CLI to import presets from URL. This is useful for sharing presets with others.
```
lms get {author}/{preset-name}
```
Example:
```bash
lms get neil/qwen3-thinking
```
Find your config-presets directory [#find-your-config-presets-directory]
LM Studio manages config presets on disk. Presets are local and private by default. You or others can choose to share them by sharing the file.
Click on the `•••` button in the Preset dropdown and select "Reveal in Finder" (or "Show in Explorer" on Windows).
This will download the preset file and automatically surface it in the preset dropdown in the app.
Where Hub shared presets are stored [#where-hub-shared-presets-are-stored]
Presets you share, and ones you download from the LM Studio Hub are saved in `~/.lmstudio/hub` on macOS and Linux, or `%USERPROFILE%\.lmstudio\hub` on Windows.
Presets are a way to bundle together a system prompt and other parameters into a single configuration that can be easily reused across different chats.
New in 0.3.15: You can [import](/docs/app/presets/import) Presets from file or URL, and even [publish](/docs/app/presets/publish) your own Presets to share with others on to the LM Studio Hub.
Importing, Publishing, and Updating Downloaded Presets [#importing-publishing-and-updating-downloaded-presets]
Presets are JSON files. You can share them by sending around the JSON, or you can share them by publishing them to the LM Studio Hub.
You can also import Presets from other users by URL. See the [Import](/docs/app/presets/import) and [Publish](/docs/app/presets/publish) sections for more details.
Example: Build your own Prompt Library [#example-build-your-own-prompt-library]
You can create your own prompt library by using Presets.
In addition to system prompts, every parameter under the Advanced Configuration sidebar can be recorded in a named Preset.
For example, you might want to always use a certain Temperature, Top P, or Max Tokens for a particular use case. You can save these settings as a Preset (with or without a system prompt) and easily switch between them.
The Use Case for Presets [#the-use-case-for-presets]
* Save your system prompts, inference parameters as a named `Preset`.
* Easily switch between different use cases, such as reasoning, creative writing, multi-turn conversations, or brainstorming.
Where Presets are stored [#where-presets-are-stored]
Presets are stored in the following directory:
macOS or Linux [#macos-or-linux]
```xml
~/.lmstudio/config-presets
```
Windows [#windows]
```xml
%USERPROFILE%\.lmstudio\config-presets
```
Migration from LM Studio 0.2.* Presets [#migration-from-lm-studio-02-presets]
* Presets you've saved in LM Studio 0.2.\* are automatically readable in 0.3.3 with no migration step needed.
* If you save **new changes** in a **legacy preset**, it'll be **copied** to a new format upon save.
* The old files are NOT deleted.
* Notable difference: Load parameters are not included in the new preset format.
* Favor editing the model's default config in My Models. See [how to do it here](/docs/configuration/per-model).
Step 2: Set the Preset Details [#step-2-set-the-preset-details]
You will be prompted to set the details of your Preset. This includes the name (slug) and optional description.
Community presets are public and can be used by anyone on the internet!
Privacy and Terms [#privacy-and-terms]
For good measure, visit the [Privacy Policy](https://lmstudio.ai/hub-privacy) and [Terms of Service](https://lmstudio.ai/hub-terms) to understand what's suitable to share on the Hub, and how data is handled. Community presets are public and visible to everyone. Make sure you agree to what these documents say before publishing your Preset.
`Feature In Preview`
You can pull the latest revisions of your Presets, or presets you have imported from others. This is useful for keeping your Presets up to date with the latest changes.
Your Presets vs Others' [#your-presets-vs-others]
Both your published Presets and other downloaded Presets can be pulled and updated the same way.
`Feature In Preview`
Starting LM Studio 0.3.15, you can publish your Presets to the LM Studio community. This allows you to share your Presets with others and import Presets from other users.
This feature is early and we would love to hear your feedback. Please report bugs and feedback to [bugs@lmstudio.ai](mailto:bugs@lmstudio.ai).
***
Published Presets [#published-presets]
Presets you share on the LM Studio Hub can be updated.
LM Studio aims to preserves the directory structure of models downloaded from Hugging Face. The expected directory structure is as follows:
```xml
~/.lmstudio/models/
└── publisher/
└── model/
└── model-file.gguf
```
For example, if you have a model named `ocelot-v1` published by `infra-ai`, the structure would look like this:
```xml
~/.lmstudio/models/
└── infra-ai/
└── ocelot-v1/
└── ocelot-v1-instruct-q4_0.gguf
```
`Advanced`
You can set default load settings for each model in LM Studio.
When the model is loaded anywhere in the app (including through [`lms load`](/docs/cli#load-a-model-with-options)) these settings will be used.
This will open a dialog where you can set the default parameters for the model.
Next time you load the model, these settings will be used.
Saving your changes as the default settings for a model [#saving-your-changes-as-the-default-settings-for-a-model]
If you make changes to load settings when you load a model, you can save them as the default settings for that model.
You can make this config box always show up by right clicking the sidebar and selecting **Always Show Prompt Template**.
Prompt template options [#prompt-template-options]
Jinja Template [#jinja-template]
You can express the prompt template in Jinja.
Jinja is a templating engine used to encode the prompt template in several popular LLM model file formats. [#jinja-is-a-templating-engine-used-to-encode-the-prompt-template-in-several-popular-llm-model-file-formats]
Manual [#manual]
You can also express the prompt template manually by specifying message role prefixes and suffixes.
Finding compatible draft models [#finding-compatible-draft-models]
You might see the following when you open the dropdown:
Try to download a lower parameter variant of the model you have loaded, if it exists. If no smaller versions of your model exist, find a pairing that does.
For example:
Which mode should I choose? [#which-mode-should-i-choose]
`User` [#user]
Show only the chat interface, and auto-configure everything. This is the best choice for beginners or anyone who's happy with the default settings.
`Developer` [#developer]
Full access to all aspects in LM Studio. This includes keyboard shortcuts and development features.
Use LM Studio in this mode if you want access to configurable [load](/docs/configuration/load) and [inference](/docs/configuration/inference) parameters as well as advanced chat features such as [insert, edit, & continue](/docs/advanced/context) (for either role, user or assistant).
Selecting a Theme [#selecting-a-theme]
Press `Cmd` + `K` then `T` (macOS) or `Ctrl` + `K` then `T` (Windows/Linux) to open the theme selector.
You can also choose a theme in the Settings tab (`Cmd` + `,` on macOS or `Ctrl` + `,` on Windows/Linux).
Choosing the "Auto" option will automatically switch between Light and Dark themes based on your system settings.
Meet LM Studio Bionic, the next generation of LM Studio designed for agentic work with open models.
Bionic is the AI agent for getting real work done with open models, including coding, research, and complex work with documents and files. You can use local models or switch to open-source models in the cloud for heavier tasks, all while staying in control of your privacy and AI spend.
What you can do [#what-you-can-do]
Bionic is an excellent agentic harness, especially for coding and working with documents.
Within a project, create separate sessions for separate tasks. Run multiple sessions across projects to parallelize your workflows.
Choose where a model runs [#choose-where-a-model-runs]
A Bionic session can use:
* **Frontier open models** running in LM Studio Secure Cloud with Zero Data Retention.
* **Local** models running on your computer.
* **Remote** models from another device through LM Link.
How this differs from LM Studio [#how-this-differs-from-lm-studio]
Bionic is a new, separate app from LM Studio. For advanced low-level configuration, you can continue to use LM Studio alongside Bionic.
Download Bionic and [create your first project](/docs/bionic/quick-start) to get started!
LM Studio Bionic organizes work into Projects and Sessions.
Projects [#projects]
A project keeps related sessions and files together, giving the agent a shared working context.
For example:
* For coding work, point a project to a local directory. Then create separate sessions within that project for different tasks while sharing the same codebase.
* For a long-running research initiative, add relevant templates and source files up front, then continue adding documents as you go. Start separate sessions within the project to explore different questions or workstreams, while keeping every session grounded in the same shared document set.
Sessions [#sessions]
A session is a conversation and task thread inside a project. Use separate sessions for work that should have separate instructions or conversation history.
You can **Pin**, **Rename**, **Archive**, or **Delete** a session. An icon appears next to a session when Bionic has finished working in the background.
Tabs and side-by-side work [#tabs-and-side-by-side-work]
Sessions open in tabs. Project files and built-in browser pages can also open as tabs.
To view two sessions side by side, drag a session tab over the left or right half of the current pane. This can be useful for comparing results or keeping one task visible while another runs.
You can also use **Fork** on an eligible response to open a new branch beside the current session.
Background sessions [#background-sessions]
Switching to another tab or project does not stop a running session. Bionic continues the task in the background.
Next, [create your first project](/docs/bionic/quick-start).
A project keeps related sessions and files together. Create one project for work that should share the same goal, source files, or codebase.
Create a project [#create-a-project]
1. Create a new Project and give it a name.
2. If you want Bionic to work with a local codebase, toggle on **Allow coding**.
3. If coding is enabled, select **Choose a folder for Bionic to work in** and choose the root folder of your codebase.
4. Click **Create**.
5. In the new session, select a model if Bionic has not already chosen the **Root model**.
6. Tell the agent what you'd like to do.
Work with documents and files [#work-with-documents-and-files]
Attach or drag in files and folders to add source material. Files Bionic creates appear in the right sidebar under **Project Files**. Project Files are shared across all sessions in the same project.
For example:
> Research the options in these notes, summarize the tradeoffs, and save a recommendation as `recommendation.md`.
Learn more in [Working with Documents](/docs/bionic/agent/work-project).
Work with a codebase [#work-with-a-codebase]
When **Allow coding** is enabled, Bionic can search the repository, edit files, use Git, and run shell commands in the selected working directory.
For example:
> Find where request timeouts are handled. Explain the current behavior, fix the failing edge case, and run the relevant tests.
Review Bionic's diffs and command output before keeping the changes.
Learn more in [Coding](/docs/bionic/agent/code-project).
Keep tasks focused [#keep-tasks-focused]
Give Bionic a clear goal, relevant files, and a concrete output. For larger work, ask it to investigate first, then implement in the same session.
See [Projects and Sessions](/docs/bionic/projects-and-sessions) to organize more work.
Bionic uses credits when a session runs a **Cloud** model. The amount depends on the selected model and the tokens processed.
**Credits are only consumed when you select and use cloud models.** Local models and remote LM Link models do not consume credits and do not require billing set up.
View usage [#view-usage]
Open **Settings** → **Billing and Usage**.
The data reflects how many credits you have consumed from the selected account over the last 30 days.
Select **Refresh** to load the latest account and usage information.
Bionic shows usage totals, not a fixed cost per task. Model pricing and request size affect the final spend.
To change a plan or add credits, see [Set Up Billing and Add Credits](/docs/bionic/accounts-plans-and-billing).
Cloud models require an LM Studio account with available credits. Local and LM Link models do not use Bionic cloud credits, and can be used without an LM Studio account.
Sign in [#sign-in]
1. Open **Settings**.
2. Under **General**, find **Account**.
3. Select **Sign in** and finish signing in through your browser.
4. Return to Bionic.
Add credits for personal use [#add-credits-for-personal-use]
1. In **Settings** under **Account**, select **Manage plan**.
2. You'll be redirected to your account on the LM Studio Hub. Navigate to **Cloud Inference** under Features to add more credits to your account.
3. Complete checkout and ensure the new amount is reflected under **Available Balance**.
4. Return to Bionic and open **Billing and Usage**. Refresh to ensure the new balance is reflected.
Point Bionic to a local working directory to use it for tasks that require understanding or changing a codebase.
Downloaded models can run on your computer without using cloud inference credits.
Find a model [#find-a-model]
1. Open **Settings**.
2. Under **Local Models**, select **Explore**.
3. Search for a model or choose one of the listed models.
Use the format filters and device-fit information to narrow the results.
Download the model [#download-the-model]
1. Choose the download destination if more than one device is available (remote devices in LM Link).
2. Select the format and variant.
3. Start the download.
You can pause, resume, cancel, or retry a download.
Use the downloaded model [#use-the-downloaded-model]
Open **Settings** → **Local Models** → **Library** to see indexed models on the device. Then open a Bionic session and select the model from the list to use it in a session.
See [Choose a Cloud, Local, or Remote Model](/docs/bionic/models).
Open the model picker in a session to choose its main model. Run locally, connect through LM Link, or use the largest frontier open models through LM Studio Secure Cloud with Zero Data Retention.
Cloud models [#cloud-models]
Choose a **Cloud** model when you want a hosted model without using your computer's memory for inference.
Cloud models require:
* An internet connection.
* A signed-in LM Studio account with billing set up.
* Available personal or organization credits.
When using a cloud model, your data is processed transiently by models running in LM Studio Secure Cloud, under Zero Data Retention. Usage of cloud models will consume the credits available in your account. See [Understand Credits and Usage](/docs/bionic/accounts-plans-and-billing/credits-and-usage).
Local models [#local-models]
Choose a **Local** model to run inference on-device. The model must be downloaded and must fit your available hardware resources.
You can explore local models and download them directly in Bionic. See [Download Local Models](/docs/bionic/models/download-local-models).
Remote models [#remote-models]
A **Remote** model is a local model running on another device through LM Link. The remote device handles inference, while the conversation stays on the device where you are using Bionic.
Remote models appear only while the linked device is available and sharing its local models.
Choose for the task [#choose-for-the-task]
Consider:
* Whether the model supports the tools and image input your task needs.
* Whether the work must stay on your own devices.
* The speed and memory available on the local or remote device.
* Whether you have available credits for cloud model usage.
If the model supports configurable reasoning, you can also choose a reasoning level for the session.
Set a default [#set-a-default]
Open **Settings** → **General** and choose a **Root model** to use as the default for new sessions.
You can change the model for an existing session from its model picker.
**Voice Input** transcribes speech locally and sends the transcript into Bionic so that you can speak your ideas to the agent. Currently, Bionic supports Voxtral by Mistral AI, which is a performant multilingual realtime transcription model.
Voice settings [#voice-settings]
Your first transcription may wait a bit while the model loads. For voice input to start faster each time, turn on **Auto load voice model** to keep the transcription model loaded.
1. Open **Settings** → **Voice**.
2. Toggle on **Auto load voice model**
Requires LM Studio 0.4.0 or newer. [#requires-lm-studio-040-or-newer]
LM Studio supports API Tokens for authentication, providing a secure and convenient way to access the LM Studio API.
By default, the LM Studio API runs **without enforcing authentication**. For production or shared environments, enable API Token authentication for secure access.
Creating API Tokens [#creating-api-tokens]
To create API Tokens, click on Manage Tokens in the Server Settings. It will open the API Tokens modal where you can create, view, and delete API Tokens.
Create a token by clicking on the Create Token button. Provide a name for the token and select the desired permissions.
Once created, make sure to copy the token as it will not be shown again.
Configuring API Token Permissions [#configuring-api-token-permissions]
To edit the permissions of an existing API Token, click on the Edit button next to the token in the API Tokens modal. You can modify the name and permissions of the token.
API Token Usage [#api-token-usage]
Using API Tokens with REST API: [#using-api-tokens-with-rest-api]
Install llmster [#install-llmster]
**Linux / Mac**
```bash
curl -fsSL https://lmstudio.ai/install.sh | bash
```
**Windows**
```bash
irm https://lmstudio.ai/install.ps1 | iex
```
Start llmster [#start-llmster]
```bash
lms daemon up
```
See the [daemon CLI docs](/docs/cli/daemon/daemon-up) for full reference.
For setting up llmster as a startup task on Linux, see [Linux Startup Task](/docs/developer/core/headless_llmster).
Option 2: Desktop app in headless mode [#option-2-desktop-app-in-headless-mode]
This works on Mac, Windows, and Linux machines with a graphical user interface. It's useful if you already have the desktop app installed and want it to run as a background service.
Run the LLM service on machine login [#run-the-llm-service-on-machine-login]
Head to app settings (`Cmd` / `Ctrl` + `,`) and check the box to run the LLM server on login.
When this setting is enabled, exiting the app will minimize it to the system tray, and the LLM server will continue to run in the background.
Auto Server Start [#auto-server-start]
Your last server state will be saved and restored on app or service launch.
To achieve this programmatically:
```bash
lms server start
```
Just-In-Time (JIT) model loading for REST endpoints [#just-in-time-jit-model-loading-for-rest-endpoints]
Applies to both options. Useful when using LM Studio as an LLM service with other frontends or applications.
When JIT loading is ON: [#when-jit-loading-is-on]
* Calls to OpenAI-compatible `/v1/models` will return all downloaded models, not only the ones loaded into memory
* Calls to inference endpoints will load the model into memory if it's not already loaded
When JIT loading is OFF: [#when-jit-loading-is-off]
* Calls to OpenAI-compatible `/v1/models` will return only the models loaded into memory
* You have to first load the model into memory before being able to use it
What about auto unloading? [#what-about-auto-unloading]
JIT loaded models will be auto-unloaded from memory by default after a set period of inactivity ([learn more](/docs/developer/core/ttl-and-auto-evict)).
Community [#community]
Chat with other LM Studio developers, discuss LLMs, hardware, and more on the [LM Studio Discord server](https://discord.gg/aPQfnNkxGC).
Please report bugs and issues in the [lmstudio-bug-tracker](https://github.com/lmstudio-ai/lmstudio-bug-tracker/issues) GitHub repository.
`llmster`, LM Studio's headless daemon, can be configured to run on startup. This guide covers setting up `llmster` to launch, load a model, and start an HTTP server automatically using `systemctl` on Linux.
The preferred device setting is per-machine. Each device on the link independently controls which remote machine it prefers. See [how to set a preferred device](/docs/lmlink/basics/preferred-device) for more details.
Use the REST API as normal [#use-the-rest-api-as-normal]
Use the REST API exactly as you would locally. See the [REST API docs](/docs/developer/rest) for usage details.
If you're running into trouble, hop onto our [Discord](https://discord.gg/lmstudio)
Requires LM Studio 0.4.0 or newer. [#requires-lm-studio-040-or-newer]
LM Studio supports Model Context Protocol (MCP) usage via API. MCP allows models to interact with external tools and services through standardized servers.
How it works [#how-it-works]
MCP servers provide tools that models can call during chat requests. You can enable MCP servers in two ways: as ephemeral servers defined per-request, or as pre-configured servers in your `mcp.json` file.
Ephemeral vs mcp.json servers [#ephemeral-vs-mcpjson-servers]
| Feature | Ephemeral | mcp.json |
|---|---|---|
| How to specify in request |
integrations
->
"type": "ephemeral_mcp"
|
integrations
->
"type": "plugin"
|
| Configuration | Only defined per-request |
Pre-configured in
mcp.json
|
| Use case | One-off requests, remote MCP tool execution |
MCP servers that require
command
, frequently used servers
|
| Server ID |
Specified via
server_label
in integration
|
Specified via
id
(e.g.,
mcp/playwright
) in integration
|
| Custom headers |
Supported via
headers
field
|
Configured in
mcp.json
|
Set per-model TTL-model in API requests [#set-per-model-ttl-model-in-api-requests]
When JIT loading is enabled, the **first request** to a model will load it into memory. You can specify a TTL for that model in the request payload.
This works for requests targeting both the [OpenAI compatibility API](/docs/developer/openai-api) and the [LM Studio's REST API](/docs/developer/rest):
```diff
curl http://localhost:1234/api/v0/chat/completions \
-H "Content-Type: application/json" \
-d '{
"model": "deepseek-r1-distill-qwen-7b",
+ "ttl": 300,
"messages": [ ... ]
}'
```
This will set a TTL of 5 minutes (300 seconds) for this model if it is JIT loaded. [#this-will-set-a-ttl-of-5-minutes-300-seconds-for-this-model-if-it-is-jit-loaded]
Set TTL for models loaded with `lms` [#set-ttl-for-models-loaded-with-lms]
By default, models loaded with `lms load` do not have a TTL, and will remain loaded in memory until you manually unload them.
You can set a TTL for a model loaded with `lms` like so:
```bash
lms load
Configure Auto-Evict for JIT loaded models [#configure-auto-evict-for-jit-loaded-models]
With this setting, you can ensure new models loaded via JIT automatically unload previously loaded models first.
This is useful when you want to switch between models from another app without worrying about memory building up with unused models.
**When Auto-Evict is ON** (default):
* At most `1` model is kept loaded in memory at a time (when loaded via JIT)
* Non-JIT loaded models are not affected
**When Auto-Evict is OFF**:
* Switching models from an external app will keep previous models loaded in memory
* Models will remain loaded until either:
* Their TTL expires
* You manually unload them
This feature works in tandem with TTL to provide better memory management for your workflow.
Nomenclature [#nomenclature]
`TTL`: Time-To-Live, is a term borrowed from networking protocols and cache systems. It defines how long a resource can remain allocated before it's considered stale and evicted.
| Endpoint | Method | Docs |
|---|---|---|
/api/v1/chat
|
|
Chat |
/api/v1/models
|
|
List Models |
/api/v1/models/load
|
|
Load |
/api/v1/models/unload
|
|
Unload |
/api/v1/models/download
|
|
Download |
/api/v1/models/download/status
|
|
Download Status |
| Feature |
/api/v1/chat
|
/v1/responses
|
/v1/chat/completions
|
/v1/messages
|
|---|---|---|---|---|
| Streaming | ✅ | ✅ | ✅ | ✅ |
| Stateful chat | ✅ | ✅ | ❌ | ❌ |
| Remote MCPs | ✅ | ✅ | ❌ | ❌ |
| MCPs you have in LM Studio | ✅ | ✅ | ❌ | ❌ |
| Custom tools | ❌ | ✅ | ✅ | ✅ |
| Include assistant messages in the request | ❌ | ✅ | ✅ | ✅ |
| Model load streaming events | ✅ | ❌ | ❌ | ❌ |
| Prompt processing streaming events | ✅ | ❌ | ❌ | ❌ |
| Specify context length in the request | ✅ | ❌ | ❌ | ❌ |
| Endpoint | Method | Docs |
|---|---|---|
/v1/models
|
|
Models |
/v1/responses
|
|
Responses |
/v1/decisions
|
|
Decisions |
/v1/chat/completions
|
|
Chat Completions |
/v1/embeddings
|
|
Embeddings |
/v1/completions
|
|
Completions |
multi-turn-example.py
(click to expand)
agent-chat-example.py
(click to expand)
tool-streaming-chatbot.py
(click to expand)
| Endpoint | Method | Docs |
|---|---|---|
/v1/messages
|
|
Messages |
| Endpoint | Method | Docs |
|---|---|---|
/v1/systemone
|
|
System One |
Machines with GUI [#machines-with-gui]
To begin using LM Link, add an additional device to the link:
1. Download and install LM Studio on the device, at [https://lmstudio.ai/download](https://lmstudio.ai/download)
2. Click on LM Link in the sidebar and follow the steps to enable LM Link.
Once LM Link is enabled, your devices will connect to each other automatically.
Machines without GUI [#machines-without-gui]
To add a headless machine, connect remotely by using llmster in the terminal:
1. Install `llmster` on the headless machine
```bash
curl -fsSL https://lmstudio.ai/install.sh | bash
```
2. Log in from the terminal
```bash
lms login
```
3. Follow the instructions in your terminal output to complete login.
4. Once logged in, run the following command:
```bash
lms link enable
```
Your devices will automatically discover each other over the link, and your headless machine will immediately appear on the LM Link page for your other device. Once connected, models from remote machines will appear locally for loading and inference.
Load models on remote machines [#load-models-on-remote-machines]
When using LM Link, the model loader shows both local models and remote models on linked devices.
You can filter the model loader to display only local or remote models, or to display all available models at once. Remote models can be loaded and configured with the same familiar controls, either in the GUI or by using lms in the terminal.
If you have the same model on multiple devices, they will show up as separate entries, with the associated device name identified. If you are loading models via API/SDK, you can [set a preferred device](/docs/lmlink/basics/preferred-device) to specify which device to load the model from when multiple options are available.
Using LM Studio’s parallel requests, you can also serve multiple clients simultaneously across your LM Link network.
Q&A [#qa]
Got questions about LM Link? We cover some of the most common questions below.
Q: Does LM Link open up my computer to the public internet? [#q-does-lm-link-open-up-my-computer-to-the-public-internet]
A: No! All your devices in the LM Link network communicate with each other using Tailscale’s internal end-to-end encrypted connections. None of your devices are ever exposed to the public Internet.
Q: Can I use remote models with LM Studio's local server? [#q-can-i-use-remote-models-with-lm-studios-local-server]
A: Yes. Any model in your LM Link network can be used as if they are local. This means that any tool that already connects to your local LM Studio will be able to use remote models as well, just by pointing to localhost:1234 as usual.
Q: Can I use remote models through the LM Studio API/SDKs? [#q-can-i-use-remote-models-through-the-lm-studio-apisdks]
A: Yes. Any model in your LM Link network can be used as if they are local. Just specify the model key as usual. If the model can be found on a remote device, it can be used through LM Link.
Q: Will LM Link interfere with my existing Tailscale VPN? [#q-will-lm-link-interfere-with-my-existing-tailscale-vpn]
A: No. LM Link is an entirely separate and self-contained utilization of Tailscale VPN primitives. LM Link will coexist with other Tailscale utilization on your machine or network, with no interference or interplay.
Q: Can the LM Studio Hub see my chats? [#q-can-the-lm-studio-hub-see-my-chats]
A: No. The LM Studio Hub is only used to facilitate discovery between LM Studio/llmster instances. All communication afterwards, including chats and model listing, happens within Tailscale’s end-to-end encrypted connection.
Q: How can I disable LM Link? [#q-how-can-i-disable-lm-link]
A: In the LM Studio app, go to Settings -> LM Link -> Enable LM Link - OFF. If you are using llmster (our headless daemon), run `lms link disable`.
Q: Why does a device show up as “disconnected”? [#q-why-does-a-device-show-up-as-disconnected]
A: LM Link uses end-to-end encrypted tunnels to connect to each other. If a device shows up as “disconnected”, it is possible that device has crashed but has not reported to the discovery server. Please make sure LM Studio/llmster is indeed running on that device. If the error persists, please report a bug at [bugs@lmstudio.ai](mailto:bugs@lmstudio.ai).
Q: If I have the same model on multiple devices, how do I choose which one to use? [#q-if-i-have-the-same-model-on-multiple-devices-how-do-i-choose-which-one-to-use]
A: If you are loading the model via LM Studio or `lms load`, the same model on different devices will show up as separate entries, with the device name identified. If you are loading models via API/SDK, you can set a preferred device from the in-app LM Link page, or use command `lms link set-preferred-device`. Once set, the model will always load on your preferred device.
Q: Can linked devices do anything besides LM Studio tasks on my computer? [#q-can-linked-devices-do-anything-besides-lm-studio-tasks-on-my-computer]
A: No. LM Link only lets LM Studio/llmster talk to each other for model and API access. It does not expose your operating system, files, or other services to linked devices.
Q: Can I use my existing Tailscale network? [#q-can-i-use-my-existing-tailscale-network]
A: Not at the moment. When you enable LM Link we create a dedicated network programmatically and take full control over the ACL. This will not work well with any existing Tailscale networks. If you wish, you can DIY several aspects of the LM Link feature set yourself.
Requesting Access [#requesting-access]
To get started, find the LM Link icon in the LM Studio app, just above the Settings gear icon. LM Link is a network between your devices, so log-in is required to associate devices to users in order to facilitate discovery.
A custom link is **automatically provisioned** for you the first time you access the feature.
Once your first device has joined the link, [add another device](/docs/lmlink/basics/add-device) to experience the power of LM Link!
Choosing a preferred device [#choosing-a-preferred-device]
When the same model is available on multiple devices in the link, LM Link uses the preferred device to load and use the model. This setting is per-machine: each device on the link independently controls which remote machine it prefers.
This is especially relevant when accessing remote models via the SDK or [REST API](/docs/developer/core/lmlink).
Machines with GUI [#machines-with-gui]
In the app, head to the LM Link page, select the device and toggle the "Set as preferred device" option.
Machines without GUI [#machines-without-gui]
To set a preferred device from the terminal, use the following command:
```bash
lms link set-preferred-device
```
LM Studio now supports MCP with OAuth. Seamlessly connect integrations that require authentication without copying tokens or configuring headers. Simply add your integration, log in via browser, and its tools are instantly available to your models in LM Studio.
How it works [#how-it-works]
When you add an OAuth-backed MCP integration, LM Studio:
1. Opens a browser window to the service's authorization page
2. Stores the token securely after you approve access
3. Makes the server's tools available in chat
From that point on, your model can call tools from that service just like any other MCP server.
***
Connecting with your own OAuth credentials [#connecting-with-your-own-oauth-credentials]
Some services require you to bring your own OAuth app, either because they don't support dynamic client registration, or because they need a specific redirect URL whitelisted in their developer portal.
In these cases, add an `auth` object to the server entry in `mcp.json`. When configuring your OAuth app, use the following callback URL:
```
http://127.0.0.1:33389/mcp-oauth-callback
```
```json
{
"mcpServers": {
"oauth-server": {
"url": "https://api.example.com/mcp",
"auth": {
"CLIENT_ID": "TEST_CLIENT_ID",
"CLIENT_SECRET": "TEST_CLIENT_SECRET"
}
}
}
}
```
Linear [#linear]
Create issues, search projects, update statuses, and more in Linear, directly from LM Studio.
```json
{
"mcpServers": {
"linear": {
"url": "https://mcp.linear.app/mcp"
}
}
}
```
***
Notion [#notion]
Search pages, create documents, and read from your Notion workspace.
```json
{
"mcpServers": {
"notion": {
"url": "https://mcp.notion.com/mcp"
}
}
}
```
***
Atlassian [#atlassian]
Work with Jira issues and Confluence pages from within LM Studio.
```json
{
"mcpServers": {
"atlassian": {
"url": "https://mcp.atlassian.com/v1/mcp"
}
}
}
```
***
Sentry [#sentry]
Query issues, inspect stack traces, and analyze errors from your Sentry projects.
```json
{
"mcpServers": {
"sentry": {
"url": "https://mcp.sentry.dev/mcp"
}
}
}
```
***
Many more integrations are supported. Any MCP server that uses OAuth or standard HTTP transport can be connected to LM Studio. See [Use MCP Servers](/docs/app/mcp) for how to add custom servers manually via `mcp.json`.
You can serve local LLMs from LM Studio's Developer tab, either on `localhost` or on the network.
LM Studio's APIs can be used through [REST API](/docs/developer/rest), client libraries like [lmstudio-js](/docs/typescript) and [lmstudio-python](/docs/python), and compatibility endpoints like [OpenAI-compatible](/docs/developer/openai-compat), [Anthropic-compatible](/docs/developer/anthropic-compat), and [Jev (TypeSafe AI)-compatible](/docs/developer/jev-compat).
Running the server [#running-the-server]
To run the server, go to the Developer tab in LM Studio, and toggle the "Start server" switch to start the API server.
Alternatively, you can use `lms` ([LM Studio's CLI](/docs/cli)) to start the server from your terminal:
```bash
lms server start
```
API options [#api-options]
* [LM Studio REST API](/docs/developer/rest)
* [TypeScript SDK](/docs/typescript) - `lmstudio-js`
* [Python SDK](/docs/python) - `lmstudio-python`
* [OpenAI-compatible endpoints](/docs/developer/openai-compat)
* [Anthropic-compatible endpoints](/docs/developer/anthropic-compat)
* [Jev (TypeSafe AI)-compatible endpoints](/docs/developer/jev-compat)
Enabling the "Serve on Local Network" option allows the LM Studio API server running on your machine to be accessible by other devices connected to the same local network.
This is useful for scenarios where you want to:
* Use a local LLM on your other less powerful devices by connecting them to a more powerful machine running LM Studio.
* Let multiple people use a single LM Studio instance on the network.
* Use the API from IoT devices, edge computing units, or other services in your local setup.
Once enabled, the server binds to a non-localhost address instead of localhost. The API access URL updates accordingly, which you can use in your applications.
To make the server available on your local network via the CLI, run:
```
lms server start --bind 0.0.0.0
```
You can configure server settings, such as the port number, whether to allow other API clients to access the server and MCP features.
Settings information [#settings-information]