Community Tool Routes ChatGPT OAuth Into OpenAI API
Get the Tech newsletter
Daily tech — startups, AI labs, chips, the launches that shape the next decade. Free.
- The
openai-oauthpackage spins up a localhost proxy athttp://127.0.0.1:10531/v1pre-authenticated with Codex/ChatGPT OAuth tokens, runnable vianpx openai-oauthwith no API key required - Available models are restricted to what OpenAI's Codex supports — currently including gpt-5.4 and gpt-5.3-codex — and the list depends on the user's individual Codex plan
- Working endpoints include
/v1/responses,/v1/chat/completions, and/v1/models, with support for streaming responses, tool calls, and reasoning traces; the proxy is stateless and requires callers to send full conversation history - The trick under the hood is hitting OpenAI's special Codex CLI endpoint at
chatgpt.com/backend-api/codex/responses, which grants rate limits tied to the ChatGPT subscription rather than separate API credits - A companion Vercel AI SDK provider (
openai-oauth-provider) lets developers callopenai("gpt-5.4")directly in code, sharing the same OAuth transport as the CLI - The project is explicitly unofficial and not affiliated with OpenAI, treating the local
auth.jsonfile as 'password-equivalent credentials' and warning users not to host the proxy, pool tokens, or redistribute access - Users assume all risk for compliance with OpenAI's terms, with the README warning that misuse 'may result in rate limits, suspension, or termination' of their ChatGPT account
Why it matters: Developers with ChatGPT/Codex subscriptions can use `npx openai-oauth` to access gpt-5.4 and gpt-5.3-codex via a localhost proxy without buying separate API credits — but the project's own disclaimer flags this as a ToS gray area where the free access could be revoked at any cost to the user's ChatGPT account.
Ask SkimNews


.jpg)