{"slug": "how-to-use-lm-studio-run-local-llms-with-a-gui", "title": "How to use LM Studio: run local LLMs with a GUI", "summary": "LM Studio, a free desktop application for running local large language models, serves models over an OpenAI-compatible API at http://localhost:1234/v1 and also speaks the Anthropic API, letting Claude Code connect to a local model with two environment variables and no proxy. The app runs llama.cpp (GGUF) models on all platforms and Apple MLX models on Apple Silicon, requires macOS 14.0 or later on Apple M1 through M4 chips, Windows x64 with AVX2 or ARM (Snapdragon X Elite), and Linux as an AppImage for x64 and ARM64 on Ubuntu 20.04 and up, with 16GB of RAM recommended. LM Studio's Discover tab downloads models from Hugging Face inside the app, and the docs advise selecting 4-bit or higher quantization when the machine can handle it.", "body_md": "The Primer · Tools & Stacks\n\n# How to use LM Studio: run local LLMs with a GUI\n\nVendor-neutral\n\nLM Studio is the friendly way to run AI models on your own machine: a desktop app that finds, downloads, and runs local models, then serves them to your editor and agents over a local API. It is free, even at work, and unlike a CLI-first tool it lets Claude Code connect straight to a local model with no proxy. Here is the whole thing, download to editor.\n\nLM Studio is the local-models tool for people who want a window, not a command line. It is a desktop app that does the whole job in one place: it searches Hugging Face for models, downloads them, runs them with a chat interface, and, when you flip a switch, serves them over a local API that your editor and your agents can use. It is free even for commercial work, and it has one trick a CLI-first tool does not: Claude Code can talk to a local model through it directly. For a vibe coder who wants free inference without living in the terminal, that is the pitch.\n\nHere is the whole answer up front. Download LM Studio, use its Discover tab to pull a model from Hugging Face, and chat with it in the app. When you want your tools to use that model, turn on the local server: it speaks the OpenAI API at `http://localhost:1234/v1`, so VS Code and Codex point straight at it, and it speaks the Anthropic API too, so Claude Code connects with two environment variables and no proxy. Everything below is the how.\n\n## Install it on Mac, Windows, or Linux\n\nDownload the installer for your OS from the LM Studio Downloads page. The system requirements, from the docs, are worth checking before you start: macOS needs Apple Silicon (M1 through M4) on macOS 14.0 or later, so Intel Macs are out; Windows runs on x64 with AVX2 or on ARM (Snapdragon X Elite); Linux ships as an AppImage for x64 and ARM64 on Ubuntu 20.04 and up. Sixteen gigabytes of RAM is the recommended floor, because the model has to fit in memory to run at a usable speed.\n\n## Download your first model, inside the app\n\nThis is where LM Studio’s graphical nature pays off. Open the Discover tab and search for a model by name, by a Hugging Face user or model string, or by pasting a full Hugging Face URL, and download it without leaving the app. LM Studio runs `llama.cpp` (GGUF) models everywhere and Apple’s MLX models on Apple Silicon, so most open models you have heard of will run. When a model offers several quantization levels, the docs advise picking 4-bit or higher if your machine can handle it, because heavier quantization trades quality for a smaller memory footprint. A good coding model to start with, sized to your RAM, is the same decision [our Ollama guide](https://okaneland.com/primer/how-to-use-ollama/) lays out for the CLI side.\n\n## Chat with a model, and with your documents\n\nOnce a model is downloaded, you chat with it in the app, no server or config required. LM Studio also does chat-with-documents: attach a `.docx`, `.pdf`, or `.txt` file to the conversation and it adds the document to the model’s context if it fits, or uses retrieval to pull the relevant parts if it does not. For quick “read this and answer” work on a local file, that is the whole feature, and it never leaves your machine.\n\n## Turn on the local server: the OpenAI-compatible API\n\nThe app is useful on its own, and it becomes a coding tool when you serve the model. From the Developer tab, start the server (or run `lms server start` in a terminal), and LM Studio exposes an OpenAI-compatible API at `http://localhost:1234/v1`. The endpoints are the ones your tools expect: `GET /v1/models`, `POST /v1/chat/completions`, plus `/v1/embeddings`, `/v1/completions`, and `/v1/responses`. Port `1234` is the default. Authentication is off by default, so any placeholder API key works, and there is a toggle in Server Settings if you want to require one.\n\n## Point your editor and agents at it\n\nThis is the payoff, and LM Studio handles two kinds of tool cleanly. Anything that speaks the OpenAI API, VS Code extensions, Codex, or [Aider](https://okaneland.com/primer/how-to-use-aider/), just needs its base URL set to `http://localhost:1234/v1` and a placeholder key, and it is running against your local model.\n\nThe part worth calling out is Claude Code, because it is where LM Studio pulls ahead of a CLI-only tool. LM Studio also serves an Anthropic-compatible `/v1/messages` endpoint, added in version 0.4.1, so Claude Code connects directly with no translation layer. You set `ANTHROPIC_BASE_URL=http://localhost:1234` and `ANTHROPIC_AUTH_TOKEN=lmstudio`, then run `claude` pointed at your local model. That is the exact gap our [Ollama guide](https://okaneland.com/primer/how-to-use-ollama/) flagged, where Claude Code needs a proxy to reach an Ollama model; LM Studio closes it by speaking Anthropic’s protocol as well as OpenAI’s, which is a genuine reason to reach for it if Claude Code is your agent.\n\n## Drive it from the terminal: the lms CLI\n\nYou do not have to stay in the window. The `lms` CLI ships with the app, so the terminal-inclined get the same control: `lms server start` and `lms server stop` run the server, `lms ls` lists your downloaded models, `lms ps` shows what is loaded, `lms load` and `lms unload` manage memory, and `lms get` downloads a model by name. It is the bridge between LM Studio’s graphical comfort and a scriptable workflow, and it is why the “GUI versus CLI” choice below is softer than it first looks.\n\n## Build on it: the SDKs, structured output, and tools\n\nFor building rather than chatting, LM Studio ships official SDKs: `pip install lmstudio` for Python and `npm install @lmstudio/sdk` for JavaScript. Through the same server you also get the two features that make a local model useful in an app: structured output, where you pass a JSON schema and the model returns valid JSON that conforms to it, and tool use, where the model can request calls to your functions, both through the standard `/v1/chat/completions` and `/v1/responses` endpoints. So a local model can drive real application logic, not just a chat box, for zero per-token cost.\n\n## What it costs: free, even at work\n\nLM Studio is free. Running local models in the app costs nothing, and as of 8 July 2025 the company made it free for commercial use too: in its own words, “LM Studio is free to use both at home and at work,” with no license form to fill in. Two boundaries keep that accurate. There is a separate paid Enterprise plan for organizations that need single sign-on, model and MCP gating, or private collaboration, and an optional cloud-credits tier if you want to run frontier open models in the cloud rather than on your machine. For a solo builder or a small team running models locally, though, the cost is your hardware and nothing else, which is the same economics [our cost study](https://okaneland.com/study/cut-your-ai-coding-bill/) keeps landing on.\n\n## LM Studio or Ollama\n\nBoth run local models for free; the difference is the front door. LM Studio is graphical-first: you browse and download models from Hugging Face in a window, chat in the app, and start a server from a toggle, with the `lms` CLI available when you want it. Ollama is command-line-first: you `ollama run` a model and connect editors and frameworks through its API, as [our Ollama guide](https://okaneland.com/primer/how-to-use-ollama/) covers. Pick LM Studio if you want model discovery and chat in a GUI, or if Claude Code is your agent and the direct Anthropic-compatible connection matters; pick Ollama if you prefer a terminal and a lightweight service to script against.\n\n Either way you are running a capable coding model on your own machine at no per-token cost, which is the outcome that makes both worth knowing, and the [agent field guide](https://okaneland.com/study/ai-coding-agent-field-guide/) places where local fits the wider 2026 field. Download it, pull one model sized to your RAM, and you will know within an afternoon whether the window or the command line is your home.\n\nOne email, when there's something worth sending\n\n## Get the research in your inbox.\n\nNo fixed schedule, no filler. You get an email when we've tested something, run the numbers, or found a tool worth your time.\n\nFree. Double opt-in, unsubscribe in one click.\n\nWhich local model are you running? [Get the research →](https://okaneland.com/subscribe/)\n\n## Sources\n\n| Source | Link | \n|---|---|\n| LM Studio app docs (lmstudio.ai/docs/app and /app/system-requirements, read 2026-08-15): a desktop app to discover, download, and run local LLMs with a chat interface; runs llama.cpp (GGUF) models on Mac, Windows, and Linux and Apple MLX models on Apple Silicon; you install it from the Downloads page. Requirements include Apple Silicon (M1-M4) on macOS 14.0+ (no Intel Macs), Windows x64 with AVX2 or ARM (Snapdragon X Elite), and Linux x64/ARM64 as an AppImage; 16GB RAM recommended. |  [lmstudio.ai ↗](https://lmstudio.ai/docs/app)  | \n| LM Studio model download and RAG docs (lmstudio.ai/docs/app/basics/download-model and /basics/rag, read 2026-08-15): a built-in downloader searches Hugging Face inside the app (Discover tab) by keyword, model string, or pasted URL, with quantization choices (pick 4-bit or higher if your machine allows); you can also attach .docx, .pdf, and .txt files to a chat, and LM Studio uses retrieval when a document is too large for the context. |  [lmstudio.ai ↗](https://lmstudio.ai/docs/app/basics/download-model)  | \n| LM Studio local server docs (lmstudio.ai/docs/developer/core/server, /developer/openai-compat, /developer/core/authentication, read 2026-08-15): start a local server from the Developer tab or with lms server start; it exposes OpenAI-compatible endpoints (GET /v1/models, POST /v1/chat/completions, /v1/embeddings, /v1/completions, /v1/responses) at http://localhost:1234/v1, with authentication off by default (any placeholder API key works) and a toggle in Server Settings to require it. |  [lmstudio.ai ↗](https://lmstudio.ai/docs/developer/openai-compat)  | \n| LM Studio Claude Code integration (lmstudio.ai/docs/integrations/claude-code and /blog/claudecode, read 2026-08-15): LM Studio 0.4.1 (announced 30 Jan 2026) added an Anthropic-compatible /v1/messages endpoint so Claude Code uses local models directly. Set ANTHROPIC_BASE_URL=http://localhost:1234 and ANTHROPIC_AUTH_TOKEN=lmstudio, then run claude with a local model. No proxy required. |  [lmstudio.ai ↗](https://lmstudio.ai/docs/integrations/claude-code)  | \n| LM Studio CLI and SDKs (lmstudio.ai/docs/cli, /docs/python, /docs/typescript, read 2026-08-15): the lms CLI ships with the app (lms server start/stop, lms ls, lms ps, lms load/unload, lms get); the Python SDK is pip install lmstudio, the JavaScript SDK is npm install @lmstudio/sdk. |  [lmstudio.ai ↗](https://lmstudio.ai/docs/cli)  | \n| LM Studio pricing and free-for-work statement (lmstudio.ai/pricing and /blog/free-for-work, read 2026-08-15): the local app is free ($0); per the blog, \"Starting today, LM Studio is free to use both at home and at work\" (Yagil Burowski, 8 Jul 2025), with no license form required. A separate Enterprise plan (SSO, model and MCP gating, private collaboration) remains paid, and an optional cloud-credits tier exists for cloud inference. |  [lmstudio.ai ↗](https://lmstudio.ai/blog/free-for-work)  |", "url": "https://wpnews.pro/news/how-to-use-lm-studio-run-local-llms-with-a-gui", "canonical_source": "https://okaneland.com/primer/how-to-use-lm-studio/", "published_at": "2026-09-17 00:00:00+00:00", "updated_at": "2026-09-17 14:27:53.697385+00:00", "lang": "en", "topics": ["large-language-models", "ai-tools", "ai-products", "ai-agents", "developer-tools"], "entities": ["LM Studio", "Hugging Face", "Claude Code", "llama.cpp", "Apple MLX", "Apple Silicon", "VS Code", "Codex"], "alternates": {"html": "https://wpnews.pro/news/how-to-use-lm-studio-run-local-llms-with-a-gui", "markdown": "https://wpnews.pro/news/how-to-use-lm-studio-run-local-llms-with-a-gui.md", "text": "https://wpnews.pro/news/how-to-use-lm-studio-run-local-llms-with-a-gui.txt", "jsonld": "https://wpnews.pro/news/how-to-use-lm-studio-run-local-llms-with-a-gui.jsonld"}}