Connect Open WebUI to LM Studio by adding LM Studio’s local OpenAI-compatible URL under Settings → Connections in the Open WebUI admin section. When both servers run directly on the same Mac, the usual URL is http://127.0.0.1:1234/v1. Select a model from that connection and confirm that a new browser chat reaches the LM Studio server.

This guide assumes that Open WebUI is already running as a process on your Mac and that you can open its admin settings. LM Studio also needs to be running on that Mac with a downloaded text chat model available. Two separate applications are involved. Open WebUI serves the chat interface and forwards the request. LM Studio serves the model that generates the reply. The address you enter belongs to the second application. Open WebUI’s compatible connection guide · Start the local API server in LM Studio.

Confirm which process will contact the model

Open WebUI settings contain the provider address that its backend will contact. Opening its interface in a browser on your Mac tells you where the browser is running. The backend also needs to run on the Mac for the loopback address in this guide to point to the same machine as LM Studio. If you started Open WebUI from a terminal or service on this Mac, check that the existing process is still running there. If someone else gave you a server address, ask where that server process runs before using this configuration. Containers and remote hosts have separate network contexts.

Keep both addresses in your test notes. You will continue to open the existing Open WebUI address in your browser, and you will send model requests to the LM Studio address. A copied Open WebUI browser URL in the connection settings can return a web page where the client expects a model list. Conversely, opening the LM Studio API URL in a browser shows an API response or an error message. It serves a different purpose from the Open WebUI chat page.

Verify LM Studio before adding the connection

In LM Studio, open the Developer tab and start the API server if it is stopped. Use the port shown there. Keep the server available to this Mac through its loopback address, with the local-network serving switch off for this setup. Load the model you want to try so you know which package the first reply should use. A local chat model that has already answered a short message in LM Studio is a good starting point. Set up local chat in LM Studio.

Check whether Require Authentication is enabled in LM Studio’s server settings. If enabled, create or select an LM Studio token with the access needed for the requests you plan to make. Use this token both in the terminal check and in the client that will contact LM Studio. Store it in the application’s connection settings and omit it from screenshots and shared notes. The token belongs to the local server for this connection. LM Studio API token documentation.

From Terminal on that Mac, request the model list at the default port. Put your actual port in the command if the server shows another one. When authentication is enabled, include the Bearer header with the LM Studio token as shown in its authentication guide.

curl -sS -i --noproxy 127.0.0.1 --max-time 10 \
  'http://127.0.0.1:1234/v1/models'

A successful request shows an HTTP success status followed by JSON. Find the intended model’s exact identifier in the list. Some server settings can list downloaded models that are available for loading, so confirm the model you want in LM Studio as well. The Terminal check establishes that this Mac can reach the API and see the identifier. It also gives you a comparison point if the web interface later shows a different name. LM Studio’s model listing endpoint.

Add one OpenAI-compatible connection in Open WebUI

Open the browser interface you already use and go to Settings → Connections in the admin section. Find Manage OpenAI API Connections, then choose Add Connection. In the connection dialog, put the LM Studio base URL in the URL field. For the default local port, that is http://127.0.0.1:1234/v1. Include the version prefix once. Use the base URL here so the client can append the appropriate path for model discovery or chat.

If LM Studio requires authentication, put its token in API Key and use the associated Bearer authentication setting when shown. With local authentication disabled, Open WebUI’s provider instructions allow the field to remain blank. Leave Provider at its default for this first text chat. The optional LM Studio provider setting in Advanced exposes model management features in supported releases. The first verification in this guide uses a model you already chose in LM Studio.

Use Verify Connection, then save the new connection. Refresh or reopen the model picker to look for the intended model. If you have several entries with similar names, open the connection settings and use its Model IDs field to limit this connection to the exact ID you checked. Keep the identifier as returned by the server. If a naming prefix is already configured in Open WebUI, record it separately from the ID the server expects. Open WebUI’s connection settings and model discovery guide.

Add this as its own connection if your existing Open WebUI setup serves other models. That leaves each provider with a name and address you can identify during the test. Use the account that manages the connection to run the first check. If you later need the same model from another account, verify it is available there after it works for the administrator. A successful reply for one account and a missing model for another give you a reason to check model access in Open WebUI while leaving the backend connection alone.

Check that a chat reaches the right backend

Select the model served by LM Studio and open a fresh chat with no attachments or tools. Send a short message whose answer you can check without relying on the model’s knowledge.

The wooden tray contains two yellow clips and one blue clip.
Reply with the color of the single clip.

The expected value is blue. Observe the LM Studio server activity when you send it. A completed reply for the expected model and matching request activity at the time of the chat together show that the browser route reached LM Studio. A model can be present in the picker while its load or chat request still fails, so wait until the answer has completed.

If you have the LM Studio command-line tool, you can watch HTTP requests in a second Terminal window using the server log stream. Start watching after the direct model-list check so the test request is easy to find. Look for a chat request near the time you sent the message, then read its status and the reply in the browser. A model-list request alone shows that discovery reached the server. Stop the log stream with Control-C when you finish. LM Studio’s server log stream.

lms log stream --source server

For another check, change the blue clip to a green clip and send the revised message in a fresh chat. The expected reply changes to green. Use the same listed model and verify that LM Studio handles a second request. This is useful if you have several local providers with similar names. Keep the actual result and the identifier from the server so you can repeat the check without guessing which menu entry you used.

Narrow down a failed connection or reply

If the direct model-list request cannot connect, check the LM Studio server state and its port first. If you receive an HTTP authentication error, check that the Terminal request and Open WebUI use the same valid LM Studio token when the setting requires one. If you see a page that looks like an unrelated website or an interface instead of JSON, compare the host, port, and version prefix with the server setting. Keep the URL local while you resolve the mismatch.

When the Terminal model list works and Open WebUI cannot verify the connection, focus on the backend process and saved settings. Confirm that you are editing the OpenAI-compatible connection, check its authentication and URL, and verify that the Open WebUI server runs directly on the same Mac. Save and retry the connection before changing the selected model. If another otherwise valid connection is slow, reopen the model picker once the new connection has been saved and verified.

If the model appears and a browser chat fails, use a tiny direct chat request to distinguish a model-list success from an inference problem. Replace the example ID with the value from the model list and include the Bearer header if enabled. The model should produce a message with the expected color in its chat response.

curl -sS -i --noproxy 127.0.0.1 --max-time 60 \
  'http://127.0.0.1:1234/v1/chat/completions' \
  -H 'Content-Type: application/json' --data-binary @- <<'JSON'
{
  "model": "REPLACE_WITH_THE_MODEL_ID",
  "messages": [
    {"role": "user", "content": "Reply with the word blue."}
  ],
  "stream": false
}
JSON

If direct chat works, check the selected model and the connection used by the new Open WebUI chat. If direct chat fails too, review the LM Studio server response and whether it can load and answer with that model. Diagnose using the same model and a short prompt before adding attachments or changing several settings. LM Studio’s chat completions endpoint.

Keep a record of the backend location, base URL, model ID, and the successful test prompt. After a model or port change, repeat the direct list check and one fresh browser chat. Those two results tell you whether the saved connection still points to the working model.

Add other functions after the baseline succeeds. File-based chat, tools, and embeddings can add model requirements and requests of their own. If a later attachment test fails, rerun the one-message check on the same connection to see whether ordinary text still works. Keep that result with the new failure so you can investigate the extra feature and retain a known working route for text.