xtekky / gpt4free

The official gpt4free repository | various collection of powerful language models
https://g4f.ai
GNU General Public License v3.0
59.15k stars 13.18k forks source link

[Google AI Studio] Gemini API without the API key #1949

Open iG8R opened 1 month ago

iG8R commented 1 month ago

Is there any way to implement getting access to Google AI Studio https://aistudio.google.com/app/prompts/new_chat, which is essentially the Gemini API but without an API key, similar to how OpenAI Chat only requires a har file but not an API key?

Why such a request appeared - recently, I don't know what happened with Google, but it banned all existing and newly created API keys and projects (since May 07, 2024 - 4 projects with 8 API keys) for a ridiculous reason, supposedly there was an exceeding of the quota metric 'Generate Content API requests per minute' and the limit 'GenerateContent request limit per minute for a region' of the service 'generativelanguage.googleapis.com" for a consumer project, although in the Quota&System Limits parameter of each project all Current Usage Percentages for all API services are equal to 0% and I know 100% that the application that used those API keys only made 1 request per 2 seconds. To all my appeal requests I got nothing.

But Google AI Studio https://aistudio.google.com/app/prompts/new_chat still works fine.

image

image

iG8R commented 1 month ago

One more reason to use Google AI Studio

image

github-actions[bot] commented 1 month ago

Bumping this issue because it has been open for 7 days with no activity. Closing automatically in 7 days unless it becomes active again.

iG8R commented 1 month ago

Up.

JayJayBinks commented 1 month ago

I found this Git Repo where someone Reverse Engineered the AI Studio API. Maybe someone can integrate it to g4f https://github.com/SreejanPersonal/Gemini-1.5-Pro-Google-AI-Studio-Reverse-Engineered-API

JayJayBinks commented 1 month ago

I experimented a bit with the Google API and 1.5 flash has far better quota. I want to create a PR to add the gemini flash version, but am not allowed to create a new branch. @xtekky ?

Zedai00 commented 1 month ago

@JayJayBinks fork it then add and do a pull request

github-actions[bot] commented 3 days ago

Bumping this issue because it has been open for 7 days with no activity. Closing automatically in 7 days unless it becomes active again.

iG8R commented 2 days ago

up