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.09k stars 303 forks source link

when i generate image this error occured again and again #8

Open ritik2629 opened 1 year ago

ritik2629 commented 1 year ago

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

image

TidbitsJS commented 1 year ago

Hey @ritik2629, if you're using the keys mentioned in the YouTube video, kindly replace them with yours. Apparently, many people used the same keys we used for the project, thus leading to free credits exhaustion. If you create your account, you'll get these free credits. Paying after that is your choice, but initially, you don't have to pay or use any credit card.

These are the keys you'll need:

  1. OpenAI API key
  2. Cloudinary Keys
  3. MongoDB URL

Please create your account and use them in both server-side code and the deployment (Do not forget to add these keys as Environment variables when you start to deploy the server on Render)

Thank you!

ritik2629 commented 1 year ago

@TidbitsJS But I use my own API key

NverKhachatryan commented 1 year ago

https://github.com/adrianhajdin/project_ai_mern_image_generation/issues/7#issuecomment-1405139867

PedroLab0 commented 1 year ago

OpenAI gives $18 to new users. You have probably already spent it using one of their services. I recommend you to create another account and generate a new api key or pay to use it. Once it is set up it will not give you any more problems.

sumon97690 commented 1 year ago

i am also facing these same error, i used my own api key only

prasad-shembekar commented 1 year ago

same error here, used personal api

Asifp6021 commented 1 year ago

check your url in posteman is it working or not. if it says invalid key do below steps.

clicker brousers cache and history and create new api key from openai site and it into the .env file.

and check errors and spelling mistake in your code. i solved this error by doilg all this.