Stay organized with collections
Save and categorize content based on your preferences.
This page provides answers to frequently asked questions (FAQs) about the
Gemini API and the Vertex AI in Firebase SDKs. For additional questions,
check out the
Gemini API FAQ
in the Google Cloud documentation.
Which APIs must be enabled to use the Vertex AI in Firebase SDKs? And how do I enable them?
To use the Vertex AI in Firebase SDKs, your project must have the
following two APIs enabled:
Click the Vertex AI in Firebase card to launch a workflow that enables
the two APIs. This workflow will also add the
Vertex AI in Firebase API to your Firebase API key's allowlist.
Alternatively, you can use the Google Cloud console (more manual option):
Click each API link at the top of this FAQ entry, and then click Enable
in each API's page.
Add the Vertex AI in Firebase API to your Firebase API key's
allowlist by following the instructions in
Add API restrictions
in the Google Cloud documentation.
Which permissions are required to use the Vertex AI in Firebase SDKs?
Action
Required IAM permissions
IAM role(s) that include required permissions by default
Upgrade billing to pay-as-you-go (Blaze) pricing plan
Which models can be used with the Vertex AI in Firebase SDKs?
You can use the Vertex AI in Firebase SDKs with any of the Gemini
foundation models listed in
Learn about the Gemini models.
You cannot use non-foundation Gemini models like PaLM models, tuned models, or
Gemma-based models with the Vertex AI in Firebase SDKs.
We frequently add new capabilities to the SDKs, so check back on this FAQ for
updates (as well as in release notes, blogs, and social posts).
How do I fix the 400 error Service agents are being provisioned ... Service agents are needed to read the Cloud Storage file provided.?
If you're trying to send a multimodal request with a Cloud Storage for Firebase
URL, you might encounter the following 400 error: Service agents are being provisioned ... Service agents are needed to read the Cloud Storage file provided.
This error is caused by a project that didn't have the required service agents
correctly auto-provisioned when the Vertex AI API was enabled in
the project. This is a known issue with some projects, and we're working on a
global fix.
Here's the workaround to fix your project and correctly provision these service
agents so that you can start including Cloud Storage for Firebase URLs in your
multimodal requests. You must be an
Owner on the project, and you only need to
complete this set of tasks once for your project.
Access and authenticate with the gcloud CLI.
The easiest way to do this is from Cloud Shell. Learn more in the
Google Cloud documentation.
If prompted, follow the instructions displayed in the terminal to make the
gcloud CLI run against your Firebase project.
You'll need your Firebase project ID, which you can find at the top of the
settingsProject settings
in the Firebase console.
Provision the required service agents in your project by running the
following command:
Wait a few minutes to ensure that the service agents are provisioned, and
then retry sending your multimodal request that includes the
Cloud Storage for Firebase URL.
If you're still getting this error after waiting several minutes, reach out to
Firebase Support.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-11-06 UTC."],[],[]]