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 Vision OCR
  • Getting started
  • Access management
  • Pricing policy
  • Release notes
  • FAQ

In this article:

  • HTTP request
  • Body parameters
  • AnalyzeSpec
  • Feature
  • FeatureClassificationConfig
  • FeatureTextDetectionConfig
  • Response
  • AnalyzeResult
  • FeatureResult
  • TextAnnotation
  • Page
  • Block
  • Polygon
  • Vertex
  • Line
  • Word
  • DetectedLanguage
  • Entity
  • ClassAnnotation
  • Property
  • FaceAnnotation
  • Face
  • ImageCopySearchAnnotation
  • CopyMatch
  • Status

Vision API, REST: Vision.BatchAnalyze

Written by
Yandex Cloud
Updated at April 24, 2025
  • HTTP request
  • Body parameters
  • AnalyzeSpec
  • Feature
  • FeatureClassificationConfig
  • FeatureTextDetectionConfig
  • Response
  • AnalyzeResult
  • FeatureResult
  • TextAnnotation
  • Page
  • Block
  • Polygon
  • Vertex
  • Line
  • Word
  • DetectedLanguage
  • Entity
  • ClassAnnotation
  • Property
  • FaceAnnotation
  • Face
  • ImageCopySearchAnnotation
  • CopyMatch
  • Status

Analyzes a batch of images and returns results with annotations.

HTTP requestHTTP request

POST https://vision.api.cloud.yandex.net/vision/v1/batchAnalyze

Body parametersBody parameters

{
  "analyzeSpecs": [
    {
      // Includes only one of the fields `content`, `signature`
      "content": "string",
      "signature": "string",
      // end of the list of possible fields
      "features": [
        {
          "type": "string",
          // Includes only one of the fields `classificationConfig`, `textDetectionConfig`
          "classificationConfig": {
            "model": "string"
          },
          "textDetectionConfig": {
            "languageCodes": [
              "string"
            ],
            "model": "string"
          }
          // end of the list of possible fields
        }
      ],
      "mimeType": "string"
    }
  ],
  "folderId": "string"
}

Field

Description

analyzeSpecs[]

AnalyzeSpec

A list of specifications. Each specification contains the file to analyze and features to use for analysis.

Restrictions:

  • Supported file formats: JPEG, PNG.
  • Maximum file size: 1 MB.
  • Image size should not exceed 20M pixels (length x width).

folderId

string

ID of the folder to which you have access.

Required for authorization with a user account.

Don't specify this field if you make the request on behalf of a service account.

AnalyzeSpecAnalyzeSpec

Field

Description

content

string (bytes)

Image content, represented as a stream of bytes.
Note: As with all bytes fields, protobuffers use a pure binary representation, whereas JSON representations use base64.

Includes only one of the fields content, signature.

signature

string

Includes only one of the fields content, signature.

features[]

Feature

Requested features to use for analysis.

Max count of requested features for one file is 8.

mimeType

string

MIME type of content (for example, application/pdf).

FeatureFeature

Field

Description

type

enum (Type)

Type of requested feature.

  • TYPE_UNSPECIFIED
  • TEXT_DETECTION: Text detection (OCR) feature.
  • CLASSIFICATION: Classification feature.
  • FACE_DETECTION: Face detection feature.
  • IMAGE_COPY_SEARCH: Image copy search.

classificationConfig

FeatureClassificationConfig

Required for the CLASSIFICATION type. Specifies configuration for the classification feature.

Includes only one of the fields classificationConfig, textDetectionConfig.

textDetectionConfig

FeatureTextDetectionConfig

Required for the TEXT_DETECTION type. Specifies configuration for the text detection (OCR) feature.

Includes only one of the fields classificationConfig, textDetectionConfig.

FeatureClassificationConfigFeatureClassificationConfig

Field

Description

model

string

Model to use for image classification.

FeatureTextDetectionConfigFeatureTextDetectionConfig

Field

Description

languageCodes[]

string

List of the languages to recognize text.
Specified in ISO 639-1 format (for example, ru).

model

string

Model to use for text detection.
Possible values:

  • page (default): this model is suitable for detecting multiple text entries in an image.
  • line: this model is suitable for cropped images with one line of text.

ResponseResponse

HTTP Code: 200 - OK

{
  "results": [
    {
      "results": [
        {
          // Includes only one of the fields `textDetection`, `classification`, `faceDetection`, `imageCopySearch`
          "textDetection": {
            "pages": [
              {
                "width": "string",
                "height": "string",
                "blocks": [
                  {
                    "boundingBox": {
                      "vertices": [
                        {
                          "x": "string",
                          "y": "string"
                        }
                      ]
                    },
                    "lines": [
                      {
                        "boundingBox": {
                          "vertices": [
                            {
                              "x": "string",
                              "y": "string"
                            }
                          ]
                        },
                        "words": [
                          {
                            "boundingBox": {
                              "vertices": [
                                {
                                  "x": "string",
                                  "y": "string"
                                }
                              ]
                            },
                            "text": "string",
                            "confidence": "string",
                            "languages": [
                              {
                                "languageCode": "string",
                                "confidence": "string"
                              }
                            ],
                            "entityIndex": "string"
                          }
                        ],
                        "confidence": "string"
                      }
                    ]
                  }
                ],
                "entities": [
                  {
                    "name": "string",
                    "text": "string"
                  }
                ]
              }
            ]
          },
          "classification": {
            "properties": [
              {
                "name": "string",
                "probability": "string"
              }
            ]
          },
          "faceDetection": {
            "faces": [
              {
                "boundingBox": {
                  "vertices": [
                    {
                      "x": "string",
                      "y": "string"
                    }
                  ]
                }
              }
            ]
          },
          "imageCopySearch": {
            "copyCount": "string",
            "topResults": [
              {
                "imageUrl": "string",
                "pageUrl": "string",
                "title": "string",
                "description": "string"
              }
            ]
          },
          // end of the list of possible fields
          "error": {
            "code": "integer",
            "message": "string",
            "details": [
              "object"
            ]
          }
        }
      ],
      "error": {
        "code": "integer",
        "message": "string",
        "details": [
          "object"
        ]
      }
    }
  ]
}

Field

Description

results[]

AnalyzeResult

Request results.
Results have the same order as specifications in the request.

AnalyzeResultAnalyzeResult

Field

Description

results[]

FeatureResult

Results for each requested feature.
Feature results have the same order as in the request.

error

Status

The error result of the operation in case of failure or cancellation.

FeatureResultFeatureResult

Field

Description

textDetection

TextAnnotation

Text detection (OCR) result.

Includes only one of the fields textDetection, classification, faceDetection, imageCopySearch.

classification

ClassAnnotation

Classification result.

Includes only one of the fields textDetection, classification, faceDetection, imageCopySearch.

faceDetection

FaceAnnotation

Face detection result.

Includes only one of the fields textDetection, classification, faceDetection, imageCopySearch.

imageCopySearch

ImageCopySearchAnnotation

Image Copy Search result.

Includes only one of the fields textDetection, classification, faceDetection, imageCopySearch.

error

Status

The error result of the operation in case of failure or cancellation.

TextAnnotationTextAnnotation

Field

Description

pages[]

Page

Pages of the recognized file.

For JPEG and PNG files contains only 1 page.

PagePage

Field

Description

width

string (int64)

Page width in pixels.

height

string (int64)

Page height in pixels.

blocks[]

Block

Recognized text blocks in this page.

entities[]

Entity

Recognized entities

BlockBlock

Field

Description

boundingBox

Polygon

Area on the page where the text block is located.

lines[]

Line

Recognized lines in this block.

PolygonPolygon

Field

Description

vertices[]

Vertex

The bounding polygon vertices.

VertexVertex

Field

Description

x

string (int64)

X coordinate in pixels.

y

string (int64)

Y coordinate in pixels.

LineLine

Field

Description

boundingBox

Polygon

Area on the page where the line is located.

words[]

Word

Recognized words in this line.

confidence

string

Confidence of the OCR results for the line. Range [0, 1].

WordWord

Field

Description

boundingBox

Polygon

Area on the page where the word is located.

text

string

Recognized word value.

confidence

string

Confidence of the OCR results for the word. Range [0, 1].

languages[]

DetectedLanguage

A list of detected languages together with confidence.

entityIndex

string (int64)

Id of recognized word in entities array

DetectedLanguageDetectedLanguage

Field

Description

languageCode

string

Detected language code.

confidence

string

Confidence of detected language. Range [0, 1].

EntityEntity

Field

Description

name

string

Entity name

text

string

Recognized entity text

ClassAnnotationClassAnnotation

Field

Description

properties[]

Property

Properties extracted by a specified model.

For example, if you ask to evaluate the image quality,
the service could return such properties as good and bad.

PropertyProperty

Field

Description

name

string

Property name.

probability

string

Probability of the property, from 0 to 1.

FaceAnnotationFaceAnnotation

Field

Description

faces[]

Face

An array of detected faces for the specified image.

FaceFace

Field

Description

boundingBox

Polygon

Area on the image where the face is located.

ImageCopySearchAnnotationImageCopySearchAnnotation

Field

Description

copyCount

string (int64)

Number of image copies

topResults[]

CopyMatch

Top relevance result of image copy search

CopyMatchCopyMatch

Field

Description

imageUrl

string

url of image

pageUrl

string

url of page that contains image

title

string

page title that contains image

description

string

image description

StatusStatus

The error result of the operation in case of failure or cancellation.

Field

Description

code

integer (int32)

Error code. An enum value of google.rpc.Code.

message

string

An error message.

details[]

object

A list of messages that carry the error details.

Was the article helpful?

© 2025 Direct Cursus Technology L.L.C.