EvanZhouDev/openai-oauth
Free AI with your ChatGPT account
What it solves
It allows users to use their existing ChatGPT accounts to access OpenAI models via an API, removing the need to purchase separate API credits. It also enables developers to integrate a "Sign in with ChatGPT" feature into their own applications, letting users bring their own AI accounts.
How it works
The project leverages the same OAuth tokens used by OpenAI's Codex CLI to access authenticated endpoints at chatgpt.com/backend-api/codex. It provides a proxy that turns a ChatGPT account into an OpenAI-compatible API endpoint, as well as SDKs to manage credentials and connect to various AI clients.
Who it’s for
- Developers who want to use their ChatGPT account for local development or build apps where users provide their own AI access.
- App Creators who want to implement a "Bring Your Own Account" (BYOA) model for AI features.
Highlights
- OpenAI-Compatible Proxy: A CLI tool that creates a local endpoint (e.g.,
http://127.0.0.1:10531/v1) that works with any OpenAI-compatible client. - Sign in with ChatGPT: A React component and SDK that allows end-users to authenticate with their own accounts via a browser extension.
- Broad Integration: Includes adapters for the Vercel AI SDK and the official OpenAI JavaScript SDK.
- Multimodal Support: Supports text generation, streaming, tool calls, reasoning traces, and image generation/editing via GPT Image 2.
- Flexible Credentialing: Supports both local machine credentials (via
~/.codex) and request-bound web credentials.
Related
- Project
- Project
- Project
- Project