Documentation IndexFetch the complete documentation index at: /docs/llms.txtUse this file to discover all available pages before exploring further.
Fetch the complete documentation index at: /docs/llms.txt
Use this file to discover all available pages before exploring further.
Try Z.ai's GLM-5.2 model today. To learn more, see the FriendliAI Blog.
cURL
curl --request POST \ --url http://localhost:8000/v1/detokenize \ --header 'Content-Type: application/json' \ --data ' { "tokens": [ 128000, 3923, 374, 1803, 1413, 15592, 30 ] } '
import requestsurl = "http://localhost:8000/v1/detokenize"payload = { "tokens": [128000, 3923, 374, 1803, 1413, 15592, 30] }headers = {"Content-Type": "application/json"}response = requests.post(url, json=payload, headers=headers)print(response.text)
const options = { method: 'POST', headers: {'Content-Type': 'application/json'}, body: JSON.stringify({tokens: [128000, 3923, 374, 1803, 1413, 15592, 30]})};fetch('http://localhost:8000/v1/detokenize', options) .then(res => res.json()) .then(res => console.log(res)) .catch(err => console.error(err));
package mainimport ( "fmt" "strings" "net/http" "io")func main() { url := "http://localhost:8000/v1/detokenize" payload := strings.NewReader("{\n \"tokens\": [\n 128000,\n 3923,\n 374,\n 1803,\n 1413,\n 15592,\n 30\n ]\n}") req, _ := http.NewRequest("POST", url, payload) req.Header.Add("Content-Type", "application/json") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(string(body))}
{ "text": "What is generative AI?" }
Convert a list of token IDs back into text.
A token sequence to detokenize.
[128000, 3923, 374, 1803, 1413, 15592, 30]
Routes the request to a specific adapter.
"(adapter-route)"
Successfully detokenized the tokens.
Detokenized text output.
Contact support