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 / SyntaxWhat it doesNotes
TemperatureCreativity (0-1)Higher = more creative, lower = more deterministic.
Context LengthToken windowMax tokens for input + output combined.
Top PNucleus samplingProbability mass threshold for token selection.
Repeat PenaltyAvoid repetitionPenalise recently used tokens to reduce repetition.
GPU LayersGPU offloadNumber of model layers to offload to GPU.

OpenAI-Compatible Endpoints (5)

Command / SyntaxWhat it doesNotes
/v1/chat/completionsOpenAI-compatible chat endpoint served by LM StudioPOST against the local server started with lms server start.
/v1/completionsOpenAI-compatible text completion endpointPOST; legacy completion style rather than chat messages.
/v1/embeddingsOpenAI-compatible embeddings endpointPOST; returns vectors for the loaded embedding model.
/v1/responsesOpenAI-compatible responses endpointPOST; newer response-style API surface.
/v1/modelsList models currently available to the local serverGET; mirrors the OpenAI models listing shape.

Inference Config Parameters (4)

Command / SyntaxWhat it doesNotes
temperatureInference parameter: sampling randomnessSet per request in the config object, e.g. { "temperature": 0.6 }.
maxTokensInference parameter: maximum tokens to generateSet per request alongside temperature in the prediction config.
topPInference parameter: nucleus sampling cutoffSet per request in the prediction config.
structuredInference parameter that enforces a schema on the outputPass a schema so the model must emit conforming JSON.

lms CLI Commands (10)

Command / SyntaxWhat it doesNotes
lms server startStart the local LM Studio serverServes the OpenAI-compatible endpoints listed above.
lms server stopStop the local serverEnds serving without quitting the app.
lms server statusShow whether the local server is runningQuick check before sending API requests.
lms lsList models available locallyShows what can be loaded without downloading.
lms psList models currently loaded into memoryUse before unloading to see what is resident.
lms loadLoad a model into memoryTakes the model key; load parameters are set at load time.
lms unloadUnload a model from memoryFrees VRAM or RAM held by a loaded model.
lms getDownload a model to the local models directoryFetches by model identifier.
lms importImport an existing local model file into LM StudioRegisters a GGUF or similar file already on disk.
lms log streamStream server and prediction logsUseful 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.

Related prompt references

DeepSeek (22) · GLM (Z.ai) (23) · Kimi (Moonshot AI) (22) · All AI prompt references