The key, a JSON string in one of the shapes (see VertexAICredentials).
The credentials with project and location set (an empty project and no location for an API key on
Google's global route).
When the key or its serviceAccountJson is not JSON, it names no project (an API key
may leave out both the project and the location, not the project alone), its liveHost, liveApiVersion or
apiKey is not one, or an apiKey stands beside another credential (no message quotes any of these values).
Reads a Vertex AI key. A Google Cloud API key (
apiKey) takes no other credential beside it; with no project it names no location either (Google's global route), and with one the location defaults tous-central1(the regional route). Otherwise aserviceAccountJsonstring is merged in (its fields win, except the top-level project and location);project_idwins overproject; the location defaults tous-central1. The Gemini Live fields (liveHost,liveApiVersion) are checked and normalized; blank ones, and a blankapiKey, are dropped.