Top
Best
New

Posted by speckx 6 hours ago

Getting a Gemini API key is an exercise in frustration(ankursethi.com)
265 points | 110 comments
msp26 7 minutes ago|
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! The current API is significantly less of a shitshow compared to last year with property ordering etc.

levocardia 22 minutes ago||
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?

andy99 6 minutes ago||
I tried at some point to sign up for whatever IBMs AI cloud was called. None of the documentation was up to date, when you clicked on things you ended up in circular loops that took you back where you started. Somehow there were several kinds of api keys you could make, most seemingly decoys and only one correct one. The whole experience was like one of those Mario castle levels where if you don’t follow the exact right pattern you just loop back to where you started.

It makes sense for IBM, seems like google is just reaching that stage?

JohnMakin 21 minutes ago||
because the bubble in which googlers exist is inherently user-hostile, even to their own detriment. been like this for a while
dannyobrien 4 hours ago||
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 3 hours ago||
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.

Workaccount2 2 hours ago|||
The number one rule of business that should just be passively reiterated to everyone working in any type of transactional field:

1. Never make it hard for people to give you money.

the_snooze 1 hour ago||
Parking apps don’t seem to care much for that. They know you’ll jump through their shoddy UIs and data collection because they have a local monopoly. Often with physical payment kiosks removed and replaced with “download our shitty app!” notices.
prasadjoglekar 19 minutes ago|||
There's also the unfortunate stick of a much larger parking ticket that is even more trouble to contest.
Workaccount2 56 minutes ago|||
Plenty of people on here looking to disrupt a market with tech...c'mon guys, get on it

Edit: On second thought, there is a perverse incentive at work (and probably one of the "lowest friction" ways to get money), which is issuing government enforced fines.

brightball 1 hour ago||||
It depends on the environment.

If a platform is designed in a way that users can sign up and go, it can work well.

If an application is complicated or it’s a tool that the whole business runs on, often times the company will discover their customers have more success with training and a point of contact/account manager to help with onboarding.

AznHisoka 2 hours ago||||
You are also a developer though, and developers are notorious for wanting self serve.

Someone who works in finance or conpliances might want a demo, or views those things as signals the product is for serious use cases.

dpkirchner 1 hour ago||
Sure, and they should have that option. But in my experience business-folks ask techies to evaluate services all the time, and ideally we can just start out in the low-/no-touch tier to feel things out. If that tier isn't available, us techs might just try a different service.
timr 4 minutes ago||
The kind of products hidden behind sales calls are generally the sort where the opinion of IC-level tech staff is next to irrelevant. With these kinds of products, the purchase decision is being made at a group level, the contract sizes are large, and budgetary approvals are required. Literally nobody cares if you buy a single license or not, and if you (personally) refuse to try it because it doesn’t have self-service, you’ll be ignored for being the bad stereotype of an “engineer”, or worse.

About the only time you’ll be asked to evaluate such a product as an IC is when someone wants an opinion about API support or something equivalent. And if you refuse to do it, the decision-makers will just find the next guy down the hall who won’t be so cranky.

sh34r 2 hours ago|||
> 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

You say that as if it isn’t the entire reason why these interactions should be avoided at all costs. Dynamic pricing should be a crime.

pooper 2 hours ago|||
> You say that as if it isn’t the entire reason why these interactions should be avoided at all costs. Dynamic pricing should be a crime.

Does segmentation also count as dynamic pricing?

--

    The IT guy at Podunk Lutheran College has no money: Gratis.
    The IT guy at a medium-sized real estate agency has some money: $500.
    The IT guy at a Fortune 100 company has tons of money: $50,000.


https://blog.codinghorror.com/oh-you-wanted-awesome-edition/
Terr_ 20 minutes ago|||
Not parent poster, but I think a more practical approach is to ban secret pricing.

If everybody can see the prices that are being quoted/paid by other people, that exerts a strong moderating force against abuse.

It won't help you if there's a monopoly, but I consider that a separate problem needing separate solutions.

transcriptase 1 hour ago|||
The entire lab supply industry is disgusting in this respect. The funding (and recent grants) that a given professor or research lab has is generally publicly available information that vendors will buy in easily digestible formats from brokers and companies that scrape the websites of major granting agencies.

All of their products, however realistically commoditized, will require a drawn out engagement with a rep who knows how much money you’ve received recently and even has an outline what research you plan to do over the next few years since even the detailed applications often get published alongside funding allocations.

The exact same piece of equipment, consumables required to use it, and service agreements might be anywhere from X to 10X depending on what they (as a result of asymmetrically available knowledge) know you need and how much you could theoretically spend.

lokar 49 minutes ago||
A group of research universities should start a non-profit co-op to produce this for them.

Getting just the university of California should be enough critical mass.

nicbou 2 hours ago||||
Certain purchases (like health insurance in my country) should be a conversation, because the options are fiendishly complex and the attributes people typically use for comparison are wrong. The consequences are lifelong.
xboxnolifes 2 hours ago|||
Pricing tiers are a form of dynamic pricing. Service free tiers basically couldn't exist without dynamic pricing, as they are subsidized by the paying tiers.
Sevii 4 hours ago||
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.
LiamPowell 3 hours ago|||
Yet it's still absolutely inundated with scams and occasionally links that directly download malware[1] that they don't action reports on. I don't think the process needs to be easier if they already can't keep up with moderation.

[1]: https://adstransparency.google.com/advertiser/AR129387695568...

Workaccount2 1 hour ago||
It might seem vindictive, but these are the ads that google shows people who block all of Googles tracking or are new/blank profiles. Hear me out...

When Google has a bad/empty profile of you, advertisers don't bid on you, so it goes to the bottom feeders. Average (typically tech illiterate) people wandering through the internet mostly get ads for Tide, Chevy, and [big brand], because they pay Google much more for those well profiled users. These scam advertisers really don't pay much, but are willing to be shown to mostly anyone. They are a bit like the advertiser of last resort.

All of that is to say, if you are getting malware/scam ads from Google, it's probably because (ironically) you know what you are doing.

dekhn 2 hours ago||||
The thing to understand about google services is that they see so much spam and abuse that it's easier for them to just assume you are a spammer rather than a legitimate customer, unless you go through other channels to establish yourself.
binsquare 3 hours ago||||
Also adding onto this, it is impossible to get human support!

One of my co-workers left with an active account and active card but no passwords noted. The company gave up and just had to cancel + create a new account for the next adwords specialist.

fersarr 4 hours ago|||
My attempts always had validation issues that stopped the ads from running but I never figured it out and stopped trying
obmelvin 3 hours ago||
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 3 hours ago||
As the article states, generating the key itself is easy. But getting credit and billing are the issues.
knollimar 11 minutes ago||
I have it running and calling but it's not showing the usage and I set it up the day gemini 3 came out
yawnxyz 2 hours ago|||
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.

bobviolier 31 minutes ago|||
https://x.com/OfficialLoganK/status/1978897746921693572?s=20
pants2 2 hours ago|||
This is my experience as well in my personal account, however at work given we were already paying for Google Cloud it was easy enough to connect a GCP account.

But somehow personally even though I'm a paying Google One subscriber and have a GCP billing account with a credit card, I get confusing errors when trying to use the Gemini API

verdverm 3 hours ago|||
Most of them are correlating gemini-cli experience (trash) with the broader access to Gemini via studio or cloud (not at all a problem)
amluto 3 hours ago|||
> Gemini via studio

Excuse me? If you mean AI Studio, are you talking about the product where you can’t even switch which logged in account you’re using without agreeing to its terms under whatever random account it selected, where the ability to turn off training on your data does not obviously exist, and where it’s extremely unclear how an organization is supposed to pay for it?

rezonant 1 hour ago||
Yes, much like admin.google.com (the GSuite admin interface), which goes ahead and tries to two-factor your personal GMail account every single time you load it instead of asking you which of the actual GSuite accounts you're signed into you'd like to use...
amluto 43 minutes ago||
I love how the two factor screen has no obvious way to tell it that you want a different account.

Hint: you can often avoid some of this mess by adding the authuser=user@domain to the URL.

Leynos 3 hours ago|||
They could always just use OpenCoder, Crush or Goose with OpenRouter (https://openrouter.ai/google/gemini-3-pro-preview)
jiggawatts 57 minutes ago|||
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.

BoorishBears 2 hours ago|||
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...

politelemon 3 hours ago||
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.
mediaman 1 hour ago|||
Read the full post. Partway down you will see they agree with you that getting an API key is not hard.

Paying is hard. And it is confusing how to set it up: you have to create a Vertex billing account and go through a cumbersome process to then connect your AIStudio to it and bring over a "project" which then disconnects all the time and which you have to re-select to use Nano Banana Pro or Gemini 3. It's a very bad process.

It's easy to miss this because they are very generous with the free tier, but Gemini 3 is not free.

malfist 3 hours ago|||
I did notice in their post instead of searching for answers, they asked Gemini how to do things, and when that didn't work, they asked Claude.

I often see coworkers offload their work of critical thinking to an AI to give them answers instead doing the grunt work nessecary to find their answers on their own.

dugidugout 2 hours ago||
This rhetoric worries me. If you insist on degrading others at least fix it to something like:

> [They seemingly] can't think on their own without an AI [moderating]

They _literally_ can think on their own, and they _literally_ did think up a handful of prompts.

A more constructive way to make what I assume to be your point would be highlighting why this shift is meaningful and leaving the appeal to ego for yourself.

ipaddr 50 minutes ago|||
There is some truth in that statement.

Low energy afternoons you might be able to come up with a prompt but not the actual solution.

There are people offloading all thoughts into prompts instead of doing the research themselves and some have reached a point where they lost the ability to do something because of over AI use.

malfist 2 hours ago|||
I agree with your assessment, I am in the wrong here. It's easy to be extra judgmental to anonymous figures on a blog you'll never meet. Thank you for reminding me to give people the benefit of doubt and not jump to worst case assumptions.

I've edited my post to be more charitable

plaidfuji 3 hours ago||
> 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

avereveard 2 hours ago|
Is the outdated aws documentation in the room with us now?
neom 4 hours ago||
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 3 hours ago||
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 35 minutes ago||
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.

niwtsol 3 hours ago||
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 3 hours ago||
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.

herpdyderp 3 hours ago||
DigitalOcean is such a dream to use. I also really appreciate all their guides for almost everything web server related.
sofixa 3 hours ago||
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.

squirrellous 20 minutes ago||
As a former employee, the engineering culture at Google gives me old-school hacker vibes, so users are very much expected to “figure it out” and that’s somewhat accepted (and I say this with fond memories). It’s no surprise the company struggles with good UX.
koinedad 2 hours ago||
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.
Havoc 4 hours ago|
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

impure 3 hours ago||
The free tier is good but they've been cracking down on rate limits. Just recently they significantly dropped the max requests per day.
BoorishBears 4 hours ago||
You can sum it up as: Gemini from AI Studio and Gemini from Vertex AI Studio have independent rate limits.

-

And I guess to add some context, it's because Google seemingly realized that Google Cloud moves so glacially slow, and has so much baggage, that they could no longer compete with scrappier startups like OpenAI and Anthropic on developer mindshare.

So there's a separate product org that owns AI Studio, which tries to be more nimble, and probably 50x'd Gemini adoption by using API Keys instead of Service Accounts and JSON certs that take mapping out the 9th circle of hell to deploy in some environments. (although iirc Vertex now has those)

They definitely do ship faster than Google Cloud, but their offerings actually end up feeling like a product team with fewer resources than OpenAI or Anthropic (like shipping purple tailwind-slop UIs as real features), which is just nuts.

More comments...