CGChatGPT Desktop API
Independent platform · macOS · localhost

Your ChatGPT app.
Your local API.

Turn the authenticated ChatGPT section of the official macOS app into an OpenAI-compatible endpoint. Separate platform, separate playground, and separate documentation from the Codex OAuth API.

Request path
Your clientOpenAI-compatible JSON
Local bridge · 127.0.0.1:1456Serialized desktop automation
Official ChatGPT appAuthenticated session · Temporary Chat

A complete local platform

The hosted site supplies the interface and documentation. Your prompts and responses travel only between your browser, the loopback bridge, and the desktop app.

API

OpenAI-compatible surface

Use POST /v1/chat/completions, POST /v1/images/generations, and GET /v1/models with existing HTTP clients.

UI

Dedicated playground

Check bridge health, send prompts, and inspect responses from a workspace built only for the ChatGPT desktop bridge.

DOC

Dedicated API docs

Request schemas, response examples, errors, configuration, security boundaries, and an OpenAPI document live under this platform.

127

Loopback only

The bridge binds to 127.0.0.1. It is not a hosted proxy and cannot be reached from another machine.

TMP

History cleanup

Text uses Temporary Chat. Images use a fresh regular chat that is deleted before Temporary Chat is restored.

No credential extraction

The bridge drives the authenticated renderer. It does not copy cookies, access tokens, or ChatGPT credentials out of the app.

Start in under a minute

Requires the official ChatGPT macOS app, an active signed-in session, and Node.js 22 or newer.

1. Connect from the dashboard

The dashboard provides one terminal command that installs the background bridge, starts it automatically when you sign in, and does not require an open terminal afterward.

mkdir -p ~/.local/bin
curl -fsSL https://chatgpt.codexauthapi.dev/bridge.js \
  -o ~/.local/bin/chatgpt-api
chmod +x ~/.local/bin/chatgpt-api
~/.local/bin/chatgpt-api install
Open dashboard

2. Send a completion

The endpoint is available only on your Mac.

curl http://127.0.0.1:1456/v1/chat/completions \
  -H 'Content-Type: application/json' \
  -d '{
    "model": "chatgpt-desktop",
    "messages": [
      {"role": "user", "content": "Hello"}
    ]
  }'
Experimental and unofficial. This platform automates the official desktop UI and is not an OpenAI-supported ChatGPT API. Desktop app changes may require bridge updates.