Yandex Cloud
Search
Contact UsGet started
  • Blog
  • Pricing
  • Documentation
  • All Services
  • System Status
    • Featured
    • Infrastructure & Network
    • Data Platform
    • Containers
    • Developer tools
    • Serverless
    • Security
    • Monitoring & Resources
    • ML & AI
    • Business tools
  • All Solutions
    • By industry
    • By use case
    • Economics and Pricing
    • Security
    • Technical Support
    • Customer Stories
    • Gateway to Russia
    • Cloud for Startups
    • Education and Science
  • Blog
  • Pricing
  • Documentation
Yandex project
© 2025 Yandex.Cloud LLC
Yandex Foundation Models
    • Overview
    • API authentication
        • Overview
          • Overview
          • Tokenize
          • TokenizeCompletion
  • Yandex Cloud ML SDK
  • Compatibility with OpenAI
  • Access management
  • Pricing policy
  • Public materials
  • Release notes

In this article:

  • HTTP request
  • Body parameters
  • Response
  • Token
  1. API references
  2. Text Generation API
  3. REST
  4. Tokenizer
  5. Tokenize

Foundation Models Text Generation API, REST: Tokenizer.Tokenize

Written by
Yandex Cloud
Updated at November 26, 2024
  • HTTP request
  • Body parameters
  • Response
  • Token

RPC method for tokenizing text.

HTTP requestHTTP request

POST https://llm.api.cloud.yandex.net/foundationModels/v1/tokenize

Body parametersBody parameters

{
  "modelUri": "string",
  "text": "string"
}

Request for the service to tokenize input text.

Field

Description

modelUri

string

The identifier of the model to be used for tokenization.

text

string

Text to be tokenized.

ResponseResponse

HTTP Code: 200 - OK

{
  "tokens": [
    {
      "id": "string",
      "text": "string",
      "special": "boolean"
    }
  ],
  "modelVersion": "string"
}

Response containing tokenized content from request.

Field

Description

tokens[]

Token

A list of tokens obtained from tokenization.

modelVersion

string

Model version (changes with model releases).

TokenToken

Represents a token, the basic unit of content, used by the foundation model.

Field

Description

id

string (int64)

An internal token identifier.

text

string

The textual representation of the token.

special

boolean

Indicates whether the token is special or not. Special tokens may define the model's behavior and are not visible to users.

Was the article helpful?

Previous
Overview
Next
TokenizeCompletion
Yandex project
© 2025 Yandex.Cloud LLC