Authentication in the Python SDK SpeechKit
Written by
Updated at August 25, 2023
SpeechKit supports authentication with an API key and IAM token. To get authenticated, use one of the snippets below.
Authentication with an API key
from speechkit import configure_credentials, creds
configure_credentials(
yandex_credentials=creds.YandexCredentials(
api_key='<API key>'
)
)
Where api_key
is the service account's API key. You can learn how to create a key here.
Authentication with an IAM token
from speechkit import configure_credentials, creds
configure_credentials(
yandex_credentials=creds.YandexCredentials(
iam_token='<IAM token>'
)
)
Where iam_token
is the service account's IAM token. You can learn how to create a token here.