google genai endpoints

Google Count Tokens

return {
    "totalTokens": 31,
    "totalBillableCharacters": 96,
    "promptTokensDetails": [
        {
        "modality": "TEXT",
        "tokenCount": 31
        }
    ]
}
post/v1beta/models/{model_name}:countTokens

Request

  • Base URL
    https://api.koboillm.com (the document declares no server; this is the origin it was published from)
  • URL
    https://api.koboillm.com/v1beta/models/{model_name}:countTokens
  • Auth
    • API key in header x-litellm-api-key
    • or API key in header x-litellm-api-key
    • or API key in header x-litellm-api-key
    • or API key in header x-litellm-api-key
    • or API key in header x-litellm-api-key
    • or API key in header x-litellm-api-key

Path parameters

model_namestring required

Response

Successful Response

totalTokensinteger required

Changes

No recorded changes to this operation across all 17 revisions of this API.