API compatibility - 0 documented limits
LM Studio API compatibility
LM Studio documents an OpenAI-compatible API at http://localhost:1234/v1 (models, responses, chat/completions, embeddings and completions). Its Anthropic-compatible base URL, the value for ANTHROPIC_BASE_URL, is http://localhost:1234. The docs read list no specific limitations for either layer.
Verified against LM Studio's own documentation. Not documented means the docs read that day do not say; it never means No.
Compare every provider in the API compatibility matrix.
OpenAI-compatible API
Supportedhttp://localhost:1234/v1- Endpoints
- models
- responses
- chat/completions
- embeddings
- completions
- Auth
- None by default (local server); when Require Authentication is enabled, an LM Studio API token
- Notes
- Default port 1234. LM Studio also exposes a non-OpenAI /v1/decisions endpoint. Codex works because LM Studio implements POST /v1/responses.
From the docs
You can reuse existing OpenAI clients (in Python, JS, C#, etc) by switching up the "base URL" property to point to your LM Studio instead of OpenAI's servers.
Anthropic-compatible API
Supportedhttp://localhost:1234- Auth
- ANTHROPIC_AUTH_TOKEN=lmstudio (placeholder); with Require Authentication enabled, use the LM Studio API token. Accepts x-api-key or Authorization: Bearer.
- Notes
- Endpoint is POST /v1/messages. The Claude Code guide also sets CLAUDE_CODE_ATTRIBUTION_HEADER=0 and recommends models with more than ~25k context.
From the docs
export ANTHROPIC_BASE_URL=http://localhost:1234 export ANTHROPIC_AUTH_TOKEN=lmstudio export CLAUDE_CODE_ATTRIBUTION_HEADER=0
Documented limitations
Parameters, content types and features LM Studio's docs say its compatibility layers ignore, reject or change, each with the line it comes from. A layer with nothing listed may still differ in ways the docs do not spell out.
OpenAI-compatible layer0
No limitations listed in the docs read.
Anthropic-compatible layer0
No limitations listed in the docs read.
Example from LM Studio's docs
Copied verbatim from the provider's documentation, placeholders included.
from openai import OpenAI
client = OpenAI(
base_url="http://localhost:1234/v1"
)More on LM Studio
Newsletter
Know when a provider changes its API
One email per week. New models, new endpoints and the compatibility changes that break a base URL, and what they mean for your stack.