Skip to main content
LangChain.js supports calling YandexGPT chat models.

Setup

First, you should create a service account with the ai.languageModels.user role. Next, you have two authentication options:
  • IAM token. You can specify the token in a constructor parameter as iam_token or in an environment variable YC_IAM_TOKEN.
  • API key You can specify the key in a constructor parameter as api_key or in an environment variable YC_API_KEY.

Usage

npm

Connect these docs programmatically to Claude, VSCode, and more via MCP for real-time answers.