Your ChatGPT Codex, speaking fluent OpenAI on localhost.
Xypro is a small local proxy. It lets any OpenAI-compatible app use your ChatGPT Codex subscription, with no API key bill.
You keep writing normal OpenAI code. Xypro does the translation behind the scenes.
- Your app calls the usual OpenAI endpoint at
http://localhost:1455/v1. - Xypro signs the request with your ChatGPT login and forwards it to the Codex backend.
- The reply comes back in plain OpenAI shape, streaming or not.
That is the whole trick. Your app never knows Codex is involved.
npm install -g xyproThen connect once and start it:
xypro auth # sign in with ChatGPT, one time
xypro serve # start the proxy, opens the control panelPrefer not to install globally? Use npx:
npx xypro auth
npx xypro serveThat is the whole setup. Your code keeps calling OpenAI, Xypro points it at Codex.
xypro servestarts the proxy and opens the control panel.xypro authconnects your ChatGPT Codex account (one time).xypro key [value]sets an API key your apps must send. No value means it generates one.xypro key clearremoves the key so the proxy is open again.xypro helpshows the help.
Point any OpenAI client at the Xypro base URL. Nothing else changes.
from openai import OpenAI
client = OpenAI(base_url="http://localhost:1455/v1", api_key="xypro")
client.chat.completions.create(
model="gpt-5.5",
messages=[{"role": "user", "content": "hello"}],
)curl http://localhost:1455/v1/chat/completions \
-H "Content-Type: application/json" \
-d '{"model":"gpt-5.5","messages":[{"role":"user","content":"hi"}],"stream":true}'If you set a key with xypro key, send it as Authorization: Bearer <key>.
These are the only models a ChatGPT account can use through Codex (checked against the live backend):
gpt-5.5gpt-5.4gpt-5.4-mini
Each one takes a reasoning_effort of none, low, medium, high, or xhigh. More effort means more thinking and more tokens. none is fastest, xhigh thinks the hardest.
A couple of things Xypro handles quietly so your app does not break:
- It maps
reasoning_effort: "minimal"(which Codex does not accept) tolow. - It drops
max_tokensinstead of forwarding it, because the Codex backend rejects output caps.
Open http://localhost:1455 after xypro serve.
- Providers: connection status, connect or reconnect, refresh, and a quick model test.
- Quick test: fire one request to confirm a model works.
- Usage: live token consumption, totals, by model, and recent requests.
- Settings: default reasoning effort, reasoning summary, and default model.
Settings live in proxy/.env (optional, sensible defaults otherwise):
PORTis the port Xypro runs on. Default is1455.PROXY_API_KEYis the key your apps must send. Empty means open, which is fine locally.CODEX_PROXY_DATA_DIRis where your token, usage, and settings are stored. Default is~/.codex-proxy.
Your tokens never leave your machine.
- Codex always thinks first, so non-streaming replies are assembled after the stream finishes.
- Reasoning text is returned on a
reasoningfield next to the normalcontent. - This maps text chat. Tool calls and vision are not translated yet.
Two live-reloading servers, backend on 1455 and frontend on 5173:
npm run devThe backend lives in proxy/ (Express) and the control panel in web/ (Vite and React).
MIT