v51

latestOpenAPI 3.1.0proprietaryraw.githubusercontent.com2026-07-21411711.1 MB

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.

post/v1/detokenize

Headers

X-Client-Namestring

The name of the project that is making the request.

Request body

tokensinteger[] required

The list of tokens to be detokenized.

modelstring required

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 required

A string representing the list of tokens.