Hello,
We use the Gemini Developer API’s Interactions API for multiple users within one Google Cloud project. Our application records the user and analysis run associated with each request, along with the returned usage data.
We would like to associate these records with the actual charges reported by Google. We have checked Cloud Billing export to BigQuery, but have not found a way to link the billed amounts to individual users or analysis runs. We are also open to other supported reporting methods.
Before posting, we reviewed:
- This earlier per-customer billing discussion, which recommends application-side usage tracking. We already maintain those records; our remaining question is how to connect them to Google’s actual charges.
- python-genai issue #2296, concerning billing-label support for
GenerateContentConfig. Since we use Interactions, we are unsure whether the same limitations apply.
We also tried attaching custom user and run labels to requests. The requests succeeded, and we verified that the labels were present in the outgoing request bodies, but we could not find them in the billing export. We have not found documentation stating that these labels should appear in billing data, so we are not assuming this is a defect.
Could you please advise whether there is a supported way to attribute actual charges to users or analysis runs within a shared Developer API project? If so, we would appreciate the relevant documentation or an example workflow. If not, could you please clarify what billing granularity is available?
We would prefer to continue using the Developer API with a shared project.
Thank you for your time and guidance.