gpt4free icon indicating copy to clipboard operation
gpt4free copied to clipboard

deepai Unauthorized for url

Open k1287988804 opened this issue 1 year ago • 3 comments

Traceback (most recent call last): File "c:\MyProjects\gpt4free\gpt4free\test.py", line 15, in for chunk in deepai.ChatCompletion.create(messages): File "c:\MyProjects\gpt4free\gpt4free\deepai_init_.py", line 56, in create r.raise_for_status() File "C:\ProgramData\Python10\lib\site-packages\requests\models.py", line 1021, in raise_for_status raise HTTPError(http_error_msg, response=self) requests.exceptions.HTTPError: 401 Client Error: Unauthorized for url: https://api.deepai.org/chat_response


I was able to get data normally before, but suddenly it doesn’t work, has it been detected? 😢

k1287988804 avatar May 19 '23 09:05 k1287988804

Your IP may have been banned or rate limited. I might add some sort of automatic proxy selection in the future though.

ading2210 avatar May 20 '23 00:05 ading2210

Needs automatic proxy. After 10 requests server automatically blocks that IP. Unauthorized after that

noes14155 avatar Jun 07 '23 00:06 noes14155

Hi guys, any idea how to fix this issue? I think the above comment makes sense as I was banned after 26 response. Yet I have no clues to solve this. Any help would be appreciated.

JinhuaLiang avatar Jun 12 '23 18:06 JinhuaLiang

I'm getting same please any solutions

Aryan2-1 avatar Jul 07 '23 14:07 Aryan2-1

me as well

xBigPanda avatar Aug 29 '23 18:08 xBigPanda

Reason: there is a login page so you cant get to the response i think. [solution: make a deep ai account, log in, go to profile and copy api key, then replace the "api_key":api_key in the headers in deepai.py file(in ur g4f site packages>models>DeepAi.py) with "api_key": api_key u got from ur profile]

xBigPanda avatar Aug 29 '23 19:08 xBigPanda

This API is no more working after 7-10 responses, it gives the "Unauthorized" error. I tried with different proxies and still not working!

x-frst avatar Sep 13 '23 18:09 x-frst