LM Studio Commands & Prompt Reference
24 commands & parameters · 4 categories · Source: LM Studio Docs
LM Studio is a desktop app first, but its typed surface is what matters for automation: a local server exposing OpenAI-compatible endpoints, a prediction config you set per request, and the lms command-line tool that manages models and the server itself. This page collects all three from the official documentation, alongside the in-app model parameters.
The usual workflow is short. Start the server with lms server start, confirm what is resident with lms ps, and point any OpenAI client at the local /v1/chat/completions endpoint. Inference parameters like temperature and maxTokens are passed per request in the config object rather than being baked into the model, while load-time parameters are fixed when the model enters memory - the distinction that explains why some settings need an unload and reload to take effect.
For structured work, the structured parameter enforces a schema on the output so the model must emit conforming JSON, which is more reliable than asking for JSON in the prompt alone. And lms log stream is the fastest way to see what a client is actually sending when a prompt or tool call is not behaving.
Also see: LM Studio keyboard shortcuts.
All Commands
Model Parameters (5)
| Command / Syntax | What it does | Notes |
|---|---|---|
| Temperature | Creativity (0-1) | Higher = more creative, lower = more deterministic. |
| Context Length | Token window | Max tokens for input + output combined. |
| Top P | Nucleus sampling | Probability mass threshold for token selection. |
| Repeat Penalty | Avoid repetition | Penalise recently used tokens to reduce repetition. |
| GPU Layers | GPU offload | Number of model layers to offload to GPU. |
OpenAI-Compatible Endpoints (5)
| Command / Syntax | What it does | Notes |
|---|---|---|
| /v1/chat/completions | OpenAI-compatible chat endpoint served by LM Studio | POST against the local server started with lms server start. |
| /v1/completions | OpenAI-compatible text completion endpoint | POST; legacy completion style rather than chat messages. |
| /v1/embeddings | OpenAI-compatible embeddings endpoint | POST; returns vectors for the loaded embedding model. |
| /v1/responses | OpenAI-compatible responses endpoint | POST; newer response-style API surface. |
| /v1/models | List models currently available to the local server | GET; mirrors the OpenAI models listing shape. |
Inference Config Parameters (4)
| Command / Syntax | What it does | Notes |
|---|---|---|
| temperature | Inference parameter: sampling randomness | Set per request in the config object, e.g. { "temperature": 0.6 }. |
| maxTokens | Inference parameter: maximum tokens to generate | Set per request alongside temperature in the prediction config. |
| topP | Inference parameter: nucleus sampling cutoff | Set per request in the prediction config. |
| structured | Inference parameter that enforces a schema on the output | Pass a schema so the model must emit conforming JSON. |
lms CLI Commands (10)
| Command / Syntax | What it does | Notes |
|---|---|---|
| lms server start | Start the local LM Studio server | Serves the OpenAI-compatible endpoints listed above. |
| lms server stop | Stop the local server | Ends serving without quitting the app. |
| lms server status | Show whether the local server is running | Quick check before sending API requests. |
| lms ls | List models available locally | Shows what can be loaded without downloading. |
| lms ps | List models currently loaded into memory | Use before unloading to see what is resident. |
| lms load | Load a model into memory | Takes the model key; load parameters are set at load time. |
| lms unload | Unload a model from memory | Frees VRAM or RAM held by a loaded model. |
| lms get | Download a model to the local models directory | Fetches by model identifier. |
| lms import | Import an existing local model file into LM Studio | Registers a GGUF or similar file already on disk. |
| lms log stream | Stream server and prediction logs | Useful for debugging prompts and tool calls live. |
Frequently Asked Questions
How do I start the LM Studio local server?
Run lms server start. Check it with lms server status, and stop it with lms server stop without quitting the app.
Which endpoints does the local server expose?
OpenAI-compatible /v1/chat/completions, /v1/completions, /v1/embeddings, /v1/responses, and /v1/models.
What is the difference between inference and load parameters?
Inference parameters such as temperature and maxTokens are set per request in the prediction config. Load parameters are fixed when the model is loaded into memory, so changing them requires an unload and reload.
Every entry on this page is a literal, typeable token taken from the official documentation linked above. Command sets in AI tools change quickly - the in-product command menu is always authoritative for your installed version.