Skip to main content
Codex-Auth Logo

Codex-Auth

A Stealth Playwright proxy providing an OpenAI-compatible API layer over ChatGPT.

Python FastAPI Playwright License


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-stealth to navigate automated bot detection.
  • 🔄 OpenAI Compatible: Supports OpenAI's /v1/chat/completions and /v1/models endpoints.
  • 🖼️ 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-auth CLI built with Typer & Rich for setup and execution.

🚀 Getting Started

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:

  1. Go to the Releases page
  2. Download codex-auth.exe
  3. 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)

Source distribution for codex-auth-proxy 0.2.0
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)

Table of built distributions (wheels) for codex-auth-proxy 0.2.0
File Interpreter ABI Platform Actions
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 log

Release 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 log

Security 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.

Select from 2 files

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 log

A 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.

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page