Authentication Issues with N8n and Google Veo 2 API

I’m facing a strange authentication issue while trying to use N8n for video creation via the Google Veo 2 API.

I’ve been at this for quite some time, and I’m stuck. My current setup works partially, but the final step is failing.

What works well:

  • Both API requests to Veo 2 succeed with 200 responses.
  • Google is charging me for these requests.
  • The Gemini API is activated in my GCP projects.

What’s going wrong:
When attempting to access the URL for the final video, I encounter a 403 error related to a GCP project not listed in my account. The error indicates that the Generative Language API isn’t activated for a project ID I cannot locate in my Google Cloud Console.

Error specifics:

{
  "error": {
    "code": 403,
    "message": "Generative Language API has not been used in project YYYYYYYYYY before or it is disabled. Enable it by visiting https://console.developers.google.com/apis/api/generativelanguage.googleapis.com/overview?project=YYYYYYYYYY then retry.",
    "status": "PERMISSION_DENIED",
    "details": [
      {
        "@type": "type.googleapis.com/google.rpc.ErrorInfo",
        "reason": "SERVICE_DISABLED",
        "domain": "googleapis.com",
        "metadata": {
          "activationUrl": "https://console.developers.google.com/apis/api/generativelanguage.googleapis.com/overview?project=YYYYYYYYYY",
          "service": "generativelanguage.googleapis.com",
          "consumer": "projects/YYYYYYYYYY"
        }
      }
    ]
  }
}

I only have two projects in Google Cloud, and both have the required APIs enabled. Has anyone else experienced this issue?

had this exact same probelm last month! the issue is probably that n8n is somehow switching project contexts between api calls.

check if your service account key has access to all the right apis in the same project. sometimes google creates shadow projects behind the scenes that mess things up.

try using oauth instead of api keys if possible - worked for me when nothing else did.

I encountered something similar when working with Google’s generative APIs through third-party tools. The project ID in your error message might be an internal Google project that gets created automatically during certain API interactions.

What solved it for me was regenerating my API key entirely rather than just checking permissions. Sometimes the key gets associated with the wrong project context during the initial setup process.

Also worth checking your authentication headers in N8n - make sure you’re consistently using the same project ID across all requests in your workflow. I noticed that mixing project contexts between the initial API calls and the final video retrieval can trigger this exact error.

Try creating a fresh API key from the project where your APIs are definitely enabled, then update your N8n credentials completely. The fact that you’re getting charged suggests the video generation is working, but the retrieval step is hitting a different project context somehow.