shell_gpt icon indicating copy to clipboard operation
shell_gpt copied to clipboard

Too Many Requests for url error

Open thatmagicalcat opened this issue 1 year ago • 15 comments

When i'm using the cli, its giving me this error

HTTPError: 429 Client Error: Too Many Requests for url: https://api.openai.com/v1/chat/completions

thatmagicalcat avatar Mar 19 '23 06:03 thatmagicalcat

It seems you are using free version of ChatGPT which restricts frequency of API hits.

As per free-tier plan, one can have a 20-request limit per minute, with 150,000 tokens per minute. While paid users contain a rate limit of 60 RPM and 250 TPM in their first 48 hours. After 48 hours the rate limits of paid users turn to 3,500 RPM and 350,000 TPM.

Hope this answers the issue.

remainisyours avatar Mar 19 '23 11:03 remainisyours

That makes sense, but I have not used ChatGPT in over 2 months, so my free tier account should be 'fresh' with the unused 20-request limit per minute.

After installing ShellGPT and trying an example, I get the 429 error immediately. I've tried 4 example requests in the past 10 minutes, all with the same error.

So I do not believe at this point it is a limit-per-minute issue.

ADDENDUM: I just checked my account, and apparently the 'free trial' expired on Jan 1, 2023, and I had only used 0.01 out of $18.00 granted to me. And the expired data usage is confirmed when I tried to make a request via the ChatGPT website, and got 'You've reached your usage limit.' :(

Will add some funds and try again.

ADDENDUM 2: Added a creditcard so that I am billed at the end of each month. I still receive the Too Many Requests error. Would I need to 'restart' or refresh ShellGPT somehow so that the new limit is recognized?

digitalmouse avatar Mar 20 '23 14:03 digitalmouse

Just a shot in the dark, but have you tried refreshing the API token to a new one ? Just in case that one was tied to the free tier ?

BSD-Yassin avatar Mar 20 '23 14:03 BSD-Yassin

Solved it (for me at least). After making sure I had 'credit' to make requests, I closed down all my open terminals, open a new terminal session, walked through the tutorial (again) at https://beebom.com/how-use-chatgpt-linux-terminal/ (probably over kill), and now it works. So lesson is to make sure you have request credit available and not expired. :)

digitalmouse avatar Mar 20 '23 14:03 digitalmouse

I don't think so there is limit like $18 credits to a free tier account. Can you point to official references for same? Thanks

AnkitGupta17134 avatar Mar 20 '23 18:03 AnkitGupta17134

I don't think so there is limit like $18 credits to a free tier account. Can you point to official references for same? Thanks

i was getting this error too. I am not able to find $18 credit though. However i can see my accounts usage here: https://platform.openai.com/account/usage

Naren-Hub avatar Mar 21 '23 01:03 Naren-Hub

We have some information regarding to this ussue on our wiki page.

TheR1D avatar Mar 21 '23 02:03 TheR1D

So the conclusion is if the trial credit provided is finished, we need to use the paid version of ChatGPT to be able to use ShellGPT?

Xtron135 avatar Mar 21 '23 03:03 Xtron135

I am able to chat via the web page but through the shell I am also getting the "too many request for url" error Do I have to be a paid member to use sgpt?

eventhorizon02 avatar Mar 21 '23 18:03 eventhorizon02

No, you don't need a paid membership to use sgpt. If you haven't exceeded your limit and you're receiving a 429: too many requests for URL error, this typically means OpenAI is experiencing high traffic and server overloads, just retry your requests after a brief wait.

TheR1D avatar Mar 21 '23 21:03 TheR1D

I have tried 6 or 7 times over a period of two days and got the same 429 error every time. As a matter of fact I was not able to get a reply even once, yet accessing it through the browser works. So I'm thinking there is some other problem.

eventhorizon02 avatar Mar 21 '23 21:03 eventhorizon02

I have tried 6 or 7 times over a period of two days and got the same 429 error every time. As a matter of fact I was not able to get a reply even once, yet accessing it through the browser works. So I'm thinking there is some other problem.

Yup same as mine. The browser version works very fine. Anyway thanks.

Xtron135 avatar Mar 21 '23 23:03 Xtron135

No, you don't need a paid membership to use sgpt. If you haven't exceeded your limit and you're receiving a 429: too many requests for URL error, this typically means OpenAI is experiencing high traffic and server overloads, just retry your requests after a brief wait.

If we reached the limit, how to apply for more 'limit'? Ive go through the billing page. So do we need to pay if we have reached our limit? If no, how to increase the limit back without paying?.

Xtron135 avatar Mar 21 '23 23:03 Xtron135

You don't need to have a paid account to use sgpt provided the free trial credit given is still valid and has not been used up (and this would not be replenished every month). Otherwise, you have to be a paid member. I had the same issue. Requests made through sgpt were returning 429, since my free trial credit has expired. Once i converted to a paid account (charged on per use basis), my requests were coming through successfully.

rarahim75 avatar Mar 23 '23 04:03 rarahim75

I'm having the same issue. Newly generated token, have $17.87 credit remaining and I can chat on chat.openai.com/chat perfectly fine, so I would assume the servers aren't down.

CharlotteCross1998 avatar Mar 26 '23 13:03 CharlotteCross1998

ChatGPT Web service and OpenAI Account (API) are two different services. Just because ChatGPT can reply to content doesn't mean the API can. You need to check the API usage.

CharleeWa avatar Apr 01 '23 13:04 CharleeWa

image Probably most people encountering this issue are being mislead by the "remanining" credit. They give you 3 months of free tier, but after that it's expired, as you can see my free credit expired April 1st 2023 (kindof a joke). It is what it is.

Pablo1107 avatar Apr 08 '23 20:04 Pablo1107