'INVALID_PARAMETER_VALUE' error when creating a Google Vertex AI serving endpoint

Ensure the entire private key is used.

Written by vidya.sagamreddy

Last published at: April 7th, 2025

Problem

You are attempting to create a serving endpoint with the Google Vertex AI provider when you get a Failed to generate access token for Google VertexAI. error message.

{'error_code':'INVALID_PARAMETER_VALUE','message':'INVALID_PARAMETER_VALUE: Failed to generate access token for Google VertexAI. Please check the private key for the external model gemini-1-5-prop.'}

 

Cause

This can happen when you do not use the entire Google Vertex AI private key during the setup process on Databricks.

The private key is the entire JSON block that is required to connect to Google Vertex AI. The JSON block contains individual attributes called private_key and private_key_id. These attributes are only part of the private key. If you attempt to use these attributes as the private key instead of the entire JSON block, it generates an error.

 

Solution

Ensure you are using the entire private key. If it still does not work, generate a new private key and try again.

For more information on how to use the private key to configure the external model, review the Databricks Google Cloud Vertex AI configuration parameters (AWSAzureGCP) documentation.

 

Use the entire private key

  • Use the entire JSON block when configuring the connection.
  • This includes all attributes and not just the private_key attribute segment of the JSON structure.

 

Generate a new private key

If your private key does not work, you may need to generate a new one.

Follow the steps in the Google Cloud Create a service account key documentation to generate a new private key.