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

SyntaxError: Unexpected token 'I', "Incorrect "... is not valid JSON #44

Open Asifp6021 opened 1 year ago

Asifp6021 commented 1 year ago

can anyone tell me what this eerror is about. i have been solving since 12 hours yet have'nt find solution.

shukabum commented 1 year ago

change the api key at openai , use the new openai api key , it will work

harshjain22 commented 1 year ago

can anyone tell me what this eerror is about. i have been solving since 12 hours yet have'nt find solution.

Have you found this solution ? if yes , please share

thisissuman commented 1 year ago

can anyone tell me what this eerror is about. i have been solving since 12 hours yet have'nt find solution.

Have you found this solution ? if yes , please share

Hii,

If you are still getting the error(and in the Developer tool > Network tab > Preview if you are getting Invalid API key 401 error), then Just clear your cache and cookies(I repeat both cache and cookies) of your browser, restart your server and client. If you have generated multiple API key, then just delete the rest and use only one. if you have used the api key in some other project before then take that API key and delete the rest. It will surly work...

harshjain22 commented 1 year ago

can anyone tell me what this eerror is about. i have been solving since 12 hours yet have'nt find solution.

Have you found this solution ? if yes , please share

Hii,

If you are still getting the error(and in the Developer tool > Network tab > Preview if you are getting Invalid API key 401 error), then Just clear your cache and cookies(I repeat both cache and cookies) of your browser, restart your server and client. If you have generated multiple API key, then just delete the rest and use only one. if you have used the api key in some other project before then take that API key and delete the rest. It will surly work...

Thank you for the help, it really means a lot, but my issue was solved (it was an error in the .env file when I hardcoded the API it worked)