Hello,
I am investigating a model-specific countTokens failure in a Gemini API project whose Free tier was confirmed in Google AI Studio before testing.
Environment:
- Direct REST API, v1beta
- Windows / Node.js
- The same API key and project were used for all comparisons.
Observed results:
- models.get for gemini-2.5-flash-lite returned HTTP 200 and advertised countTokens among its supported methods.
- gemini-2.5-flash-lite countTokens with minimal top-level contents returned HTTP 404, with error status NOT_FOUND.
- The same model’s countTokens using generateContentRequest, without a system instruction, also returned HTTP 404 / NOT_FOUND.
- As a control, gemini-3.1-flash-lite countTokens with the same minimal contents returned HTTP 200 and totalTokens: 3.
The minimal user text was “안녕하세요.” The three countTokens comparisons occurred on October 10, 2026, between 11:54:23 and 11:54:24 UTC.
No generateContent, streaming, or image generation requests were made during these diagnostics. No billing settings or application model mappings were changed.
Could you please clarify:
- Whether legacy Gemini 2.5 eligibility or model-specific access restrictions can cause this result.
- Whether this is specifically a Free-tier restriction, an API routing issue, or a service issue.
- Whether countTokens for this exact model requires a different documented API version or request structure.
- Whether access can be restored while preserving the Free tier and the existing model mapping.
I can provide the project ID through an appropriate non-public Google support channel if needed. This post intentionally excludes API keys, authentication headers, and private conversation data.
Thank you.