Which Google API key to use? Vertex AI API or an API key created in Goggle AI Studio? #2371

Open
opened 2026-02-16 17:35:22 -05:00 by yindo · 2 comments
Owner

Originally created by @Jmcassociates on GitHub (Oct 30, 2025).

Originally assigned to: @rekram1-node on GitHub.

Question

I use the Vetex AI API key in GCP for mciroservices I have on a project I'm building for the AI portion. Can I gen another API key with Vertex and restrict it to opencode? What's the bsst method to use 2.5 pro?

Originally created by @Jmcassociates on GitHub (Oct 30, 2025). Originally assigned to: @rekram1-node on GitHub. ### Question I use the Vetex AI API key in GCP for mciroservices I have on a project I'm building for the AI portion. Can I gen another API key with Vertex and restrict it to opencode? What's the bsst method to use 2.5 pro?
Author
Owner

@github-actions[bot] commented on GitHub (Oct 30, 2025):

This issue might be a duplicate of existing issues. Please check:

  • #1725: Google VERTEX AI bug with MCP servers - User had issues with Vertex AI API and asked about using Gemini Pro 2.5 with Vertex AI
  • #553: Error: Could not load the default credentials - Discusses authentication issues when trying to use Vertex API
  • #272: Supporting Vertex-based models using google auth - Detailed discussion about setting up Vertex AI with Google authentication vs regular API keys
  • #402: Allow using Gemini CLI for free Gemini requests - Discusses using Google AI Studio vs other Google APIs for Gemini access
  • #1204: Any gemini vertex support? - User asking about Vertex support for Gemini models

These issues cover similar topics about Google API authentication, Vertex AI setup, and choosing between different Google AI services. The discussion in #272 particularly covers the exact question about Vertex AI vs Google AI Studio API keys.

Feel free to ignore if none of these address your specific case.

@github-actions[bot] commented on GitHub (Oct 30, 2025): This issue might be a duplicate of existing issues. Please check: - #1725: Google VERTEX AI bug with MCP servers - User had issues with Vertex AI API and asked about using Gemini Pro 2.5 with Vertex AI - #553: Error: Could not load the default credentials - Discusses authentication issues when trying to use Vertex API - #272: Supporting Vertex-based models using google auth - Detailed discussion about setting up Vertex AI with Google authentication vs regular API keys - #402: Allow using Gemini CLI for free Gemini requests - Discusses using Google AI Studio vs other Google APIs for Gemini access - #1204: Any gemini vertex support? - User asking about Vertex support for Gemini models These issues cover similar topics about Google API authentication, Vertex AI setup, and choosing between different Google AI services. The discussion in #272 particularly covers the exact question about Vertex AI vs Google AI Studio API keys. Feel free to ignore if none of these address your specific case.
Author
Owner

@rekram1-node commented on GitHub (Oct 30, 2025):

I think we discussed this in discord right

@rekram1-node commented on GitHub (Oct 30, 2025): I think we discussed this in discord right
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#2371