Persistent 403 PERMISSION_DENIED Error with Node.js & Vertex AI on Render (Billing & IAM Role are Correct)

Hello everyone,

I’m developing an application and integrating AI features using Google’s Vertex AI (specifically the Gemini model). My setup involves a Node.js backend hosted on Render.

The backend deploys successfully, but when it tries to make a call to the Vertex AI API, it consistently fails with a 403 PERMISSION_DENIED error.

My Question:

What could still be causing a PERMISSION_DENIED error when the API, billing, and IAM role all seem to be correctly configured? Are there any less obvious project-level settings, API dependencies, or permissions I might be missing?

Any help would be greatly appreciated. Thank you!..Here is the core of my problem:

I’m trying to use the Vertex AI API to generate content.

I have already enabled the Vertex AI API in my Google Cloud project.

I have an active Billing Account linked to the project.

I’ve created a Service Account, granted it the “Vertex AI User” role, and I am using its JSON key for authentication on Render.

Despite all of this, I keep getting a “Permission denied on resource project…” error.

ALso I have tried using openai api, it is also not working

I have tried gemini api, same issue

only Groq is working and i don’t want to work with it, my app needs translationa nd groq is not good for it also , i need to send long text and Groq doesn’t support it

1 Like