Count content tokens POST /v1beta/models/{model}:countTokens
Counts tokens for Gemini contents using the model in the URL.
Parameters / Responses
Parameters: contents, conversation_id, generationConfig, model, safetySettings, session_id, systemInstruction, tools
Responses: 2XX application/json
Loading API reference…