project_ai_mern_image_generation
project_ai_mern_image_generation copied to clipboard
when i generate image this error occured again and again
SyntaxError: Unexpected token 'B', "Billing ha"... is not valid JSON
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:
- OpenAI API key
- Cloudinary Keys
- 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!
@TidbitsJS But I use my own API key
https://github.com/adrianhajdin/project_ai_mern_image_generation/issues/7#issuecomment-1405139867
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.
i am also facing these same error, i used my own api key only
same error here, used personal api
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.