google genai endpoints
Google Count Tokens
return {
"totalTokens": 31,
"totalBillableCharacters": 96,
"promptTokensDetails": [
{
"modality": "TEXT",
"tokenCount": 31
}
]
}
post/models/{model_name}:countTokens
Path parameters
model_namestring required
Response
Successful Response
Changes
Changed in 1 of the 42 revisions of this API.2
- ○
added the optional property
//to the response with the statusresponse-optional-property-added
- ○
added the optional property
//to the response with the statusresponse-optional-property-added
This revision also has 5 changes that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog
- ○