gpt4free-ts  by xiangsx

Free OpenAI GPT-4 API in TypeScript

created 2 years ago
7,766 stars

Top 6.8% on sourcepulse

GitHubView on GitHub
1 Expert Loves This Project
Project Summary

This project provides a free, reverse-engineered API gateway for various large language models, including GPT-4, GPT-3.5, Claude, and Llama. It targets developers and users seeking to access these powerful models without direct API keys or subscriptions, offering a unified interface to multiple backend providers.

How It Works

The project acts as a proxy, routing requests to various websites that offer free access to LLMs. It scrapes these sites, extracts the model responses, and presents them through a standardized OpenAI-compatible API endpoint. This approach leverages existing, often unofficial, access points to provide a free alternative to paid services.

Quick Start & Requirements

  • Install: yarn install
  • Run: yarn start
  • Docker: docker run -p 3000:3000 --env-file .env xiangsx/gpt4free-ts:latest
  • Prerequisites: Node.js, Yarn. An .env file is required for proxy settings, API keys (for specific providers like Forefront), and email types for registration.
  • Documentation: http://127.0.0.1:3000/supports

Highlighted Details

  • Supports a wide range of models including GPT-4, GPT-3.5-turbo, Claude, Llama-2, Mixtral, and Stable Diffusion.
  • Offers an OpenAI-compatible API endpoint for easy integration.
  • Provides both direct endpoint access and stream responses for chat completions.
  • Includes a Docker image for simplified deployment.

Maintenance & Community

  • Active development with a Discord community for updates and support: https://discord.gg/cYUU8mCDMd
  • The project is a replication of xtekky/gpt4free.

Licensing & Compatibility

  • Licensed under GNU GPL. This license may impose copyleft restrictions, requiring derivative works to also be open-sourced under the GPL.
  • Compatibility for commercial use or linking with closed-source projects may be restricted due to the GPL license.

Limitations & Caveats

The project relies on reverse-engineered access to third-party websites, which are prone to breaking without notice. The availability and performance of models are dependent on the stability of these external providers. The project explicitly states it is for educational purposes only and disclaims responsibility for any misuse.

Health Check
Last commit

11 months ago

Responsiveness

1 day

Pull Requests (30d)
0
Issues (30d)
0
Star History
54 stars in the last 90 days

Explore Similar Projects

Feedback? Help us improve.