If you are calling API with jQuery or JavaScript then the API keys will be threre on the page source. This is very risky so prefer server side calling of API. I am provideing some links to you:
- Consuming a Web API in ASP.NET Core MVC with C#
- Consuming a Web API in jQuery
- Consuming a Web API in JavaScript
Last but not the least Blazor WebAssemble will be the best as a front end technology for calling web apis - Blazor WebAssembly : Call Web APIs to perform CRUD Operations