Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

Integrating Gemini API in our SAAS platform

We are building a Gen-AI first learning, hybrid training and assessment platform. We would like to integrate Gemini API in our application to help our customers leverage its features. But the entire process is very confusing.

I am looking for information on quotas, usage tracking, cost, budgets, limits.  What guard-rails do we need to implement to check how clients use it in our application?  Are there any consents that we need to get signed from customers?

Can someone please help?

0 1 363
1 REPLY 1

Hi @mevnai,

Welcome to Google Cloud Community!

To securely integrate the Gemini API into a SaaS platform, never expose the API key in the frontend. Instead, use a backend server as a proxy. The backend securely stores the API key, receives requests from the frontend, makes calls to the Gemini API, and returns the results. This protects the API key while allowing for custom logic, rate limiting, and data transformation. An example using Python/Flask was provided to illustrate the backend proxy approach.

Here are some helpful links:

Was this helpful? If so, please accept this answer as “Solution”. If you need additional assistance, reply here within 2 business days and I’ll be happy to help.