ChatGPT API (Node.js)

ChatGPT API (Node.js)

โ˜… 3.8 ๐Ÿ”– 1200 saves ๐Ÿ’ฐ Free GitHub

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.

Overview

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.

Key Features

  • Use as a Node.js module, REST API server, or CLI
  • Conversation state tracked across multi-turn chats
  • Backends for both ChatGPT and Bing AI
  • Proxy support and configurable session options
  • Docker image for quick self-hosted deployment
  • Published on npm for easy installation

๐Ÿ’ณ Pricing

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.

Who Is It For

JavaScript developers prototyping chatbots and integrations who want a lightweight, self-hosted way to experiment with conversational AI from Node.js.

๐Ÿš€ Visit ChatGPT API (Node.js) Official Site

๐Ÿšฉ Report an issue