adrianhajdin/project_ai_mern_image_generation

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

Ritiksharma-06 opened this issue ยท 14 comments

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

same issue

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

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

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.

try with another api key

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

same issue

Add your debit card details and create new key that all

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

guess openAi is not "open" anymore.

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

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!

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

Change const to var

##worked for me

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

Change const to var

##worked that makes sense

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.