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 Vision OCR
  • Getting started
  • Access management
  • Pricing policy
    • Authentication with the API
  • Release notes
  • FAQ
  1. API references
  2. Authentication with the API

Authentication with the Yandex Vision OCR API

Written by
Yandex Cloud
Updated at March 28, 2025

Get your account data for authentication:

Yandex or federated account
Service account
  1. Get an IAM token for your Yandex account or federated account.

  2. Get the ID of the folder for which your account has the ai.vision.user role or higher.

  3. When accessing Vision OCR via the API, provide the received parameters in each request:

    • For the Vision API and Classifier API:

      Specify the IAM token in the Authorization header as follows:

      Authorization: Bearer <IAM_token>
      

      Specify the folder ID in the request body in the folderId parameter.

    • For the OCR API:

      • Specify the IAM token in the Authorization header.
      • Specify the folder ID in the x-folder-id header.
      Authorization: Bearer <IAM_token>
      x-folder-id <folder_ID>
      

Vision OCR supports two authentication methods based on service accounts:

  • With an IAM token:

    1. Get an IAM token.

    2. Provide the IAM token in the Authorization header in the following format:

      Authorization: Bearer <IAM_token>
      
  • With API keys.

    Use API keys if requesting an IAM token automatically is not an option.

    1. Get an API key.

    2. Provide the API key in the Authorization header in the following format:

      Authorization: Api-Key <API_key>
      

Do not specify the folder ID in your requests, as the service uses the folder the service account was created in.

See alsoSee also

  • What roles are required for performing operations

Was the article helpful?

Previous
Pricing policy
Next
Overview
Yandex project
© 2025 Yandex.Cloud LLC