node-chatgpt-api logo

node-chatgpt-api

Free

4.2k

FreeFree tier
Inputs: textOutputs: text
Type
Open Source

About node-chatgpt-api

node-chatgpt-api is an open-source client implementation for ChatGPT and Bing AI, developed by waylaidwanderer. It supports multiple integration modes: a Node.js module for programmatic use, a REST API server for web services, and a CLI app for command-line interactions. The library provides support for the official OpenAI gpt-3.5-turbo model (the same model behind ChatGPT), as well as fallback to text-davinci-003. It also includes an experimental ChatGPTBrowserClient that leverages a Cloudflare bypass to access chat.openai.com without browser automation, and support for reverse proxy servers to access underlying ChatGPT models. Features like userLabel, chatGptLabel, and promptPrefix allow customization of system instructions. Docker support is available via Dockerfile and docker-compose.yml.

Key Features

Client implementation for ChatGPT and Bing AI
Available as Node.js module, REST API server, and CLI app
Support for official ChatGPT model (gpt-3.5-turbo) via OpenAI API
Experimental browser-based client (ChatGPTBrowserClient) with Cloudflare bypass
Reverse proxy server support for accessing ChatGPT underlying models
Customizable user label, chat GPT label, and prompt prefix (system instructions)
Fallback to text-davinci-003 model
Docker support for easy deployment

Pros & Cons

Pros
  • Multiple deployment modes (module, REST API, CLI) for flexibility
  • Supports both official API (gpt-3.5-turbo) and browser-based access
  • Active development with frequent updates and community contributions
  • Free and open source with permissive license
  • Docker support simplifies setup and deployment
Cons
  • Using browser-based methods may risk account ban from OpenAI
  • Reverse proxy servers expose access token to third-party servers
  • Official API usage incurs costs (though relatively cheap at $0.002/1k tokens)
  • Experimental features like ChatGPTBrowserClient may be unstable or break

Best For

Build chatbots powered by ChatGPT or Bing AIIntegrate ChatGPT into Node.js applicationsRun a REST API server to serve ChatGPT responsesUse CLI for quick command-line chat interactionsAutomate conversations and test AI models

FAQ

What models does node-chatgpt-api support?
It supports the official ChatGPT model (gpt-3.5-turbo) via the OpenAI API, the older text-davinci-003 model, and offers experimental access to the underlying ChatGPT models via a reverse proxy or browser-based client.
Is this tool free to use?
The tool itself is free and open source. However, using the official OpenAI API for gpt-3.5-turbo or text-davinci-003 incurs usage costs. The browser-based alternative is free but comes with risks and limitations.
Can I use this with Bing AI?
Yes, the project description states it is a client implementation for both ChatGPT and Bing AI.