Tokenize

Generates tokens for a string using a model's tokenizer.

Authentication

AuthorizationBearer

Bearer authentication of the form Bearer <token>, where token is your auth token.

Request

This endpoint expects an object.
modelstringRequired
The name of the model to use for tokenization.
inputstringRequired
The text to tokenize.

Response

Successful response.
idstringOptional
Unique ID for the token.
objectstringOptional

Type of object (tokens).

createdintegerOptional
Timestamp of when the tokens were generated.
modelstringOptional
The name of the model used.
tokenslist of objectsOptional
An array of token data.

Errors

400
Bad Request Error
403
Forbidden Error