Problem
Can’t find a way to authenticate through HTTP node to use an LLM from Google Cloud (Vertex AI)
I wanted to use Anthropic Claude 3 Haiku from GCP / Vertex AI due to usage limitations when using Claude directly from Anthropic (3 build tiers). As I have 6,5bn tokens to be processed fast, I cound’t wait.
I thought that I could achieve it using HTTP node - and indeed it is possible. I spent majority of the day trying to figure this out. As there is currently no Google Vertex AI node, and the LangChain nodes lack Vertex AI models. However, I couldn’t find, how I should authenticate with Vertex AI.
But great success - and if you are looking for a solution, here it is.
Solution
- Create Google Generic OAuth credentials as described here. For me, I actually had to add it directly from HTTP node, not through add credential, as there was no such option.
- in “Scopes” use this link
https://www.googleapis.com/auth/cloud-platform
- Build your base URL using this link
- In HTTP node, use Predefined Credential Type and chose Google OAuth2 API
n8n version: 1.45.1