Status: [UNTESTED] Endpoints found: http://127.0.0.1:10531/v1/images/generations Source: https://github.com/BenjiThatFoxGuy/oai-bridge # oai-bridge > A localhost OpenAI-compatible HTTP proxy that uses your **ChatGPT subscription** (via OAuth) instead of a paid API key — including **image generation** with `gpt-image-2`. [![npm version](https://img.shields.io/npm/v/oai-bridge.svg?color=cb3837&logo=npm)](https://www.npmjs.com/package/oai-bridge) [![license: MIT](https://img.shields.io/npm/l/oai-bridge.svg?color=blue)](./LICENSE) [![CI](https://img.shields.io/github/actions/workflow/status/BenjiThatFoxGuy/oai-bridge/ci.yml?branch=main&label=ci)](https://github.com/BenjiThatFoxGuy/oai-bridge/actions) [![bundle size](https://img.shields.io/badge/published%20size-15.7%20KB-success)](https://www.npmjs.com/package/oai-bridge) [![source size](https://img.shields.io/badge/source-~900%20LOC-informational)](./src) ```bash npx oai-bridge serve ``` ```python from openai import OpenAI c = OpenAI(base_url="http://127.0.0.1:10531/v1", api_key="unused") img = c.images.generate(model="gpt-image-2", prompt="a fox in the woods") ``` That's the whole demo. The OpenAI SDK calls go through the bridge, the bridge talks to ChatGPT using your existing OAuth tokens, and you get back a base64 PNG. No API key, no per-image charge — just your existing subscription. --- ## Table of contents - [Why this exists](#why-this-exists) - [How it works](#how-it-works) - [Install](#install) - [First-time setup](#first-time-setup) - [Usage](#usage) - [HTTP API](#http-api) - [As a library](#as-a-library) - [CLI](#cli) - [Integrations](#integrations) - [Configuration](#configuration) - [Comparison](#comparison) - [Responsible use](#responsible-use) - [Documentation](#documentation) - [Contributing](#contributing) - [License](#license) --- ## Why this exists You already pay for a ChatGPT subscription. It generates images, runs the latest models, and you use it daily. But when you want to call the same models from a script, the official path is to **pay again** through `api.openai.com` — separate billing, separate quota,