Anyone can use ChatGPT for free, but if you want to use GPT4, the latest language model, you have to either pay for ChatGPT Plus, pay for access to OpenAI’s API, or find another site that has incorporated GPT4 into its own free chatbot. There are sites that use OpenAI such as Forefront and You.com, but what if you want to make your own bot and don’t want to pay for the API?
A GitHub project called GPT4free (opens in new tab) allows you to get free access to the GPT4 and GPT3.5 models by funneling those queries through sites like You.com (opens in new tab), Quora (opens in new tab) and CoCalc (opens in new tab) and giving you back the answers. The project is GitHub’s most popular new repo, getting 14,000 stars this week.
Now, according to Xtekky, the European computer science student who runs the repo, OpenAI has sent a letter demanding that he take the whole thing down within five days or face a lawsuit.
I interviewed Xtekky via Telegram, and he said he doesn’t think OpenAI should be targeting him since he isn’t connecting directly to the company’s API, but is instead getting data from other sites that are paying for their own API licenses. If the owners of those sites have a problem with his scripts querying them, they should approach him directly, he posited.
I installed GPT4Free in WSL2 (Windows Subsystem for Linux) on my PC. It took just a few moments, which involved cloning the Github repository, installing some required libraries with pip, and running a Python script. With the script launched, I used my web browser to visit http://localhost:8501, the address it gave me, and was presented with a working chatbot that was running off of my PC.
On the back end, GPT4Free is visiting various API urls that sites like You.com, an AI-powered search engine that employs OpenAI’s GPT3.5 model for its answers, use for their own queries. For example, the main GPT4Free hits the URL https://you.com/api/streamingSearch, feeds it various parameters, and then takes the JSON it returns and formats it. The GPT4Free repo also has scripts that grab data from other sites such as Quora, Forefront, and TheB. Any enterprising developer could use these simple scripts to make their own bot.
“One could achieve the same [thing by] just opening tabs of the sites. I can open tabs of Phind, You, etc. on my browser and spam requests,” Xtekky said. “My repo just does it in a simpler way.”
All of the sites GPT4Free draws from are paying OpenAI fees in order to use its large language models. So when you use the scripts, those sites end up footing the bill for your queries, without you ever visiting them. If those sites are relying on ad revenue from their sites to offset these API costs, they are losing money because of these queries.
Xtekky said that he is more than happy to take down scripts that use individual sites’ APIs upon request from the owners of those sites. He said that he has already taken down scripts that use phind.com, ora.sh and writesonic.com.
Perhaps more importantly, Xtrekky noted, any of these sites could block external uses of their internal APIs with common security measures. One of many methods that sites like You.com could use is to block API traffic from any IPs that are not their own.
Xtrekky said that he has advised all the sites that wrote to him that they should secure their APIs, but none of them has done so. So, even if he takes the scripts down from his repo, any other developer could do the same thing.
The developer said that he doesn’t believe he’s liable for what others do with his script and that OpenAI should not be targeting him for using other sites’ APIs, which are available unsecured on the open web.
“OpenAI could also reach out to the sites and warn/notify them and in collaboration come to me and do a takedown, but it seems that this [legal threat] solely comes from OpenAI and they basically claim that I am directly attacking them,” he said. “I do not really know, but it looks like if a site use OpenAI’s API, it has OpenAI’s legal protection and OpenAI is liable for the damages the site gets.”
Xtrekky said that he is still deciding whether or not to take down his the GPT4Free GitHub repo and is seeking legal advice before making a decision. However, as he notes, the code is out there and anyone can find ways to use these sites’ APIs if they continue to be unsecured.
“Users are sharing and hosting this project everywhere,” he said. “Deletion of my repo will be insignificant.”
We reached out to OpenAI’s press email for comment and will update this story if and when we receive a response.
If you want to try it while it’s still there, check out GPT4Free on GitHub (opens in new tab). Even if it gets taken down, its Discord channel (opens in new tab) seems likely to remain. If you want to set up your own ChatGPT-like chatbot without potentially running afoul of OpenAI’s lawyers, check out our tutorial on how to run ChatGPT on a Raspberry Pi or PC (opens in new tab)