Codex-Auth is a Python package that provides an OpenAI-compatible API proxy backed by a ChatGPT web session. By utilizing Stealth Playwright, it exposes a local API layer that can be connected to AI tools and IDEs like Cursor and OpenRouter.
📑 Table of Contents
✨ Features
- 🎭 Stealth Automation: Uses
playwright-stealthto navigate automated bot detection. - 🔄 OpenAI Compatible: Supports OpenAI's
/v1/chat/completionsand/v1/modelsendpoints. - 🖼️ Vision & Multimodal: Scrapes internal endpoints to report model vision capabilities.
- ⚡ Asynchronous Core: Built on FastAPI for non-blocking request handling.
- 📦 CLI Tool: Includes the
codex-authCLI built with Typer & Rich for setup and execution.
🚀 Getting Started
Option 1: Python Developers (Recommended)
If you have Python installed, use pipx to install Codex-Auth globally in an isolated environment. This prevents dependency conflicts with your other Python packages.
pipx install codex-auth-proxy
codex-auth install
Option 2: Standalone Binary (Windows)
If you don't have Python installed, or just want a frictionless setup, download the compiled .exe:
- Go to the Releases page
- Download
codex-auth.exe - Open your terminal and run it directly to install the bundled browser:
codex-auth.exe install
💻 Usage
Codex-Auth provides a command-line interface for managing the proxy.
1. Authenticate
Before running the proxy server, you need to capture a valid ChatGPT session token.
codex-auth auth
This command launches a headless browser. Follow the prompts to log in to your account. Session tokens are saved to the local .codex directory.
2. Start the Proxy Server
Once authenticated, start the API server:
codex-auth start --port 8000
The proxy will listen on http://127.0.0.1:8000.
📸 Screenshots
| Authentication Setup | API Server Logs | CLI Chat Interface |
|---|---|---|
🔌 Connecting Tools
You can configure Codex-Auth as a custom OpenAI provider in standard AI tools.
Example configuration:
- Base URL:
http://127.0.0.1:8000/v1 - API Key:
sk-codex-dummy(The proxy accepts any string)
The proxy intercepts API requests and routes them through the authenticated ChatGPT web session.
🏗️ Architecture
graph LR
A[AI Tool / IDE] -->|OpenAI API Request| B(FastAPI Server)
B -->|Async Automation| C{Playwright Stealth}
C -->|Web Session| D[(ChatGPT)]
- FastAPI: Handles API routing.
- Playwright: Drives the browser interaction.
- Typer & Rich: Powers the CLI interface.
🤝 Contributors
- @yutuknown - Creator & Lead Developer
- Antigravity AI - AI Pair Programmer
📜 License
Distributed under the MIT License. See LICENSE for more information.
Metadata
Release files for codex-auth-proxy 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| codex_auth_proxy-0.2.0.tar.gz | 337.0 kB | With provenance | Details for codex_auth_proxy-0.2.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| codex_auth_proxy-0.2.0-py3-none-any.whl | Python 3 | none | any | Details for codex_auth_proxy-0.2.0-py3-none-any.whl |
Total release size: 375.7 kB
Release files / codex_auth_proxy-0.2.0.tar.gz
| Download URL | codex_auth_proxy-0.2.0.tar.gz |
|---|---|
| Size | 337.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
fc4a520337bf3a02965d7e4ef583c1b8ca6db75a5e851ee7295a3bc7b4569094
|
|
BLAKE2b-256 checksum How to use checksums |
b36901742b864f044e84028887ca49c76f7ac4df54684f90e1073f6144f5c256
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jul 19, 2026.
Transparency logRelease files / codex_auth_proxy-0.2.0-py3-none-any.whl
| Download URL | codex_auth_proxy-0.2.0-py3-none-any.whl |
|---|---|
| Size | 38.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
0ff9f60768ed4c8c6acc49c7de273b5483bafc19cbf09834fa9cef591e28fc4e
|
|
BLAKE2b-256 checksum How to use checksums |
577159c855326ff6c8264c0e998f84bdb0633872623a39a5af33d5cbc73e0528
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jul 19, 2026.
Transparency logSecurity for codex-auth-proxy 0.2.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
All 2 files in this release have been uploaded with provenance metadata.
Attestation for codex_auth_proxy-0.2.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jul 19, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.