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
    • Start testing with double trial credits
    • Cloud credits to scale your IT product
    • Gateway to Russia
    • Cloud for Startups
    • Education and Science
    • Yandex Cloud Partner program
  • Blog
  • Pricing
  • Documentation
© 2025 Direct Cursus Technology L.L.C.
Yandex Foundation Models
    • Overview
    • API authentication
        • Overview
          • Overview
          • Classify
          • FewShotClassify
  • Yandex Cloud ML SDK
  • Compatibility with OpenAI
  • Access management
  • Pricing policy
  • Public materials
  • Release notes

In this article:

  • HTTP request
  • Body parameters
  • Response
  • ClassificationLabel
  1. API references
  2. Text Classification API
  3. REST
  4. TextClassification
  5. Classify

Foundation Models Text Classification API, REST: TextClassification.Classify

Written by
Yandex Cloud
Updated at April 24, 2025
  • HTTP request
  • Body parameters
  • Response
  • ClassificationLabel

RPC method to classify text with tuned model.

The names of the classes between which the model will be distributing requests
must be specified during model tuning and are not provided in the request.

HTTP requestHTTP request

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

Body parametersBody parameters

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

Request for the service to classify text with tuned model.

The names of the classes between which the model will be distributing requests must be specified during model tuning;
therefore, they are not provided in the request.

For examples of usage, see step-by-step guides.

Field

Description

modelUri

string

The URI of your tuned classifier model.

text

string

Text for classification.

ResponseResponse

HTTP Code: 200 - OK

{
  "predictions": [
    {
      "label": "string",
      "confidence": "string"
    }
  ],
  "modelVersion": "string",
  "inputTokens": "string"
}

Response with classifier predictions.

Field

Description

predictions[]

ClassificationLabel

The classification results with the `confidence`` values
for the probability of classifying the request text into each class.

modelVersion

string

The model version changes with each new releases.

inputTokens

string (int64)

Number of input tokens

ClassificationLabelClassificationLabel

A pair of text labels and their corresponding confidence values.

Field

Description

label

string

A class name label.

confidence

string

The probability of classifying text into a specific class.

Was the article helpful?

Previous
Overview
Next
FewShotClassify
© 2025 Direct Cursus Technology L.L.C.