Setup
First, you should create service account with theai.languageModels.user role.
Next, you have two authentication options:
- IAM token.
You can specify the token in a constructor parameter
iam_tokenor in an environment variableYC_IAM_TOKEN. - API key
You can specify the key in a constructor parameter
api_keyor in an environment variableYC_API_KEY.
Usage
npm
Related
Connect these docs programmatically to Claude, VSCode, and more via MCP for real-time answers.