[UNTESTED] [thezillo/codex-proxy] 1 endpoint(s)
ChatGPT
API Proxy/ChatGPT
2,115 characters
Status: [LIVE]
Endpoints found:
https://chatgpt.com/backend-api
Source: https://github.com/thezillo/codex-proxy
# codex-proxy
OpenAI-compatible proxy for the Codex (ChatGPT subscription) Responses API.
Point any OpenAI client at it; it forwards requests to `chatgpt.com` using the
credentials from `codex login`, refreshing the token as needed. Rust, single
binary, no database. Request format and TLS fingerprint match the official
Codex client.
What a running instance gives you:
- `http://<host>:8787/v1` — an OpenAI-compatible endpoint (chat completions +
raw Responses passthrough), guarded by your own client API keys.
- `http://127.0.0.1:9090/metrics` — Prometheus counters, on a separate port so
it stays private even when the API is public.
- A data directory holding `auth.json` — the ChatGPT credentials and the
rotated refresh token. **Keep it**; it's the only stateful thing here.
- A **~3 MiB** resident footprint. Measured on the container over a week of
production traffic: 2.9 MiB min, 3.2 MiB mean, 6.1 MiB peak. It's a static
musl binary — no interpreter, no GC, no database behind it — so it fits on
the smallest instance any host will sell you.
## Quick start (Docker)
Needs `~/.codex/auth.json` from `codex login` (the official CLI), once.
```sh
KEY=$(openssl rand -hex 24); echo "client key: $KEY"
docker run -d --name codex-proxy -p 8787:8787 \
-v codex_data:/data \
-e CODEXPROXY_DATA_DIR=/data \
-e CODEXPROXY_API_KEYS="$KEY" \
-e CODEXPROXY_AUTH_JSON="$(cat ~/.codex/auth.json)" \
ghcr.io/thezillo/codex-proxy:latest
```
Then send requests to `http://localhost:8787/v1` with that value as the bearer
token:
```sh
curl http://localhost:8787/v1/chat/completions \
-H "Authorization: Bearer $KEY" -H "Content-Type: application/json" \
-d '{"model":"gpt-6-astra","stream":true,
"messages":[{"role":"user","content":"hi"}]}'
```
`model` is required. One that doesn't look like a real id (anything not
starting with `gpt-`/`o`) is replaced by `defaults.model` (`gpt-6-astra`);
`[defaults.model_aliases]` is applied first. Check the proxy