GET
/v1/schemas/grok/chat/v1/tokenize-text?kind=output
Accept:
| field | recorded source |
|---|---|
| schema | Source linked above.Source trace8fef3a30eaf49596c4dfe70d5f01b85fc4063b25b5873e93874479ef8087f379{
"fetchedAt": 1783328713,
"extractorVersion": "1",
"verifiedAt": null
} |
Response body
1 properties · 1 required · 1 $defs| property | type | description | constraints |
|---|---|---|---|
| token_ids* | TokenizeResponseToken[] | A list of tokens. |
Types
1 $defsTokenizeResponseTokenobject
| string_token* | string | The string of the token. | |
| token_bytes* | integer[] | The bytes that constituted the token. | |
| token_id* | integer | The integer representation of the token for the model. | n ≥ 0 · format: int32 |
Validate a payload
before you spend tokensshell
$ curl -X POST https://modelschemas.com/v1/validate \
-d '{"provider":"grok","endpointId":"v1/tokenize-text","payload":{…}}'
→ {"valid": false, "errors": [{"path": "#", "keyword": "required", …}]}