Status: [UNTESTED] Endpoints found: http://127.0.0.1:6769/v1/chat/completions http://127.0.0.1:6769/v1/usage http://127.0.0.1:6769/v1/usage?format=text http://127.0.0.1:6769/v1/usage?format=number http://127.0.0.1:6769/v1/usage?format=number&window=five_hour Source: https://github.com/aaaa0ggMC/codex-proxy-node # codex-proxy (Node) A small local OpenAI-compatible proxy backed by your existing Codex CLI ChatGPT login. ```text OpenAI-compatible client -> http://127.0.0.1:6769/v1 -> ChatGPT Codex backend ``` `providers` may be an object keyed by name or an array where each entry carries `name`; both forms behave the same. Entries that share a name form one namespace and are tried in order, so two keys for the same service can back a single prefix — a request falls over to the next entry only if nothing has been streamed yet. `codex` needs no key (it uses the ChatGPT login), but a `codex_home` can point at another account. This is the Node.js port of [aaaa0ggMC/codex-proxy](https://github.com/aaaa0ggMC/codex-proxy) (itself a fork of [Max-Leopold/codex-proxy](https://github.com/Max-Leopold/codex-proxy)). It keeps the same routes, flags and behaviour, but is a single dependency-free ESM codebase, which makes it easy to read, extend and host next to other Node services such as MCPHub. Like the Go version, this is a compatibility adapter, not a transparent OpenAI proxy. The Codex backend requires streaming upstream requests and rejects some common OpenAI parameters, so the proxy normalises requests before forwarding them. ## Requirements - Node.js 20 or newer (uses the built-in `fetch`) - Codex CLI authenticated with ChatGPT: ```bash codex login ``` ## Run ```bash npm start # or, with the same flags as the Go binary: node src/index.js --port 6769 ``` By default the server binds to `127.0.0.1` with no proxy API key, and prints: ```text listening on http://127.0.0.1:6769 ``` ### Options | Flag | Env | Default | Meaning | | --- | --- | --- | --- | | `--host` | – | `127.0.0.1` | Interface to bind. A non-loopback host requires an API key. | | `--port` | – | `6769` | Port to listen on. | | `--codex-home` | `CODEX_HOME` | `~/.codex` | Where `auth.json` lives. | | `--api-key` | `CODEX_PROXY_API_KEY` | empty | When set, requests need `Authorization: Bearer `. | | `