Detokenize

POST

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

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

This endpoint returns an object.
textstring

A string representing the list of tokens.

metaobjectOptional