Hi,
I’m using Gemini File Search and trying to understand the token usage (cost) during indexing.
What I want to know specifically is:
- Token usage per document at indexing time
- Or token usage per generated chunk
- Or any usage / billing-related metadata returned by the API
So far, I’ve checked:
- uploadToFileSearchStore (raw REST API response, including resumable upload)
- Operations.get response
- fileSearchStores.documents.get response
- grounding_metadata during generateContent
But I couldn’t find:
- Chunk contents created during indexing
- Token count per chunk
- Total tokens consumed when uploading a document
From the API docs, it looks like these details are not exposed, but I want to confirm:
Is there currently any supported way (API, metadata, or header) to get token usage per document for File Search indexing?
If not, is the intended approach to rely only on Cloud Billing / Usage reports?
Thanks in advance.