Private API failure. No idea what I am doing wrong

Resolved

Hi all

New to this all, was playing with a tutorial that uses open ai API. I got the code from tutorial working but obviously looks like the API keys are being sent in the open. So I tried to make the API private. Had to go and first make firebase switched to pay as you go version. Then finally I was able to make the APIs private and press deploy button. The tutorial is web based so published to web and all the APIs are broken seemly some CORS error. Using chrome inspector, seems like something is not hapy some where. I tried to look into firebase but no idea what I am doing there.
So I am back here, hopefully someone can shed a light on what I did wrong.

Thanks

9 replies