One more suggestion: Please remove the need to make a project before we can use Gemini API. That seriously impedes our motivation in using Gemini for one-off scripts and proof-of-concept products where creating a project is overkill.
Ideally what I want is this: I google "gemini api" and that leads me to a page where I can login using my Google account and see the API settings. I create one and start using it right away. No extra wizardry, no multiple packages that must be installed, just the gemini package (no gauth!) and I should be good to go.
Totally fair. Yes, Google AI Studio [ https://aistudio.google.com ] lets you do this but Google Cloud doesn't at this time. That's super duper irritating, I know.
Creating an API key from AI Studio automatically creates a Google Cloud project in the background for you. You can see it when you're logged into the console or via `gcloud projects list`
It's similar to how a bunch of projects get created whenever you use Apps Scripts.
Ah I think I see based on the other comment but just to confirm - you want to use Vertex provided Gemini API endpoints without having to create a Google Cloud project. Is that correct? (I’m just trying to get as precise about the problem statement and what success looks like - that helps me figure out a path to the best solution.)
1. There should be no need to create a project to use the Vertex Gemini API. I know Google AI Studio doesn't need a project, but that API is limited compared to Vertex API, which brings me to the next point.
2. There should be one unified API, not two! That'll help scale products with ease. Currently Google recommends using Google AI Studio API for simple projects and one-off scripts, and Vertex for "real" projects. No other competitor does this (look at OpenAI for instance).
3. The OpenAI compatibility layer isn't complete and doesn't support other Gemini features that only the Gemini API supports (e.g,. setting safety level).
4. Devs should need to install only one package to use Google Gemini. Please get rid of gauth.
5. The documentation on Gemini API is fragmented. Ironically, Googling "gemini api doc" doesn't lead to the page that discusses how to get started easily and quickly.
I’m a small time GCP customer for five or six years, and relatively tech competent, and I had a very difficult time getting Gemini code set up yesterday with Vertex API keys; finally I had to use gcloud to login from the CLI in combination with clicking a link and doing web sign on from Gemini. This frustrated me, not least because I have API direct calls to Vertex Gemini working from Aider, although I could not tell you exactly what incantation I finally used to make it work. In particular it didn’t look to me like the Gemini code app uses something like dotenv? I don’t recall now; upshot - could get it to tell me I was logged in wrong / had an oauth2 error / needed a project id at various times, but no inference.
What I wanted: to be able to go to a simple page tied to a google login and generate named API keys that can be used from anywhere to query Gemini models with a SINGLE key and environment variable kept in a .env file. I would prefer to pre-fill the account that debits by API usage. For an example, you could sign up for Anthropic API, OpenAI API, OpenRouter to see their customer flows. They are extremely simple in comparison to getting a new account (or even an old one) in shape to do metered billing for Gemini inference.
I then want this API key to work, regardless of what gcloud “knows” about me — am I logged in to a GCP account? Don’t care. What’s my current “Project?” Don’t care. What’s the difference between Vertex and Gemini? Don’t care.
As I write this, I bet a startup could be launched just offering this as a wrapper. This is surprisingly painful!
Thanks again for all the work; looking forward to seeing more out of Gemini.
Well, originally what was wrong was that non-vertex customers got much lower limits and about twice the time to first token as vertex customers. So I used a vertex key setup. However, the cli had me in auth hell trying to connect up with vertex. Like literal spinning. So, thank you. I wiped my vertex environment variables and upped my gemini key level, and it mostly works now.
It's very hard to figure out what resource is incurring charges – and get to a page where you can press "Cancel" on that resource – from the Billing Page. I had to open a support ticket to shut down my Cloud Workstation because I simply couldn't find it in the labyrinth. I gave up and deleted my project.
"The Google Cloud Dashboard is a mess, and they haven't fixed it in years." Tell me what you want, and I'll do my best to make it happen.
In the interim, I would also suggest checking out Cloud Hub - https://console.cloud.google.com/cloud-hub/ - this is us really rethinking the level of abstraction to be higher than the base infrastructure. You can read more about the philosophy and approach here: https://cloud.google.com/blog/products/application-developme...