This Node.js project provides a client implementation for ChatGPT and Bing AI that you can use three ways: as a JavaScript module, as a standalone REST API server, or as a command-line app. It was one of the earliest tools for talking to ChatGPT programmatically.
Before official APIs covered every use case, node-chatgpt-api let developers build on top of the ChatGPT web experience, maintaining conversation state across messages and exposing it through a clean API of its own. It also supported Microsoft’s Bing AI chat as an alternative backend. The package is published on npm as @waylaidwanderer/chatgpt-api, can be run with Docker, and includes options for proxies and session handling. It is an unofficial client rather than an OpenAI product, released under the MIT license, and it has gathered over 4,100 stars on GitHub. The repository was last updated in 2024; because it interfaces with web services that change frequently, expect some maintenance when those services shift.
The library is free and open source under the MIT license. You access ChatGPT or Bing with your own account, so any costs are those of your own subscriptions or usage.
JavaScript developers prototyping chatbots and integrations who want a lightweight, self-hosted way to experiment with conversational AI from Node.js.