---
title: "Detokenization"
method: POST
path: "/v1/detokenize"
tags: ["Container.Token"]
---

# Detokenization

`POST /v1/detokenize`

## Request

- Base URL: `http://localhost:8000`
- URL: `http://localhost:8000/v1/detokenize`
- Auth: none declared
- TypeScript: <https://skmtc.dev/friendli/apis/friendli-suite-api-reference/docs/v1/detokenize/post.ts> (a function with typed inputs; its response is checked against the schema)

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

## Request body

- ContainerDetokenizationBody
  - `model` string, nullable: Routes the request to a specific adapter.
  - `tokens` integer[], required: A token sequence to detokenize.

## Response `200`

Successfully detokenized the tokens.

- ContainerDetokenizationSuccess
  - `text` string, required: Detokenized text output.

## Other responses

- `422`: Unprocessable Entity

---

[API](https://skmtc.dev/friendli/apis/friendli-suite-api-reference.md) - [All operations](https://skmtc.dev/friendli/apis/friendli-suite-api-reference/llms.txt) - [OpenAPI document](https://skmtc.dev/friendli/apis/friendli-suite-api-reference/revisions/38fb43993a11?raw)
