finds.dev

waylaidwanderer/node-chatgpt-api

A client implementation for ChatGPT and Bing AI. Available as a Node.js module, REST API server, and CLI app.

View on GitHubHomepage ↗

★ 4,168JavaScriptMITupdated Jan 2024

// the take

A Node.js client library wrapping ChatGPT and Bing AI, with a REST API server and CLI bundled in. Built in early 2023 when the official API didn't exist yet, so most of its value came from reverse-engineering private endpoints. That problem it solved is now moot.

The REST API server with SSE streaming is genuinely well-designed — one endpoint, clean JSON protocol, works as a drop-in backend for non-Node projects. Keyv-based conversation storage is a smart choice: swappable adapters let you go from in-memory to Redis or SQLite without code changes. The per-message client-options whitelist in the API server is a thoughtful security boundary that prevents callers from overriding arbitrary config. Docker support and a global npm install path make it operationally easy to stand up.

The core reason this repo exists — accessing ChatGPT without paying — is obsolete. BingAIClient depends on cookie scraping from a UI that Microsoft has since replaced; ChatGPTBrowserClient warns of ban risk and routes through a third-party Cloudflare bypass server that is listed as offline in the README itself. Last commit was January 2024 and there's no indication of active maintenance. If you just want gpt-3.5-turbo or gpt-4o via the official API, the official openai npm package is a better choice with no reverse-engineering baggage.

We read the README, the directory tree and a key source file in June 2026. Nobody pays to be listed. How we judge →

// at a glance

Stars
4,168
Forks
717
Language
JavaScript
License
MIT
Last commit
27 Jan 2024

// nearby

If node-chatgpt-api isn't quite it.

All repos →