One Node Module, Three Clients, and a Bing Jailbreak
It wraps ChatGPT and Bing AI in a Node.js module, REST server, and CLI, handling conversation state and authentication quirks for you.

What it does
This package is a Node.js client for ChatGPT and Bing AI that also exposes itself as a REST API server and a terminal chat interface. It abstracts away the underlying endpoints—official OpenAI API, unofficial browser automation, and Bing’s GPT-4 backend—while replicating chat threads with persistent conversation and message IDs. State is kept in memory by default, though you can offload it to a JSON file or a database via Keyv adapters.
The interesting bit
The README’s update history reads like a war diary: weeks of chasing patched OpenAI model names, reverse-proxy workarounds, and Cloudflare bypasses before settling on the official gpt-3.5-turbo API. The standout oddity is BingAIClient, which ships a built-in jailbreak mode that removes Bing’s daily message caps, lifts per-conversation limits, and resurrects “Sydney.”
Key highlights
- Three access modes under one roof:
ChatGPTClient(official API),ChatGPTBrowserClient(unofficial site automation via reverse proxy), andBingAIClient(Bing GPT-4). - Replicates official ChatGPT thread behavior—conversation IDs, message IDs, and context—backed by the Keyv cache layer.
- Offers a REST API server and CLI app, so non-Node consumers or terminal users can interact without writing integration code.
- Global prompt prefixes and custom labels let you re-skin the bot’s personality, though per-conversation tweaks are not yet implemented.
- Bing client includes an optional jailbreak to bypass usage limits and restore the pre-muzzled Sydney persona.
Caveats
- Automating
chat.openai.comthroughChatGPTBrowserClientmay get your account banned, and the reverse-proxy route exposes your access token to a closed-source third-party server. - Personality and prompt customization is global-only for now.
- The Bing AI client is marked experimental.
Verdict
Node.js developers who want a drop-in abstraction over OpenAI and Bing with conversation persistence—and perhaps a self-hosted REST gateway—will find this saves boilerplate. Skip it if you only need thin API wrappers or have no interest in managing chat threads and Bing’s safety rails.
Frequently asked
- What is waylaidwanderer/node-chatgpt-api?
- It wraps ChatGPT and Bing AI in a Node.js module, REST server, and CLI, handling conversation state and authentication quirks for you.
- Is node-chatgpt-api open source?
- Yes — waylaidwanderer/node-chatgpt-api is open source, released under the MIT license.
- What language is node-chatgpt-api written in?
- waylaidwanderer/node-chatgpt-api is primarily written in JavaScript.
- How popular is node-chatgpt-api?
- waylaidwanderer/node-chatgpt-api has 4.2k stars on GitHub.
- Where can I find node-chatgpt-api?
- waylaidwanderer/node-chatgpt-api is on GitHub at https://github.com/waylaidwanderer/node-chatgpt-api.