•   about 2 years ago

API call permission denied : nodejs

Hi,

I am referring node js code from https://cloud.google.com/vertex-ai/generative-ai/docs/start/quickstarts/quickstart-multimodal#gemini-beginner-samples-nodejs

and when I run it give me following error

{"error":{"code":403,"message":"Permission 'aiplatform.endpoints.predict' denied on resource '//aiplatform.googleapis.com/projects/xxx/locations/us-central1/publishers/google/models/gemini-1.0-pro-vision' (or it may not exist).","status":"PERMISSION_DENIED"

In vertex AI studio I have access to gemini-1.0-pro-vision and fro my reading I understand for node js I have to setup SA and provide access. My SA account has role of vertex ai admisnitrator.

But I still get the error.

Any help highly appreciated. Thank you.

Best,
Priti

Comments are closed.