> ## Documentation Index
> Fetch the complete documentation index at: https://friendli.ai/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Container Detokenization

> Convert token IDs back to text using Friendli Container. Decode tokenized model output into readable strings on your own infrastructure.

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


## OpenAPI

````yaml https://github.com/friendliai/friendli-openapi/raw/refs/heads/main/openapi.yaml post /v1/detokenize
openapi: 3.1.0
info:
  title: Friendli Suite API Reference
  description: This is an OpenAPI reference of Friendli Suite API.
  termsOfService: https://friendli.ai/terms-of-service
  contact:
    name: FriendliAI Support Team
    email: support@friendli.ai
  version: 0.1.0
servers:
  - url: https://api.friendli.ai
security: []
tags:
  - name: Serverless.Chat
  - name: Serverless.ToolAssistedChat
  - name: Serverless.Messages
  - name: Serverless.ChatRender
  - name: Serverless.Completions
  - name: Serverless.Token
  - name: Serverless.Audio
  - name: Serverless.Model
  - name: Serverless.Knowledge
  - name: Dedicated.Chat
  - name: Dedicated.Messages
  - name: Dedicated.ChatRender
  - name: Dedicated.Completions
  - name: Dedicated.Embeddings
  - name: Dedicated.TextClassification
  - name: Dedicated.Token
  - name: Dedicated.Image
  - name: Dedicated.Audio
  - name: Dedicated.Endpoint
  - name: Container.Chat
  - name: Container.Messages
  - name: Container.Completions
  - name: Container.TextClassification
  - name: Container.Token
  - name: Container.Image
  - name: Container.Audio
  - name: Cost
  - name: Dataset
  - name: File
paths:
  /v1/detokenize:
    servers:
      - url: http://localhost:8000
    post:
      tags:
        - Container.Token
      summary: Detokenization
      description: By giving a list of tokens, generate a detokenized output text string.
      operationId: containerDetokenization
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ContainerDetokenizationBody'
        required: true
      responses:
        '200':
          description: Successfully detokenized the tokens.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ContainerDetokenizationSuccess'
              examples:
                Example:
                  value:
                    text: What is generative AI?
        '422':
          description: Unprocessable Entity
components:
  schemas:
    ContainerDetokenizationBody:
      properties:
        model:
          anyOf:
            - type: string
            - type: 'null'
          title: Model
          description: Routes the request to a specific adapter.
          examples:
            - (adapter-route)
        tokens:
          items:
            type: integer
          type: array
          title: Tokens
          description: A token sequence to detokenize.
          examples:
            - - 128000
              - 3923
              - 374
              - 1803
              - 1413
              - 15592
              - 30
      type: object
      required:
        - tokens
      title: ContainerDetokenizationBody
      example:
        tokens:
          - 128000
          - 3923
          - 374
          - 1803
          - 1413
          - 15592
          - 30
    ContainerDetokenizationSuccess:
      properties:
        text:
          type: string
          title: Text
          description: Detokenized text output.
      type: object
      required:
        - text
      title: ContainerDetokenizationSuccess

````