GET

/v1/schemas/gemini/chat/v1beta/models/{modelsId}:countTextTokens

kind inputactivity chathash 0ed4ff4e…extracted Jul 6, 2026version currentsource upstream spec ↗
fieldrecorded source
schemaSource linked above.
Source trace
f697c69526f2d0f93e6e022d34a6a98146776f0f982cc56727132c048329221c
{
  "fetchedAt": 1783328683,
  "extractorVersion": "1",
  "verifiedAt": null
}

Request body

1 properties · 0 required · 1 $defs
propertytypedescriptionconstraints
promptTextPromptText given to the model as a prompt. The Model will use this TextPrompt to Generate a text completion.

Types

1 $defs

TextPromptobject

Text given to the model as a prompt. The Model will use this TextPrompt to Generate a text completion.

textstringRequired. The prompt text.

Validate a payload

before you spend tokens
shell
$ curl -X POST https://modelschemas.com/v1/validate \
    -d '{"provider":"gemini","endpointId":"v1beta/models/{modelsId}:countTextTokens","payload":{…}}'
→ {"valid": false, "errors": [{"path": "#", "keyword": "required", …}]}