[UNTESTED] [burzilov/openai-proxy] 1 endpoint(s)
ChatGPT
API Proxy/ChatGPT
2,130 characters
Status: [UNTESTED]
Endpoints found:
http://localhost:4000/v1/chat/completions
Source: https://github.com/burzilov/openai-proxy
# openai-proxy
OpenAI-compatible HTTP proxy for **OpenAI Codex** (ChatGPT OAuth). Clients speak the standard Chat Completions API; the proxy authenticates with ChatGPT and forwards requests to the Codex backend.
Typical setup: run `openai-proxy` and [LiteLLM](https://docs.litellm.ai/) in Docker Compose. LiteLLM exposes port `:4000` to IDEs, agents, and scripts.
> **Disclaimer**
>
> - **Not affiliated with OpenAI.** This project is unofficial and not endorsed by OpenAI.
> - **Unofficial API.** It uses undocumented ChatGPT/Codex endpoints and the same OAuth client ID as Codex CLI. OpenAI may change or block access at any time.
> - **Personal / internal use.** Intended for convenience (e.g. routing your own ChatGPT subscription through LiteLLM), not as a commercial API replacement.
> - **Use at your own risk.** Possible ChatGPT ToS issues, account restrictions, or loss of access. See [docs/risks.md](docs/risks.md).
> - **No warranty.** Provided under the [MIT License](LICENSE) without guarantees of uptime, compatibility, or continued operation.
```
Clients (Cursor, SDKs) → LiteLLM :4000 → openai-proxy :8080 → chatgpt.com/backend-api/codex
```
Optional **FreeLLMAPI front** (Cursor Override OpenAI Base URL):
```
Cursor → NPM/TLS → openai-proxy gateway :3002 → FreeLLMAPI :3001 → (openai-proxy :8080 as custom endpoint, …)
```
The `gateway` command only rewrites Cursor-incompatible fields (`tools` `type:"custom"`, string `reasoning`) and reverse-proxies everything else. See [docs/deployment.md](docs/deployment.md#freellmapi-gateway).
## Quick start
```bash
cp docs/examples/openai-proxy.env.example .env
# Set PROXY_API_KEY and LITELLM_MASTER_KEY
docker compose build
docker compose run --rm openai-proxy auth login
docker compose up -d
```
Verify via LiteLLM (port `8080` is internal to the compose network):
```bash
curl http://localhost:4000/v1/chat/completions \
-H "Authorization: Bearer $LITELLM_MASTER_KEY" \
-H "Content-Type: ap