Dedicated.Token

Detokenization

By giving a list of tokens, generate a detokenized output text string.

post/dedicated/v1/detokenize

Request

Headers

X-Friendli-Teamstring nullable

ID of team to run requests as (optional parameter).

Request body

modelstring required

ID of target endpoint. If you want to send request to specific adapter, use the format "YOUR_ENDPOINT_ID:YOUR_ADAPTER_ROUTE". Otherwise, you can just use "YOUR_ENDPOINT_ID" alone.

tokensinteger[] required

A token sequence to detokenize.

Example request

{
  "model": "(endpoint-id)",
  "tokens": [
    128000,
    3923,
    374,
    1803,
    1413,
    15592,
    30
  ]
}

Response

Successfully detokenized the tokens.

textstring required

Detokenized text output.

Changes

No recorded changes to this operation across all 1 revision of this API.