How to connect Vertex AI with HTTP node

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

  1. 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.
  2. in “Scopes” use this link https://www.googleapis.com/auth/cloud-platform
  3. Build your base URL using this link
  4. In HTTP node, use Predefined Credential Type and chose Google OAuth2 API

n8n version: 1.45.1

3 Likes

It looks like your topic is missing some important information. Could you provide the following if applicable.

  • n8n version:
  • Database (default: SQLite):
  • n8n EXECUTIONS_PROCESS setting (default: own, main):
  • Running n8n via (Docker, npm, n8n cloud, desktop app):
  • Operating system:

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.