adrianhajdin / project_ai_mern_image_generation

Build and Deploy a Full Stack MERN AI Image Generation App MidJourney & DALL E Clone
https://jsmastery.pro
1.08k stars 302 forks source link

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

Open Ritiksharma-06 opened 1 year ago

Ritiksharma-06 commented 1 year ago
         I have tried the above solution provided earlier but still, it is showing the same error.
Taimur-s commented 1 year ago

same issue

Taimur-s commented 1 year ago

Billing hard has been reached Billing hard b hard

28 #32

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

Ritiksharma-06 commented 1 year ago

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

https://github.com/adrianhajdin/project_ai_mern_image_generation/issues/28

32

https://github.com/adrianhajdin/project_ai_mern_image_generation/issues/32

I guess these screenshots are self-explanatory any one looking for a soltion

— Reply to this email directly, view it on GitHub https://github.com/adrianhajdin/project_ai_mern_image_generation/issues/35#issuecomment-1442659989, or unsubscribe https://github.com/notifications/unsubscribe-auth/A2TYJ5DJHBEXNYSBCBABH4LWZAEGRANCNFSM6AAAAAAVGF4VTQ . You are receiving this because you authored the thread.Message ID: @.*** .com>

Taimur-s commented 1 year ago

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.

Gracel-tm commented 1 year ago

try with another api key

kumaresh-rgb commented 1 year ago

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 commented 1 year ago

same issue

Add your debit card details and create new key that all

Taimur-s commented 1 year ago

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

Muhammad-Fardin commented 1 year ago

guess openAi is not "open" anymore.

NarsipuraAbhinav commented 1 year ago

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

mohammadfaizel commented 1 year ago

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!

Darkcoder-paditya commented 1 year ago

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

Change const to var

worked for me

Taimur-s commented 1 year ago

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

Change const to var

worked that makes sense

scriptyvijay commented 1 year ago

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.