Detokenize

This endpoint takes tokens using byte-pair encoding and returns their text representation. To learn more about tokenization and byte pair encoding, see the tokens page.

Headers

AuthorizationstringRequired

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

X-Client-NamestringOptional
The name of the project that is making the request.

Request

This endpoint expects an object.
tokenslist of integersRequired
The list of tokens to be detokenized.
modelstringRequired
An optional parameter to provide the model name. This will ensure that the detokenization is done by the tokenizer used by that model.

Response

OK
textstring or null
A string representing the list of tokens.
metaobject or null

Errors