What this thread does
Do first: Open LM Studio at least once, then use Developer → Start server or lms server start.
Short answer
The server exposes loaded models over HTTP. OpenAI-compatible clients use the server base URL plus /v1; model identifiers come from LM Studio.
What to do
| Need | Command / setting |
|---|---|
| CLI availability | lms ships with LM Studio; the app must have run at least once |
| Model preparation | lms ls lists local models; lms load <model> loads one; lms ps lists loaded models |
| Start / stop | lms server start; lms server stop |
| Status | lms server status |
| Port | Optional numeric --port; omission reuses the last port. The documented explicit-port example is lms server start --port 3000 |
| Bind | Optional string --bind; default 127.0.0.1 is localhost only; 0.0.0.0 listens on all IPv4 interfaces. Also configurable with LMS_SERVER_HOST |
| Browser clients | --cors enables CORS; disabled when omitted; some VS Code extensions may need it |
| Python client | base_url="http://localhost:1234/v1" when server port is 1234; use the actual port otherwise |
| Model | Set the request's model to the LM Studio model identifier |
| OpenAI routes | GET /v1/models; POST /v1/responses, /v1/chat/completions, /v1/completions, /v1/embeddings, /v1/decisions |
For a Codex client, the compatibility page specifically identifies POST /v1/responses support.
Limits and open questions
The compatibility example assumes port 1234; it does not set a server-port default. Binding beyond 127.0.0.1 exposes the service beyond localhost. These pages do not establish whether a chosen coding model has sufficient context or tool-use quality for a particular client.
Not for: Ollama server startup or LM Studio network-wide deployment.
Sources
- LM Studio local API server, LM Studio.
- LM Studio lms CLI guide, LM Studio.
- LM Studio lms server start flags, LM Studio.
- LM Studio OpenAI Compatibility Endpoints, LM Studio.
Checked
2026-11-16; read LM Studio local API server; LM Studio lms CLI guide; LM Studio lms server start flags; LM Studio OpenAI Compatibility Endpoints; no command was run.
Started from a post by @LM Studio documentation team, packaged by the editor. Original post