top | item 46223311

Getting a Gemini API key is an exercise in frustration

845 points| speckx | 2 months ago |ankursethi.com

349 comments

order
[+] Ozzie_osman|2 months ago|reply
I was recently (vibe)-coding some games with my kid, and we wanted some basic text-to-speech functionality. We tested Google's Gemini models in-browser, and they worked great, so we figured we'd add them to the app. Some fun learnings:

1. You can access those models via three APIs: the Gemini API (which it turns out is only for prototyping and returned errors 30% of the time), the Vertex API (much more stable but lacking in some functionality), and the TTS API (which performed very poorly despite offering the same models). They also have separate keys (at least, Gemini vs Vertex).

2. Each of those APIs supports different parameters (things like language, whether you can pass a style prompt separate from the words you want spoken, etc). None of them offered the full combination we wanted.

3. To learn this, you have to spend a couple hours reading API docs, or alternatively, just have Claude Code read the docs then try all different combinations and figure out what works and what doesn't (with the added risk that it might hallucinate something).

[+] dannyobrien|2 months ago|reply
The odd thing about all of this (well, I guess it's not odd, just ironic), is that when Google AdWords started, one of the notable things about it was that anyone could start serving or buying ads. You just needed a credit-card. I think that bought Google a lot of credibility (along with the ads being text-only) as they entered an already disreputable space: ordinary users and small businesses felt they were getting the same treatment as more faceless, distant big businesses.

I have a friend that says Google's decline came when they bought DoubleClick in 2008 and suffered a reverse-takeover: their customers shifted from being Internet users and became other, matchingly-sized corporations.

[+] cortesoft|2 months ago|reply
I have had way too many arguments over the years with product and sales people at my job on the importance of instant self-signup. I want to be able to just pay and go, without having to talk to people or wait for things.

I know part of it is that sales wants to be able to price discriminate and wants to be able to use their sales skills on a customer, but I am never going to sign up for anything that makes me talk to someone before I can buy.

[+] Sevii|2 months ago|reply
That has definitely changed. Google AdWords today is one of the most unfriendly services to onboard I've ever encountered. Signing up is trivial, setting up your first ad is easy, then you instantly get banned. Appeals do nothing. You essentially have to hire a professional just to use it.
[+] smagdali|2 months ago|reply
Hi, as the original-thought-haver here (and a buyer of DoubleClick's services on various projects 1998-2003), I should clarify -the problem with Google's acquisition of DoubleClick wasn't just about customer scale, or even market power, it was that DoubleClick was already the skeeziest player on the internet, screwing over customers, advertisers and platforms at every opportunity, and culturally antithetical to Google at the time. And there wasn't any way that "Don't Be Evil" was going to win in the long run.

Look how quaint this seems now: https://www.cnet.com/tech/services-and-software/consumer-gro...

[+] rozap|2 months ago|reply
I wasted several hours this week going around in the exact same circles. We have a billing account, but kept hitting a gemini quota. Fine. But then on the quota page, every quota said 0% usage. And our bill was like $5. Some docs said check AI studio, but then the "import project from google cloud to AI studio" button kept silently failing. This was a requests per minute quota, which was set at 15 (not a whole lot...) but wouldn't reset for 24 hours. So then I kept making new projects so I could keep testing this thing I'm building, until eventually I ran out.

The only way we could get it resolved was to (somehow) get a real human at google on the phone because we're in some startup program or something and have some connection there. Then he put in a manual request to bump our quota up.

Google cloud is the most kafkaesque insane system I've ever had the misfortune of dealing with. Every time I use it I can tell the org chart is leaking.

[+] jacquesm|2 months ago|reply
For the last decade or so I get a second $0.85 monthly bill from google. Nobody at google knows why, but they recommend to leave it because who knows what could be disabled if I block those payments. Interesting detail here is that this is on a bank account that we stopped using in 2017, so the only reason we are keeping that account alive is for these stupid google payments. In the cloud environment there is an invoice for the amounts, but no way to change the billing info to our current account and also no way (not by us, not by google support) to figure out what these payments are actually for...

Calling it kafkaesque is giving it too much credit.

[+] MrOrelliOReilly|2 months ago|reply
I have been fighting the same bizarre quota demon. Scripts kept timing out due to quota limitations, but I haven't been able to find any indication of a limit in the console. Finally gave up and switched to Claude, since they at least have a sane interface for API keys and billing!
[+] alexp2021|2 months ago|reply
Exactly the same for me. Quote usage is something like 2%, but constantly experience the quota limit error.
[+] asim|2 months ago|reply
Unfortunately Google's problem is the product is dictated by the architecture of the APIs and this is an issue for anything they do. At one point long ago every Google product was disjointed and Larry Page told everyone they needed to be unified under a single theme and login. Then over time with the scale of the company you become entirely dependent on the current workflows. To work around it, all of a sudden there's a new UI for a new product and it looks super clean right until you try do something with that login or roles or an API key that has to effectively jailbreak the flow you're in. Painful. It's why startups win. Small, nimble, none of that legacy cruft to deal with. Whoever is working hard to fix these problems at Google KUDOS TO YOU because it's not easy. It's not easy to wrangle these systems across hundreds of teams, products and infrastructure. The unification and seamless workflow at that scale is painfully hard to achieve and the issue is entirely about operating within the limitations of the system but for good reason.

I hope they figure out a lot of the issues but at the same time, I hope Gemini just disappears back into products rather than being at the forefront, because I think that's when Google does it's best work.

[+] plaidfuji|2 months ago|reply
> The “Set up billing” link kicked me out of Google AI Studio and into Google Cloud Console, and my heart sank. Every time I’ve logged into Google Cloud Console or AWS, I’ve wasted hours upon hours reading outdated documentation, gazing in despair at graphs that make no sense, going around in circles from dashboard to dashboard, and feeling a strong desire to attain freedom from this mortal coil.

100% agree

[+] levocardia|2 months ago|reply
Add me to the list of "saw nano banana pro, attempted to get an API key for like 5min, failed and gave up." Maybe I am a dummy (quite possible) but I have seen many smart people similarly flummoxed!

You can walk into a McDonalds without being able to read, write, or speak English, and the order touchscreen UI is so good (er, "good") that you can successfully order a hamburger in about 60 seconds. Why can't Google (of all companies) figure this out?

[+] obmelvin|2 months ago|reply
I don't understand the multiple posts / comments I've seen about this.

I google `gemini API key` and the first result* is this docs page: https://ai.google.dev/gemini-api/docs/api-key

That docs page has a link in the first primary section on the page. Sure, it could be a huge CTA, but this is a docs page, so it's kinda nice that it's not gone through a marketing make over.

* besides sponsored result for AI Studio

(Maybe I misunderstood and all the complaints are about billing. I don't remember having issues when I added my card to GCP in the past, but maybe I did)

[+] leopoldj|2 months ago|reply
As the article states, generating the key itself is easy. But getting credit and billing are the issues.
[+] yawnxyz|2 months ago|reply
I've to this day never been able to pay for Gemini through the API, even though I've tried maybe 6-7 times

If you bring it up to Logan he'll just brush it off — I honestly don't know if they test these UX flows with their own personal accounts, or if something is buggy with my account.

[+] BoorishBears|2 months ago|reply
As the other comments pointed out, that's not covering billing...

But also the (theoretical) production platform for Gemini is Vertex AI, not AI Studio.

And until pretty recently using that took figuring out service accounts, and none of Google's docs would demonstrate production usage.

Instead they'd use the gcloud CLI to authenticate, and you'd have to figure out how each SDK consumed a credentials file.

-

Now there's "express mode" for Vertex which uses an API Key, so things are better, but the complaints were well earned.

At one point there were even features (like using a model you finetuned) that didn't work without gcloud depending on if you used Vertex or AI Studio: https://discuss.ai.google.dev/t/how-can-i-use-fine-tuned-mod...

[+] jiggawatts|2 months ago|reply
Every aspect is at least partially broken several times a day, and even when there isn't a temporary outage of something somewhere, there are nonsensical "blocks" for things that ought to just work.

I've been using the AI Studio with my personal Workspace account. I can generate an API key. That worked for a while, but now Gemini CLI won't accept it. Why? No clue. It just says that I'm "not allowed" to use Gemini Pro 3 with the CLI tool. No reason given, no recourse, just a hand in your face flatly rejecting access to something I am paying for and can use elsewhere.

Simultaneously, I'm trying to convince my company to pay for a corporate account of some sort so that I can use API keys with custom tools and run up a bill of potentially thousands of dollars that we can charge back to the customer.

My manager tried to follow the instructions and... followed the wrong ones. They all look the same. They all talk about "Gemini" and "Enterprise". He ended up signing up for Google's equivalent of Copilot for business use, not something that provides API keys to developers. Bzzt... start over from the beginning!

I did eventually find the instructions by (ironically) asking Gemini Pro, which provided the convenient 27 step process for signing up to three different services in a chain before you can do anything. Oh, and if any of them trigger any kind of heuristic, again, you get a hand in face telling you firmly and not-so-politely to take a hike.

PS: Azure's whatever-it-is-called-today is just as bad if not worse. We have a corporate account and can't access GPT 5 because... I dunno. We just can't. Not worthy enough for access to Sam Altman's baby, apparently.

[+] verdverm|2 months ago|reply
Most of them are correlating gemini-cli experience (trash) with the broader access to Gemini via studio or cloud (not at all a problem)
[+] politelemon|2 months ago|reply
I did this same thing and this was my first result too. I am just not seeing how the author ended up where they did, unless knowing how to use Google search is not a core skill.
[+] msp26|2 months ago|reply
Hi if the Gemini API team is reading this can you please be more transparent about 'The specified schema produces a constraint that has too many states for serving. ...' when using Structured Outputs.

I assume it has something to do with the underlying constraint grammar/token masks becoming too long/taking too long to compute. But as end users we have no way of figuring out what the actual limits are.

OpenAI has more generous limits on the schemas and clearer docs. https://platform.openai.com/docs/guides/structured-outputs#s....

You guys closed this issue for no reason: https://github.com/googleapis/python-genai/issues/660

Other than that, good work! I love how fast the Gemini models are. The current API is significantly less of a shitshow compared to last year with property ordering etc.

[+] logankilpatrick|2 months ago|reply
Hey! Very valid feedback on setting up a billing account. This is something I have been pushing for over the last 2 years at Google. The good news: setting up billing directly in AI Studio tested internally and will be shipped in January : )

Will follow up on some of the other threads in here!

[+] whalesalad|2 months ago|reply
> setting up billing directly in AI Studio tested internally and will be shipped in January

Does this mean I can finally use premium features without onboarding my entire google workspace? I made the mistake of getting a good chunk of my family on my google app domain back in ~2007. For the last few years, I spend $80 per month just to host their email because the cost is easier to deal with than the human beings themselves. But I want to use the latest premium Google AI tooling and as far as I can tell the only way to do that is to upgrade my google workspace to the next tier and blow even more $$$ away each month. Suffice to say I have not done this, but it is a blocker from using things like Nano Banana with a non-gmail account.

[+] mrieck|2 months ago|reply
Will that change also allow paying upfront ($250 or whatever) to bump up a tier?

I want to release a service using computer-use but am worried about 429 quota errors if I have actual users.

[+] mseri|2 months ago|reply
Finally! Great to hear. I had the exact same experience, but gave up at the moment of ID verification… too much hassle indeed
[+] neom|2 months ago|reply
I complained about this on HN recently and Logan responded and asked me to email him with feedback on how I'd like the experience to work (I didn't, sorry Logan, been busy :)) - Logan, to his credit, is very active everywhere reading and soliciting feedback. I think they're going to be giving it a pretty big bump on ux/ui of AI studio next month. It's easy to see he's a super smart guy trying to build something complex within a massive machine - given how focused on the product he appears to be, I have high hopes.

https://x.com/OfficialLoganK

[+] verdverm|2 months ago|reply
I don't know, he announced on Bluesky that they are dropping a big vibe coding update to aistudio next year

1. cart out in front of the horse a bit on this one, lame hype building at best

2. Not at all what I want the team focusing on, they don't seem to have a clear mission

Generally Google PMs and leaders have not been impressive or in touch for many years, since about the time all the good ones cashed out and started their own companies

[+] mvkel|2 months ago|reply
This has often been the case (Google dev rel soliciting feedback) and they very rarely take meaningful action. Like firing a bug report with Apple.

They'll get to it when it becomes strategically important to.

Why making it easier to pay them isn't always strategically important, I'm not sure.

[+] bosky101|2 months ago|reply
@logan waiting for named apikeys
[+] niwtsol|2 months ago|reply
The article lightly mentions it, but how AWS and Google Cloud Console are so absolute nonsensical in UX and ease of use is beyond comprehension.
[+] polalavik|2 months ago|reply
holy hell google cloud is so confusing i just ended up using (a much more expensive) digital ocean droplet instead for a little project. I guess they only really care about enterprise customers who can burn tons of money figuring it out, but it made me never want to use it again.

Same with google ads - super fuckin shit UI/UX, super confusing to understand what is going on.

companies like digital ocean, supabase, etc can make money (from people like me) because they just circumvent the bullshit or wrap the dogshit experience (aws) into a much better experience. bless supabase.

[+] sofixa|2 months ago|reply
Baring them using specific marketing terms (so you have EC2 for what are basically virtual machines), for which both the docs and the portal itself provide helpful information, what do you mean? I find GCP's console and whole set up to be slightly better, but both it and AWS are fine.

Now Azure, or anything made by VMware, you just know they hate you.

[+] heymijo|2 months ago|reply
The really fun part was after getting billing finally set up in the cloud console trying to find what model name you actually have to use to call it via the API. Conflicting information? Sure! Gemini cloud help being useless? Naturally.

Oh and don’t forget that error message being returned when you try to call the API is because you didn’t give your project the proper permissions in google cloud console. What permissions do you need? ¯\_(ツ)_/¯

Google Cloud Console feels like being stuck in the seventh circle of hell.

[+] Havoc|2 months ago|reply
Yeah can't figure out WTH is going on in google's AI ecosystem either.

They absolutely deserve credit for their free tier API keys though. That's unheard of in big cloud - an actual you can't shoot yourself in the foot with a life ruining bill thing. Can't recall what part of their product maze I got it from but it seems to do what it says on tin

[+] lxe|2 months ago|reply
I always wondered how something like AWS or GCP Cloud Console admin UIs get shipped. How could someone deliver a product like these and be satisfied, rewarded, promoted, etc. How can Google leadership look at this stuff and be like... "yup, people love this".
[+] theflyinghorse|2 months ago|reply
What are the chances that Google leadership even seen GCP interface outside of a demo once a never?
[+] DANmode|2 months ago|reply
Google doesn’t have leadership, it has shareholders.
[+] modeless|2 months ago|reply
Seems like the real problem is something about his account or credit card tripped some fraud detectors and he got stuck in a part of the system designed to prevent credit card fraud rather than facilitate legitimate use. I can certainly imagine that Google gets a lot of chargebacks from people who had their credit card numbers stolen to mine bitcoin or whatever on Google Cloud.
[+] jwrallie|2 months ago|reply
Having moved from one country to another, I tripped all kinda of anti fraud systems and the only way out was to share my ID with every other company. It’s annoying but one common thing is that anti fraud systems seem to require humans in the loop, so it’s better to give up and get back to it next day.

The most annoying company I dealt with was Blizzard. I just wanted to play a game but it took days of back and forth, meanwhile I started to play something else and lost interest.

[+] koinedad|2 months ago|reply
I have always found Google products incredibly confusing and difficult to use. I have had a very similar experience to this a number of times.
[+] antonvs|2 months ago|reply
I work with GCP regularly. Once you’re familiar with their approach, it’s straightforward enough. But the situation with Gemini is on a whole different level.
[+] btown|2 months ago|reply
In case it's helpful to anyone, https://openrouter.ai/google/gemini-3-pro-preview is useful to know about.

Adding another layer on top of Google's own APIs adds latency, lowers reliability, and (AFAIK) doesn't allow batch mode - but if that's tolerable, it avoids the mess that is Google Service Account JSON and Cloud Billing.

[+] nl|2 months ago|reply
You literally cannot buy Antigravity with a non-personal Google account.

I read someone on here who is using Gemini via OpenRouter because it was the only way they could pay for it.

[+] aerhardt|2 months ago|reply
I had to warm up a Gemini API project worth a few thousand hours during weeks so that I could get to the tier that allowed me to carry out the workload.

How can you have any tokens if you haven’t finished your tokens?!

[+] throwup238|2 months ago|reply
> How can you have any tokens if you haven’t finished your tokens?!

Another rate limit in the wall.

[+] nikanj|2 months ago|reply
This reminds me of the ”I just want to serve 5 terabytes” thing

Google does not want your money, they don’t know how to count so low

[+] kevindamm|2 months ago|reply
Broccoli Man! classic

https://youtu.be/3t6L-FlfeaI (2010)

To be fair, a lot of this changed after that video became a meme.. but I'd bet that the broccoli man template is still trending on memegen

[+] happyopossum|2 months ago|reply
The underlying issue here is that 3.0 is still in preview. Once it’s a GA model, you can just use your $20 consumer Ai pro sub and skip all the GCP stuff…