New Tool Radar

Local AI

How to Run Codex Against LM Studio’s Responses Endpoint

Use LM Studio's OpenAI-compatible /v1/responses endpoint so Codex runs on your local model instead of a hosted one.

Schematic diagram with four steps: start the LM Studio server, get the model identifier, point Codex at the local /v1/responses endpoint, then ask for a code change.

Codex talks to the OpenAI Responses API, and LM Studio implements that endpoint — POST /v1/responses — on its local server. That is why Codex is supported against LM Studio: point it at the local server and it works against a model on your own machine.

Point Codex at the local responses endpoint

Start the LM Studio server and load a model that can handle coding work. Configure Codex to use the local server as its Responses endpoint — base URL http://localhost:1234/v1 — and set the model to the identifier LM Studio reports for the loaded model. Codex then sends its Responses API calls to LM Studio, and the replies come from your local model.

Base URL: http://localhost:1234/v1
Endpoint: POST /v1/responses
Model: the identifier from GET http://localhost:1234/v1/models

The Responses endpoint is one of six OpenAI-compatible endpoints LM Studio lists, alongside models, decisions, chat completions, embeddings and completions. A coding model matters here more than usual: a small general model will write worse code than a larger code-tuned one, and no endpoint change fixes that.

Try it: four checks

Check What you should see If you do not see it
Server running GET /v1/models returns your model Start the server first
Endpoint present /v1/responses is in the endpoint list Check the LM Studio docs for your version
Codex connects Codex starts without a connection error Check the base URL and model identifier
Code answers Codex replies come from the local model Ask for a small code change

Expected result. We checked the LM Studio OpenAI Compatibility Endpoints page, which lists POST /v1/responses among the supported endpoints and says Codex is supported because LM Studio implements it. We did not run Codex on this machine.

Limits

This guide covers the endpoint setup only. Code quality depends on the model, and Codex features may behave differently against a local model. We did not test the setup ourselves.

Sources

See all