TTS Models and Publishing in GAIS via Cloud Run

I am working on a learning lab building a 20 Questions game with TTS and typewriter like visual response. I worked great in GAIS and understand the code (less the issue i have with the exposure of the API key). I’ve successfully worked in TTS 3.1 preview and 2.5 preview no problem. I have also switched between google AI plan and pay-per-use key in the studio, no problems.

When i deploy via publish / google cloud, i see there is some magic with a service worker and proxy so the key isn’t exposed. My calls to flash are working great, but any call to any TTS is coming back forbidden 403. i can make manual calls successfully in console to flash, but not to TTS.

Since the build does some unique things in the background that are not transparent, i am at odds.

About to just export it to git and rewrite it with server side to try that.

TIA

1 Like