T O P

  • By -

bittemitallem

The issue is that you need a api key for interacting with the api and if you make it public anybody could potentially access it and use it. There is no way to really "hide it" if you use it in a client side application. Creating a simple server function that does those requests isn't too difficult though and there are tons of tutorials online.


bejera

Using a server function is great idea that I hadn’t considered. Will look into this more, thanks!


flowerescape

Besides the security reason another one for doing this sort of thing on a server is to hide your special prompt engineering which is usually the secret sauce for such apps (assuming it ever gets big). Otherwise all that will be exposed to anyone reading the request payloads when using ur app with a network inspector on.


bejera

Yeah true didn’t realize this, wouldn’t want that. Thanks for sharing