Best Approach for Per-Customer Usage-Based Billing with Google Gemini API (Tracking and Billing Individual Customer Usage of Gemini API in a Multi-Tenant Application)

Hi,

We are a company planning to integrate the Gemini API into our application for hundreds of customers. We need to generate a separate usage-based invoice for each customer.

What would you recommend as the best approach?
For example:

Creating an API key per customer: Unfortunately, it seems Google does not support usage-based billing reports per key.

Creating a separate project for each customer: This is time-consuming.

Tracking used tokens and calculating the cost ourselves: This is complex and not very accurate.

Thank you!