Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

Error: Vertex AI API Error (400)

{ [Error: Vertex AI API Error (400): Project `XXXXXXXXXXX` is not allowed to use Publisher Model `projects/XXXXXXXXXXXX/locations/us-central1/publishers/google/models/gemini-1.0-pro`] details: '{\n "error": {\n "code": 400,\n "message": "Project `XXXXXXXXXXX` is not allowed to use Publisher Model `projects/nXXXXXXXXXXX/locations/us-central1/publishers/google/models/gemini-1.0-pro`",\n "status": "FAILED_PRECONDITION"\n }\n}\n' }

What is the solution to this error?
I have checked the settings around the payment and the data usage, but I am still having trouble finding the cause.

Solved Solved
0 1 114
1 ACCEPTED SOLUTION

Hi Taichi_Ikegami,

Welcome to the Google Cloud Community!

The error you encountered typically occurs when your project lacks the required permissions or access rights to utilize the specified publisher model in Vertex AI. Here are a few approaches you can try to resolve it:

  • Ensure that the Vertex AI API is enabled for your project. You can check in the Google Cloud Console by searching for “Vertex AI” and  confirming that it’s active.
  • Not all models are automatically available to every project. You may need to manually enable access to the Gemini 1.0 Pro model. Additionally, you might be required to "Accept Terms" or explicitly grant your project access to the model.
  • The error message indicates that the model is located in the us-central1 region. Make sure your Vertex AI setup and the code you're using are configured to use resources in the us-central1 region, as location mismatches can sometimes lead to access issues.
  • It's possible that the service account or user credentials your application is using don't have the necessary permissions to access the model. Ensure that the relevant identity has the Vertex AI User role or a custom role that grants permission to use this specific publisher model.
  • Although you've checked the payment, it's a good idea to double-check that your billing account is active and properly linked to the project. An inactive or suspended billing account can lead to issues with accessing cloud services.

Additionally, you can refer to this documentation for more details on enabling models in Vertex AI. Please note that, according to the documentation, Gemini 1.0 Pro will be available only until April 21, 2025. We recommend migrating to Gemini 2.0 Flash before this date to ensure continued access to these features.

Was this helpful? If so, please accept this answer as “Solution”. If you need additional assistance, reply here within 2 business days and I’ll be happy to help.

View solution in original post

1 REPLY 1

Hi Taichi_Ikegami,

Welcome to the Google Cloud Community!

The error you encountered typically occurs when your project lacks the required permissions or access rights to utilize the specified publisher model in Vertex AI. Here are a few approaches you can try to resolve it:

  • Ensure that the Vertex AI API is enabled for your project. You can check in the Google Cloud Console by searching for “Vertex AI” and  confirming that it’s active.
  • Not all models are automatically available to every project. You may need to manually enable access to the Gemini 1.0 Pro model. Additionally, you might be required to "Accept Terms" or explicitly grant your project access to the model.
  • The error message indicates that the model is located in the us-central1 region. Make sure your Vertex AI setup and the code you're using are configured to use resources in the us-central1 region, as location mismatches can sometimes lead to access issues.
  • It's possible that the service account or user credentials your application is using don't have the necessary permissions to access the model. Ensure that the relevant identity has the Vertex AI User role or a custom role that grants permission to use this specific publisher model.
  • Although you've checked the payment, it's a good idea to double-check that your billing account is active and properly linked to the project. An inactive or suspended billing account can lead to issues with accessing cloud services.

Additionally, you can refer to this documentation for more details on enabling models in Vertex AI. Please note that, according to the documentation, Gemini 1.0 Pro will be available only until April 21, 2025. We recommend migrating to Gemini 2.0 Flash before this date to ensure continued access to these features.

Was this helpful? If so, please accept this answer as “Solution”. If you need additional assistance, reply here within 2 business days and I’ll be happy to help.