Hi,
I am currently running the Gemini API on Vertex AI. I would like to monitor the API usage, specifically the number of tokens used over a specific time period or on a daily basis. While I understand that the billing reflects usage in terms of cost, how can I track it in terms of token consumption?
Thank you!
Hello,
try logging token counts for each request within your app, then use Cloud Logging or BigQuery to view daily or periodic usage. Alternatively, check Usage Reports or Cloud Monitoring for any token-based metrics available.
Hope it helps
Hi @hilmanarc.,
Welcome to Google Cloud Community!
To track token consumption for your Gemini API on Vertex AI, you can use these methods:
To ensure cost-effectiveness, remember to regularly monitor your usage, select the appropriate Gemini model for your requirements, and optimize your prompts.
I hope the above information is helpful.
How do I do this and guarantee I get the same answer as Google for billing purposes? Other LLM providers will return a 'usage' key with exact token counts.
User | Count |
---|---|
2 | |
2 | |
1 | |
1 | |
1 |