We need clarification for Gemini Developer API v1beta, model gemini-embedding-001.
Our embedding request uses:
POST /v1beta/models/gemini-embedding-001:embedContent
{“content”:{“role”:“user”,“parts”:[{“text”:T}]}}
It omits taskType, title, outputDimensionality and truncation options.
We are considering counting the identical text and Content first:
POST /v1beta/models/gemini-embedding-001:countTokens
{“contents”:[{“role”:“user”,“parts”:[{“text”:T}]}]}
Could the Google team clarify:
-
Is countTokens supported for this exact model and request shape?
-
Does totalTokens count the complete input without clipping, and equal or safely upper-bound the input-token measure used by embedContent? Does any role or request-framing overhead affect this relationship?
-
If that count is at most 2,048, is the complete text processed without truncation when truncation options are omitted?
-
What happens above the 2,048-token limit—rejection or truncation—and is any truncation explicitly reported in the response?
-
What current pricing and quota rules apply to counting and direct gemini-embedding-001 embedding, including rejected requests? Does the billing FAQ’s statement that “GetTokens” is free and outside inference quota apply to this REST countTokens method?
Please provide an authoritative documentation reference or a model-specific clarification. We can supply synthetic examples; no customer data is needed.