finds.dev← search

// the find

waylaidwanderer/node-chatgpt-api

★ 4,168 · JavaScript · MIT · updated Jan 2024

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

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.

View on GitHub → Homepage ↗

// want more like this?

We dig through GitHub every week and send a few repos picked for what you actually care about — each with an honest take like this one.

Get finds in your inbox → Search again →