LM Studio keyboard shortcuts, lms commands and API routes

LM Studio's docs print a few app shortcuts and the lms command-line tool; this page lists both in one column. lms commands and API endpoints are typed the same on every system. The app keys appear twice, for Windows and Linux and for macOS, where Cmd takes the place of Ctrl: Ctrl + L or Cmd + L opens the model loader, and lms server start brings up the local API. Keys for sending a message are not documented.

117 commands in 13 sections. Checked row by row against LM Studio Docs on . Edited by Jay.

App navigation on Windows and Linux 8

LM Studio has no shortcut page in its docs; these keys come from the guides that mention them, each printed once for Mac and once for Windows / Linux, so both lists are given.

CommandWhat it does
Ctrl+NNew chatDoes the same as clicking the + button.
Ctrl+Shift+NNew chat folderAdds a folder to the chat list; chats and other folders can be dragged into it.
Ctrl+LOpen model loaderBrings up the picker for choosing a downloaded model to load into memory.
Ctrl+2Go to Discover tabWorks from any screen; Discover is where models are searched and downloaded.
Ctrl+3Go to My Models tabWorks from any screen; My Models is where a model's default parameters are edited.
Ctrl+,Open SettingsWorks from any screen; language and theme are among the options found there.
Ctrl+KthenTOpen theme selectorA two-step sequence: press the first chord, release it, then tap T.
Ctrl+Shift+RManage LM RuntimesLM Runtimes are the llama.cpp and MLX engines that run the models.

App navigation on macOS 8

CommandWhat it does
Cmd+NNew chatDoes the same as clicking the + button.
Cmd+Shift+NNew chat folderAdds a folder to the chat list; chats and other folders can be dragged into it.
Cmd+LOpen model loaderBrings up the picker for choosing a downloaded model to load into memory.
Cmd+2Go to Discover tabWorks from any screen; Discover is where models are searched and downloaded.
Cmd+3Go to My Models tabWorks from any screen; My Models is where a model's default parameters are edited.
Cmd+,Open SettingsWorks from any screen; language and theme are among the options found there.
Cmd+KthenTOpen theme selectorA two-step sequence: press the first chord, release it, then tap T.
Cmd+Shift+RManage LM RuntimesLM Runtimes are the llama.cpp and MLX engines that run the models.

Terminal chat 7

CommandWhat it does
lms chatStart interactive chatAsks which model to use when the command names none.
lms chat MODELChat with a named modelSkips the model picker and opens the session with that model.
lms chat MODEL -p PROMPTSend one prompt and exitWrites the reply to stdout without opening a session; put a prompt with spaces in quotes.
lms chat MODEL -s PROMPTSet the system promptThe short form of --system-prompt; the text applies to the whole chat.
lms chat MODEL --ttl 600Keep model loaded after chatThe number is seconds to stay in memory once the chat ends; the default is 3600.
cat FILE | lms chat -p PROMPTPipe a file into a promptStandard input becomes content for the prompt, so any command's output can feed the model.
Ctrl+CInterrupt the responseStops a prediction that is still being generated inside the terminal chat.

Downloading and importing models 12

CommandWhat it does
lms getBrowse staff picksWith no model name the command lists recommended models to choose from.
lms get MODELDownload a modelSearches online repositories for the name and saves the result in the LM Studio models directory.
lms get llama-3.1-8b@q4_k_mDownload a chosen quantizationAdd @ and the quantization name after the model to pick one variant.
lms get --mlxSearch MLX models onlyLimits results to MLX builds; with no format flag, results follow the installed runtimes.
lms get --ggufSearch GGUF models onlyLimits results to GGUF files, the format the llama.cpp runtime loads.
lms get --limit 5Limit search resultsCaps how many model options are listed; -n is the short form.
lms get --always-show-all-resultsAlways list search resultsAsks you to choose even when the name matches one model exactly.
lms get --always-show-download-optionsAlways ask for quantizationShows the quantization choices even when a match would be picked automatically; -a for short.
lms import MODEL.GGUFImport a model fileMoves the file into the models directory unless a copy or link flag is added.
lms import MODEL.GGUF --copyImport and keep originalCopies rather than moves, so the source file stays where it was.
lms import MODEL.GGUF --user-repo my-user/custom-modelsImport into a chosen folderNames the user/repo folder directly and skips the categorization questions.
lms import MODEL.GGUF --dry-runPreview an importReports what would be done and leaves the file untouched.

Listing models 10

CommandWhat it does
lms lsList downloaded modelsShows each model's parameter count, architecture and size on disk.
lms ls --llmList only LLMsLeaves embedding models out of the list.
lms ls --embeddingList only embedding modelsHides the chat models and shows just the embedding entries.
lms ls --detailedList with full details
lms ls --jsonList models as JSONPrints the list in a form that scripts can parse.
lms ls --variantsList model variantsExpands multi-variant models to show every variant; added in LM Studio 0.3.29.
lms ls --host HOSTList models on a remote hostThe other LM Studio instance must be running and reachable, for example on the same subnet.
lms psList loaded modelsShows identifier, type, path, size and architecture for each model in memory.
lms ps --jsonLoaded models as JSONAlso reports each model's generation status and how many prediction requests are queued.
lms ps --host HOSTLoaded models on a remote host

Loading and unloading models 13

A model loaded with lms load has no TTL unless --ttl is given, so it stays in memory until it is unloaded by hand.

CommandWhat it does
lms load MODEL_KEYLoad a modelMODEL_KEY is the name that lms ls prints for a downloaded model.
lms load MODEL_KEY --identifier IDENTIFIERLoad under a custom identifierAPI calls can then name the model by that identifier in their model parameter.
lms load MODEL_KEY --context-length 4096Set context length on loadThe number is how many tokens the model keeps in view while generating.
lms load MODEL_KEY --gpu maxUse full GPU offloadSends every layer to the GPU; without --gpu, LM Studio picks the level itself.
lms load MODEL_KEY --gpu 0.5Offload half the layersAny value from 0 to 1 sets the share of layers placed on the GPU.
lms load MODEL_KEY --gpu offLoad without GPU offloadThe opposite of max: no layers are placed on the graphics card.
lms load MODEL_KEY --ttl 3600Auto-unload after idle timeThe value is seconds without use before the model is removed; 3600 is one hour.
lms load --estimate-only MODEL_KEYEstimate memory without loadingPrints estimated GPU and total memory, taking --context-length and --gpu into account.
lms load MODEL_KEY --host HOSTLoad on a remote instanceTargets LM Studio on another machine, which has to be running and reachable from yours.
lms unloadUnload a modelWith no model key it asks which loaded model to remove.
lms unload MODEL_KEYUnload one named model
lms unload --allUnload all modelsFrees every model currently held in memory.
lms unload MODEL_KEY --host HOSTUnload on a remote instance

Local server 10

Any bind address other than 127.0.0.1 exposes the server beyond localhost; LM Studio recommends enabling authentication before doing that.

CommandWhat it does
lms server startStart the serverLaunches the local HTTP API so that loaded models can answer requests.
lms server start --port 3000Start on a chosen portWithout --port the server reuses the port it ran on last.
lms server start --corsStart with CORS enabledFor web apps and some VS Code extensions; LM Studio flags it as a security risk.
lms server start --bind 0.0.0.0Serve on the local networkListens on all IPv4 interfaces in place of the default 127.0.0.1.
lms server statusCheck server statusSays whether the server is running and on which port.
lms server status --json --quietServer status as JSONPrints only a JSON object holding the running flag and the port.
lms server status --verboseStatus with detailed loggingOnly one of --verbose, --quiet and --log-level is accepted per call.
lms server status --log-level debugStatus at a set log levelThe level is info when the flag is absent.
lms server stopStop the serverAny request still in progress is cut off.
curl http://localhost:1234/v1/modelsTest that the API answersAsks a server on port 1234 for its model list.

Streaming logs 7

CommandWhat it does
lms log streamStream model input and outputShows the exact strings sent to and received from models; model is the default source.
lms log stream --source serverStream server logsServer logs joined this command in LM Studio 0.3.26.
lms log stream --source model --filter inputShow only formatted inputPrints the user input after the prompt template has shaped it.
lms log stream --source model --filter outputShow only model outputEach output appears after its message has finished.
lms log stream --source model --filter input,outputShow both directions
lms log stream --source model --filter input,output --jsonEmit logs as JSONWrites newline-separated JSON for other tools to read.
lms log stream --source model --filter output --statsAdd prediction statsStatistics are printed with the output whenever they are available.

Headless daemon and setup 10

CommandWhat it does
lms --helpShow CLI helpA quick check that lms is installed; LM Studio must have been run once first.
irm https://lmstudio.ai/install.ps1 | iexInstall llmster on WindowsRuns the PowerShell install script; llmster is the headless daemon and needs no desktop app.
curl -fsSL https://lmstudio.ai/install.sh | bashInstall llmster on Mac or LinuxOne curl install script serves both macOS and Linux.
lms daemon upStart the daemonStarts llmster and prints its PID, or reports the status when it already runs.
lms daemon up --jsonStart daemon, JSON resultReturns status, PID and version as JSON for scripts.
lms daemon statusCheck daemon statusTells you whether the llmster process is up.
lms daemon status --jsonDaemon status as JSONGives status and PID when running, or a not-running status otherwise.
lms daemon downStop the daemonStops llmster only; LM Studio running as a desktop app is left alone.
lms daemon updateUpdate the daemonInstalls the latest stable llmster; stop the daemon first and start it again afterwards.
lms daemon update --betaUpdate to beta channelInstalls the newest beta release in place of the stable one.

Inference runtimes 5

CommandWhat it does
lms runtime lsList installed runtimesRuntimes are the inference engines; these commands manage them without opening the app.
lms runtime getDownload a runtime
lms runtime selectSwitch the active runtimeInteractive prompts let you choose which version becomes active.
lms runtime updateUpdate a runtime
lms runtime removeUninstall a runtime

Hub publishing and plugins 8

CommandWhat it does
lms loginSign in to LM Studio HubOpens a browser window to authenticate; a printed URL is the fallback.
lms clone OWNER/NAMEClone a Hub artifactMakes a folder named after the artifact in the current directory.
lms clone alice/sample-plugin ./my-folderClone into a chosen folderThe second argument is the destination; the command quits when that path already exists.
lms pushPublish current folderRun inside a plugin, preset or model.yaml project to upload a new revision.
lms push -y --write-revisionPublish without promptsSuppresses confirmations and records the returned revision number in manifest.json.
lms push --privatePublish as privateKeeps the plugin private, provided the account supports private plugins.
lms devRun plugin dev serverRebuilds and reloads the plugin whenever its files change.
lms dev --installInstall the local pluginPuts the plugin into LM Studio without starting the dev server.

API endpoints 12

CommandWhat it does
GET /v1/modelsList models (OpenAI format)Returns the models visible to the server, which can include every download when just-in-time loading is on.
POST /v1/chat/completionsChat completionsTakes a message history; the prompt template is applied automatically for chat-tuned models.
POST /v1/responsesResponses APISupports streaming, reasoning, stateful follow-ups and optional remote MCP tools.
POST /v1/embeddingsCreate embeddingsTurns input text into embedding vectors.
POST /v1/completionsLegacy text completionsNo prompt template is applied, so base models suit it better than chat-tuned ones.
POST /v1/messagesAnthropic Messages APIThe Anthropic-compatible route, which lets Claude Code run against a local model.
POST /api/v1/chatNative chat endpointLM Studio's own v1 REST API, with stateful chats and MCP support.
GET /api/v1/modelsList models (native API)Covers the LLMs and the embedding models available on the system.
POST /api/v1/models/loadLoad a model over HTTPThe request body names the model and can set options such as context_length.
POST /api/v1/models/unloadUnload a model over HTTPThe request body names the model instance to remove.
POST /api/v1/models/downloadStart a model downloadReturns a job id that the download status route accepts.
GET /api/v1/models/download/status/:job_idCheck a download jobThe path ends with the job id returned when the download started.

Notes

In the app

Ctrl + N starts a new chat and Ctrl + Shift + N a new chat folder. Ctrl + L opens the model loader, Ctrl + 2 and Ctrl + 3 jump to the Discover and My Models tabs, and Ctrl + , opens Settings from any screen. Ctrl + K, T is a two-step sequence for the theme selector, and Ctrl + Shift + R opens the runtime manager for the llama.cpp and MLX engines. On macOS each of these uses Cmd in place of Ctrl, and the macOS list gives them in full. The docs print no keys for sending a message or clearing a chat.

Running a local server

lms server start starts the API server and lms server status confirms the port. The CLI ships with the app, which has to be run once before lms works. lms ls lists downloaded models, lms ps the ones in memory; lms load MODEL_KEY loads one, with optional flags for context length, GPU offload and an idle timeout, and lms unload --all frees them. lms server stop shuts the server down. On a machine without a display, install llmster and use lms daemon up instead of the desktop app; the app's Developer tab has a switch that starts the same server.

Talking to it

The server speaks the OpenAI wire format, so a client that accepts a custom base URL works unchanged. GET /v1/models lists the models the server can see, POST /v1/chat/completions is the chat endpoint that takes a messages array and streams if asked, POST /v1/responses adds stateful follow-ups, and POST /v1/completions is the older plain-prompt form. POST /v1/messages does the same for Anthropic clients. Point an OpenAI SDK at http://localhost:1234/v1; an API token is only needed once Require Authentication is switched on in the server settings.

Questions

Which key opens the model loader in LM Studio?

Ctrl + L on Windows and Linux, Cmd + L on a Mac. The loader lists the models you have downloaded and lets you set load parameters before loading one.

How do I start the server without opening the app window?

Run lms server start from a terminal. The lms CLI is installed alongside the app, which must have been run at least once. On a machine with no display, install llmster and start it with lms daemon up first.

Can I use the OpenAI Python library with LM Studio?

Yes. Set base_url to http://localhost:1234/v1 and the rest of the code stays the same; POST /v1/chat/completions and POST /v1/responses are both supported.

How do I see which model is loaded?

lms ps lists the models currently in memory with their identifier, size and architecture. lms ls lists everything downloaded, loaded or not.

How do I make a model unload itself when it is idle?

Load it with a TTL, for example lms load MODEL_KEY --ttl 3600 for one hour. Without the flag a model loaded from the CLI stays in memory until you run lms unload.

Sources and checks

Every row on this page was matched to a line in the documentation above on . A binding that could not be found there is not listed.

5 rows from the earlier version of this page were removed in that check: duplicates, and bindings the documentation does not list or lists differently.

Found a wrong or missing key? Tell us and it gets checked against the source. How we verify describes the process and its limits.