project_ai_mern_image_generation icon indicating copy to clipboard operation
project_ai_mern_image_generation copied to clipboard

Unexpected token 'B', "Billing ha"... is not valid JSON

Open Ritiksharma-06 opened this issue 2 years ago • 14 comments

         I have tried the above solution provided earlier but still, it is showing the same error.

Ritiksharma-06 avatar Feb 23 '23 22:02 Ritiksharma-06

same issue

Taimur-s avatar Feb 24 '23 00:02 Taimur-s

Billing hard has been reached Billing hard b hard #28 #32

I guess these screenshots are self-explanatory anyone looking for a solution

Taimur-s avatar Feb 24 '23 01:02 Taimur-s

your welcome

Thanks for your reply. It is very helpful. On Fri, 24 Feb 2023, 6:50 am Taimur Hassan, @.> wrote: [image: Billing hard has been reached] https://user-images.githubusercontent.com/94656455/221067080-064c7df6-280e-49cb-98b1-219f5d6bacc6.PNG [image: Billing hard] https://user-images.githubusercontent.com/94656455/221067117-d73c08b8-4239-4f7e-b024-51c9b69974df.PNG [image: b hard] https://user-images.githubusercontent.com/94656455/221067161-017bb2bf-64f9-46b5-94f9-f5d8cf018643.PNG #28 <#28> #32 <#32> I guess these screenshots are self-explanatory any one looking for a soltion — Reply to this email directly, view it on GitHub <#35 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/A2TYJ5DJHBEXNYSBCBABH4LWZAEGRANCNFSM6AAAAAAVGF4VTQ . You are receiving this because you authored the thread.Message ID: @. .com>

your welcome.

Taimur-s avatar Feb 25 '23 09:02 Taimur-s

try with another api key

Gracel-tm avatar Mar 02 '23 18:03 Gracel-tm

Billing hard has been reached Billing hard b hard #28 #32

I guess these screenshots are self-explanatory anyone looking for a solution

Add your debit card and create new key that all

kumaresh-rgb avatar Mar 06 '23 11:03 kumaresh-rgb

same issue

Add your debit card details and create new key that all

kumaresh-rgb avatar Mar 06 '23 11:03 kumaresh-rgb

@kumaresh-rgb Sure i'll give it a shot.

Taimur-s avatar Mar 07 '23 19:03 Taimur-s

guess openAi is not "open" anymore.

Muhammad-Fardin avatar Apr 06 '23 16:04 Muhammad-Fardin

Found it. This is occurring because the free trial usage might have either expired or the granted credits limit has been reached. To solve this there are two methods I know of: 1)Enter your card details and and set up a paid account.

2)Create a completely new account with new e-mail and new phone number, create a new API and replace the old one with the new one in the ".env" file in server folder, restart the server from the terminal and it should work just fine.

You can see the free-trial details here in this page from your openAI account: https://platform.openai.com/account/usage

NarsipuraAbhinav avatar Apr 09 '23 14:04 NarsipuraAbhinav

you need to make a new account at open ai and use the api key from the new account. You are facing this error because the api is paid. With the new account you will get 5$ worth of free credits, each api call costs 0.02$ so be careful making too much requests. Keep learning, hope this helps!

mohammadfaizel avatar Apr 16 '23 14:04 mohammadfaizel

guys, use this: var openai = new OpenAIApi(configuration); instead of : const openai = new OpenAIApi(configuration);

Change const to var

##worked for me

Darkcoder-paditya avatar May 18 '23 13:05 Darkcoder-paditya

guys, use this: var openai = new OpenAIApi(configuration); instead of : const openai = new OpenAIApi(configuration);

Change const to var

##worked that makes sense

Taimur-s avatar May 18 '23 17:05 Taimur-s

I was also got this error but i changed with newly created account and added app.use(urlencoded({ extended: true })); this to my index.js then it was working.

scriptyvijay avatar May 29 '23 12:05 scriptyvijay