Yandex Cloud
Search
Contact UsTry it for free
  • Customer Stories
  • Documentation
  • Blog
  • All Services
  • System Status
  • Marketplace
    • Featured
    • Infrastructure & Network
    • Data Platform
    • AI for business
    • Security
    • DevOps tools
    • Serverless
    • Monitoring & Resources
  • All Solutions
    • By industry
    • By use case
    • Economics and Pricing
    • Security
    • Technical Support
    • Start testing with double trial credits
    • Cloud credits to scale your IT product
    • Gateway to Russia
    • Cloud for Startups
    • Center for Technologies and Society
    • Yandex Cloud Partner program
    • Price calculator
    • Pricing plans
  • Customer Stories
  • Documentation
  • Blog
© 2026 Direct Cursus Technology L.L.C.
Yandex AI Studio
  • About Yandex AI Studio
  • Getting started with Model Gallery
  • Yandex Workflows
  • Switching from the AI Assistant API to Responses API
  • Compatibility with OpenAI
    • About Yandex Cloud ML SDK
      • Overview
      • Authentication
      • Request retries
  • Quotas and limits
  • Pricing policy
  • Access management
  • Audit Trails events
  • Public materials
  • Release notes
  • Terms and definitions

In this article:

  • Authentication methods classes
  • class yandex_ai_studio_sdk.auth.APIKeyAuth
  • class yandex_ai_studio_sdk.auth.EnvIAMTokenAuth
  • class yandex_ai_studio_sdk.auth.IAMTokenAuth
  • class yandex_ai_studio_sdk.auth.MetadataAuth
  • class yandex_ai_studio_sdk.auth.NoAuth
  • class yandex_ai_studio_sdk.auth.OAuthTokenAuth
  • class yandex_ai_studio_sdk.auth.YandexCloudCLIAuth
  1. Yandex Cloud ML SDK
  2. SDK reference
  3. Authentication

Authentication

Written by
Yandex Cloud
Updated at January 28, 2026
  • Authentication methods classes
    • class yandex_ai_studio_sdk.auth.APIKeyAuth
    • class yandex_ai_studio_sdk.auth.EnvIAMTokenAuth
    • class yandex_ai_studio_sdk.auth.IAMTokenAuth
    • class yandex_ai_studio_sdk.auth.MetadataAuth
    • class yandex_ai_studio_sdk.auth.NoAuth
    • class yandex_ai_studio_sdk.auth.OAuthTokenAuth
    • class yandex_ai_studio_sdk.auth.YandexCloudCLIAuth

Here must be algorithm about how auto-authorization works

And here – how SDK will work if you pass a string to SDK auth param

Authentication methods classesAuthentication methods classes

class yandexaistudiosdk.auth.APIKeyAuthclass yandex_ai_studio_sdk.auth.APIKeyAuth

Authentication method using an API key.

Read more about the API key in the IAM documentation.

class yandexaistudiosdk.auth.EnvIAMTokenAuthclass yandex_ai_studio_sdk.auth.EnvIAMTokenAuth

Auth method, which takes IAM token from environment variable for every request.

It is assumed that the token will be refreshed in the environment before it expires.

However, by default, the YC_TOKEN environment variable is used when auto-selecting the auth method, in order to be compatible with a Yandex DataSphere environment. Therefore, it is not recommended to use this environment variable when setting up a personal work environment.

class yandexaistudiosdk.auth.IAMTokenAuthclass yandex_ai_studio_sdk.auth.IAMTokenAuth

Authentication method using an IAM token.

Read more about the IAM token in the AIM documentation.

class yandexaistudiosdk.auth.MetadataAuthclass yandex_ai_studio_sdk.auth.MetadataAuth

Authentication class for retrieving IAM tokens from metadata service.

This class retrieves IAM tokens from the Google Cloud metadata service. Read more in the VM metadata documentation.

class yandexaistudiosdk.auth.NoAuthclass yandex_ai_studio_sdk.auth.NoAuth

class yandexaistudiosdk.auth.OAuthTokenAuthclass yandex_ai_studio_sdk.auth.OAuthTokenAuth

Auth method that uses an OAuth token for authentication.

This class extends the RefresheableIAMTokenAuth to provide functionality for managing and using an OAuth token for authentication purposes.

Read more about the OAuth token in the corresponding documentation.

class yandexaistudiosdk.auth.YandexCloudCLIAuthclass yandex_ai_studio_sdk.auth.YandexCloudCLIAuth

Authentication class for Yandex Cloud CLI using IAM tokens.

It handles the initialization and retrieval of IAM tokens via the Yandex Cloud CLI that should be installed and configured.

Yandex Cloud CLI is a downloadable software for managing cloud resources via the command line. Read more in the CLI documentation.

Was the article helpful?

Previous
SpheechKit domain
Next
Overview
© 2026 Direct Cursus Technology L.L.C.