Mac tip: point apps at LM Studio’s OpenAI-compatible API

MacBook Pro showing Asana and Keynote from Apple Newsroom
Ready, click the button in the top right corner to generate summary
AI thinking...

LM Studio can chat in its own window. It also runs a local API server that speaks the OpenAI Chat Completions format. Many Mac apps only ask for a base URL, an API key field, and a model name. You keep the weights on the Mac, flip the server on, and paste those three values.

This note assumes LM Studio is already installed and at least one model is downloaded. If you still need the first setup, use our LM Studio on Apple silicon walkthrough. Yesterday’s tip covered the same idea with Ollama’s OpenAI-compatible API. The ports and model names differ.

Start the server on localhost:1234

Open LM Studio. Go to the Developer tab. Toggle Start server so the API listens on the Mac. Official docs put the default address at http://localhost:1234.

You can do the same from Terminal with the LM Studio CLI:

lms server start

Leave the app running while you work. If another tool needs CORS (some editor extensions do), LM Studio documents lms server start --cors. Keep that flag for cases you understand. Binding beyond localhost also widens exposure; stay on 127.0.0.1 for a single Mac.

MacBook Pro showing Apple Intelligence Rewrite on macOS Tahoe from Apple Newsroom

Copy the model id from /v1/models

Load a model in LM Studio first, or make sure one is available to the server. Then ask the OpenAI-compatible list endpoint:

curl http://localhost:1234/v1/models

Use the exact id string from that JSON in the app’s model field. Do not paste a cloud name such as gpt-4o unless LM Studio actually lists it for a local file you downloaded.

Point the app at localhost:1234/v1

In the app’s OpenAI or custom provider settings, set:

  • Base URL: http://localhost:1234/v1
  • API key: any non-empty string if the form requires one, for example lm-studio
  • Model: the id from /v1/models

LM Studio’s OpenAI compatibility docs use that base URL with the official OpenAI Python and JavaScript clients. By default the local server does not require authentication. You can turn on an API token later in server settings if you want a Bearer header.

Save the profile. Keep LM Studio’s server switch on while you chat. If the app times out, confirm port 1234 is free and that Start server is still enabled.

MacBook Pro lifestyle work scene from Apple Newsroom

Smoke test with curl or Python

Prove the endpoint before you dig through app menus:

curl http://localhost:1234/v1/chat/completions \
  -H "Content-Type: application/json" \
  -d '{
    "model": "use the model identifier from LM Studio here",
    "messages": [{"role": "user", "content": "Say this is a test!"}],
    "temperature": 0.7
  }'

Replace the model string with your real id. A JSON reply with a message means the server is fine. If curl fails, fix LM Studio first. The Mac app will fail the same way.

Python users can call the OpenAI package the same way. Set base_url to http://localhost:1234/v1 and api_key to lm-studio, then run chat.completions.create with your model id and messages. That pattern matches LM Studio’s Chat Completions example.

Local API versus Ollama and Apple Intelligence

Ollama’s compatible base URL is http://localhost:11434/v1. LM Studio defaults to port 1234. Do not mix the two. If you prefer a Terminal-first runner, see our Ollama on Apple silicon note, or mlx-lm for Apple’s MLX path.

This API path is separate from Apple Intelligence Writing Tools and from ChatGPT under System Settings. Those use Apple’s stack or the ChatGPT extension. LM Studio’s /v1 endpoint is only for apps that let you paste a custom OpenAI base URL.

Photo: Apple

Source: LM Studio Docs (local server, OpenAI compatibility, Chat Completions, lms server start); Apple Newsroom (MacBook Pro Asana and Keynote, Apple Intelligence Rewrite, lifestyle work)

Previous Article iPhone fix: iCloud Mail won't send or receive on iOS 27