publishers

POST /v1/publishers/{publishersId}/models/{modelsId}:countTokens

Perform a token counting.

Request

  • Base URL
    https://aiplatform.googleapis.com
  • Auth
    OAuth 2 and OAuth 2
    Implicit: https://accounts.google.com/o/oauth2/auth
    Scopes: https://www.googleapis.com/auth/cloud-platform
    Authorization code: https://accounts.google.com/o/oauth2/auth
    Token URL: https://accounts.google.com/o/oauth2/token scopes: https://www.googleapis.com/auth/cloud-platform

Path parameters

publishersIdstring required
modelsIdstring required

Request body

modelstring

Optional. The name of the publisher model requested to serve the prediction. Format: projects/{project}/locations/{location}/publishers/*/models/*

Response

Successful response

totalBillableCharactersinteger

The total number of billable characters counted across all instances from the request.

totalTokensinteger

The total number of tokens counted across all instances from the request.

Changes

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