Welcome to the guide on how to set up the ChatGPT API Free Reverse Proxy, offering a seamless way to access the power of OpenAI’s gpt-3.5-turbo without the need for an API key. Although the project is a bit outdated at the moment, we’re here to walk you through the self-hosting process and provide you with alternative methods to access the API.
Quick Links
- Join our Discord Community for support and questions. (Note: Your Discord account must be at least 7 days old to join.)
Table of Contents
- Features
- Option 1: Installing Self-Hosting Guide (Without using any API key)
- Option 2: Accessing Our Hosted API (Free)
- Usage Examples
- License
Features
- Streaming Response: The API supports streaming response, so you can get the response as soon as it’s available.
- API Endpoint Compatibility: Full alignment with official OpenAI API endpoints, ensuring hassle-free integration with existing OpenAI libraries.
- Complimentary Access: No charges for API usage, making advanced AI accessible to everyone, even without an API key.
Installing Self-Hosting Guide
Using Docker
If you prefer using Docker, follow these steps:
- Ensure Docker is installed by referring to the Docker Installation Docs.
- Run the following command:
- Done! You can now connect to your local server’s API at: http://localhost:3040/v1/chat/completions.
docker run -dp 3040:3040 pawanosmanchatgpt:latest
Install with Chat Web Interfaces
You can run third-party chat web interfaces, such as BetterChatGPT and LobeChat, using this API with Docker Compose. Click here for the installation guide.
Your PC/Server
To install and run the ChatGPT API Reverse Proxy on your PC/Server, follow these steps:
- Ensure Node.js (v19+) is installed: Download Node.js.
- Clone this repository:
- Open start.bat (Windows) or start.sh (Linux) to install dependencies and launch the server.
- Done! You can connect to your local server’s API at: http://localhost:3040/v1/chat/completions.
git clone https://github.com/PawanOsman/ChatGPT.git
Termux on Android Phones
To run the ChatGPT API Reverse Proxy on Android using Termux, follow these steps:
- Install Termux from the Play Store.
- Update Termux packages:
- Upgrade Termux packages:
- Install git, Node.js, and npm:
- Clone the repository:
- Navigate to the cloned directory:
- Start the server with:
- Your local server will now be running and accessible at: http://localhost:3040/v1/chat/completions.
apt update
apt upgrade
apt install -y git nodejs
git clone https://github.com/PawanOsman/ChatGPT.git
cd ChatGPT
bash start.sh
Accessing Our Hosted API
Utilize our pre-hosted ChatGPT-like API for free by:
- Joining our Discord server.
- Obtaining an API key from the #Bot channel with the key command.
- Incorporating the API key into your requests to: https://api.pawan.krd/v1/chat/completions.
Usage Examples
Leverage the same integration code as OpenAI’s official libraries by simply adjusting the API key and base URL in your requests. For self-hosted setups, ensure to switch the base URL to your local server’s address as mentioned above.
Example Usage with OpenAI Libraries
Python Example
import openai
openai.api_key = 'anything'
openai.base_url = 'http://localhost:3040/v1'
completion = openai.chat.completions.create(
model='gpt-3.5-turbo',
messages=[
{'role': 'user', 'content': 'How do I list all files in a directory using Python?'},
],
)
print(completion.choices[0].message.content)
Node.js Example
import OpenAI from 'openai';
const openai = new OpenAI({
apiKey: 'anything',
baseURL: 'http://localhost:3040/v1',
});
const chatCompletion = await openai.chat.completions.create({
messages: [{ role: 'user', content: 'Say this is a test' }],
model: 'gpt-3.5-turbo',
});
console.log(chatCompletion.choices[0].message.content);
License
This project is under the AGPL-3.0 License. Refer to the LICENSE file for detailed information.
Troubleshooting
If you encounter any issues while setting up, consider the following troubleshooting steps:
- Ensure your Docker is running properly if using Docker.
- Check Node.js installation if you’re using a PC/server setup.
- Verify that the right URL and endpoint are being accessed.
- Remember to join our Discord community for real-time help.
- For more insights, updates, or to collaborate on AI development projects, stay connected with fxis.ai.
Conclusion
With just a few steps, you can harness the impressive capabilities of the ChatGPT API Free Reverse Proxy. Don’t hesitate to explore other options if you face any blockage while setting things up. Such advancements are crucial for the future of AI, enabling more comprehensive and effective solutions. Our team is continually exploring new methodologies to push the envelope in artificial intelligence, ensuring that our clients benefit from the latest technological innovations.

