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

# Serverless Detokenize

> Convert token ids back to text with the verified Tensormesh Serverless host.

Use this page when you want to turn token ids back into text for a specific serverless model.

* Auth: `Authorization: Bearer <API_KEY>`
* Host: `https://serverless.tensormesh.ai`
* Model: pass a serverless model name in the JSON request body


## OpenAPI

````yaml api-reference/serverless.openapi.yaml POST /detokenize
openapi: 3.1.0
info:
  title: Tensormesh Serverless Inference API
  version: 1.0.0
  description: |-
    OpenAI-compatible chat completions endpoint plus verified vLLM-compatible
    `/v1/models`, `/v1/completions`, `/v1/responses`, `/tokenize`,
    `/detokenize`, `/health`, and `/version` endpoints exposed through
    Tensormesh Serverless.

    Authentication: `Authorization: Bearer <API_KEY>` for `POST`
    inference requests. The public serverless host also serves
    `GET /v1/models`, `GET /health`, and `GET /version` without auth.

    If you have Control Plane access for the same Tensormesh environment,
    discover published serverless models with
    `tm billing pricing serverless list` and use the returned
    `pricing[].model` value in requests. If you are targeting a different
    serverless host override, or you only have inference credentials, get the
    model name from your Tensormesh environment before sending requests.
servers:
  - url: https://serverless.tensormesh.ai
    description: Tensormesh Serverless
security:
  - BearerAuth: []
tags:
  - name: inference.openapi_Inference
    x-displayName: Inference
paths:
  /detokenize:
    post:
      tags:
        - inference.openapi_Inference
      summary: Detokenize Tokens
      description: >-
        Convert token ids back to text with the verified Serverless inference
        host.
      operationId: create_serverless_detokenize_post
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DetokenizeRequest'
            example:
              model: openai/gpt-oss-20b
              tokens:
                - 15496
                - 0
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DetokenizeResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OpenAIErrorResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OpenAIErrorResponse'
components:
  schemas:
    DetokenizeRequest:
      type: object
      title: DetokenizeRequest
      additionalProperties: true
      required:
        - model
        - tokens
      properties:
        model:
          type: string
          description: Serverless model name to use.
          example: openai/gpt-oss-20b
        tokens:
          type: array
          items:
            type: integer
    DetokenizeResponse:
      type: object
      title: DetokenizeResponse
      additionalProperties: true
      properties:
        prompt:
          type: string
          example: Hello!
    OpenAIErrorResponse:
      type: object
      title: OpenAIErrorResponse
      additionalProperties: true
      properties:
        error:
          anyOf:
            - $ref: '#/components/schemas/OpenAIError'
            - type: string
            - type: 'null'
          description: Error message (string) or structured error object.
    OpenAIError:
      type: object
      title: OpenAIError
      additionalProperties: true
      properties:
        message:
          anyOf:
            - type: string
            - type: 'null'
          title: Message
        type:
          anyOf:
            - type: string
            - type: 'null'
          title: Type
        param:
          anyOf:
            - type: string
            - type: 'null'
          title: Param
        code:
          anyOf:
            - type: string
            - type: integer
            - type: 'null'
          title: Code
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API_KEY
      description: >-
        Bearer authentication using your serverless API key. Format: Bearer
        <API_KEY>

````