Skip to main content
POST
/
dedicated
/
v1
/
detokenize
Detokenization
curl --request POST \
  --url https://api.friendli.ai/dedicated/v1/detokenize \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "model": "(endpoint-id)",
  "tokens": [
    128000,
    3923,
    374,
    1803,
    1413,
    15592,
    30
  ]
}'
{
  "text": "What is generative AI?"
}
By giving a list of tokens, generate a detokenized output text string. To request successfully, it is mandatory to enter a Friendli Token (e.g. flp_XXX) value in the Bearer Token field. Refer to the authentication section on our introduction page to learn how to acquire this variable and visit here to generate your token.

Authorizations

Authorization
string
header
required

Headers

X-Friendli-Team
string | null

Body

application/json
model
string
required
Examples:
tokens
integer[]
required
Examples:

Response

text
string
required