Unexpected endpoint or method.
The message
Unexpected endpoint or method.What it means
LM Studio's server got a request for a path, or a path and method pair, that it doesn't have. It logs an error and answers with status 200 anyway, so the calling app usually fails later with a confusing message of its own.
What to do
Look at the path in brackets in LM Studio's log. Point OpenAI clients at http://localhost:1234/v1 and use /api/v1/... only for LM Studio's own REST endpoints.
LM Studio's local server sends this back when a request hits a URL it doesn't serve. The caller gets a small JSON body, here from a request that left off /v1 (#618 on LM Studio's bug tracker):
HTTP/1.1 200 OK
X-Powered-By: Express
Content-Type: application/json; charset=utf-8
{"error":"Unexpected endpoint or method. (POST /chat/completions)"}
And LM Studio's server log shows the same thing with the method and path in brackets:
[ERROR] Unexpected endpoint or method. (GET /api/tags). Returning 200 anyway
That bracket is the useful part. It's the exact request LM Studio received, so you can compare it against the list of paths it serves. As of September 26, 2026, 15 issues on LM Studio's bug tracker quote the message.
Why your app didn't show an error
The status is 200, which means success in HTTP. A user filed that as a bug in December 2025 (#1323), asking for 404 or 405 instead, and later comments say it's the same on 0.4.13 and 0.4.18. Nobody from LM Studio had replied there by September 26, 2026. In practice your app thinks the call worked, tries to read a chat reply or a model list out of {"error": ...}, and fails with something unrelated. If an app says it connected but then finds no models or returns empty answers, check LM Studio's log for this line.
The paths LM Studio serves
LM Studio's docs list these, all on the one port (their examples use 1234):
- OpenAI-compatible:
GET /v1/models, andPOSTto/v1/chat/completions,/v1/completions,/v1/embeddingsand/v1/responses. The docs set the client's base URL tohttp://localhost:1234/v1. - Anthropic-compatible:
POST /v1/messages, with the base URL set to plainhttp://localhost:1234(the Anthropic SDK adds/v1itself). - LM Studio's own REST API, released as v1 in 0.4.0:
POST /api/v1/chat,GET /api/v1/models, andPOST /api/v1/models/load,/unloadand/download. - The older REST API at
/api/v0/..., which the docs still describe.
The mistakes behind most reports
Mixing the prefixes accounts for several. /chat/completions without /v1 fails (#618), and so does /api/v1/chat/completions, because the native API's chat path is /api/v1/chat. The reverse happens too: one user's POST /v1/models/unload failed until they added /api (#1680).
Apps written for Ollama are another source. They ask for Ollama's paths, like GET /api/tags, which LM Studio doesn't have. A request for Ollama-compatible endpoints has been open since November 2024 (#190). Pick the app's OpenAI-compatible provider option if it has one.
Some lines are harmless. Opening the server address in a browser logs GET /favicon.ico, and tools that poll their own health checks log paths like GET /api/health (reported from Opencode in #2085). If chat works, you can ignore those.
Reports that don't fit
Two open issues show paths the docs do list. #2085 logs GET /v1/models on LM Studio 0.4.17 in June 2026, and #2267 reports that the lmstudio/llmster-preview Docker image rejects /api/v1/chat and /api/v1/models while /v1/models works. Neither had an answer from LM Studio on September 26, 2026. On the Docker preview, the OpenAI-compatible /v1/ paths are the ones reported working.
Other lines the same feature prints
Match yours against these if the one at the top of the page is not quite it. They come from the same code and mean related things.
{"error":"Unexpected endpoint or method. (POST /chat/completions)"}Unexpected endpoint or method. (GET /v1/models). Returning 200 anywayUnexpected endpoint or method. (GET /api/tags). Returning 200 anywayUnexpected endpoint or method. (GET /favicon.ico). Returning 200 anyway