EDIT May 12: Google added new rate limits to AI studio this morning, 25 RPD, so this is effectively no longer working. We had a good run!
EDIT: The Open Router integration and google ai studio key method seems like the easiest way that works for everyone, especially if you already have an openrouter account. Pasting that method here for visibility:
Get a Google AI Studio API key from https://aistudio.google.com/apikey
Plug that API key into the Google AI Studio integration on https://openrouter.ai/settings/integrations, select enabled but not "Use as fallback"
You can now use your Openrouter key anywhere and as long as you select Gemini 2.5 Pro Experimental as your model, it will use your key. (4. If you also add a GCP key and have Vertex AI enabled for the project, obtained as per the instructions below, you can add that to your integrations as well, and you will have two sources of 2.5 Pro backing your Openrouter calls.)
Hey all,
After dealing with Openrouter and Requesty giving me constant rate limits for Gemini 2.5 Pro, I got frustrated and decided to get things set up directly through Google's APIs. I have now sent over 60 million tokens in a single day without hitting any rate limits, all for $0—an equivalent usage with Claude would have cost $180. I also had a few other engineers confirm these steps. Here's how to do it and then integrate with Roo Code--but this should work for other tools like Cline, too:
Setting Up Google Cloud
Create or log into your Google Cloud account.
Open the Google Cloud Console.
Create a new Google Cloud project (I named mine "Roo Code").
Enable billing for your newly created Google Cloud project.
Enable the Vertex AI API.
Enable the Gemini API from the API overview page.
In your project dashboard, navigate to APIs & Services → Credentials.
Click "Create Credentials" → "API Key".
Copy the generated API key and save it securely.
Integrating with Your IDE (Example: Roo Code)
In VSCode or Cursor, navigate to the extensions marketplace (Shift + Cmd + X on Mac), search for and install "Roo Code" (or your preferred tool like Cline).
Open Roo Code (Cmd + Shift + P, then type "View: Show Roo Code").
Click to configure a new API provider, selecting "Google Gemini".
Paste the API key you saved earlier into the API key field.
Select "google/gemini-2.5-pro-exp-03-25:free" as the model.
Click Save.
There you go! Happy coding. Let me know if you run into any issues.
Edit: looks like some are having issues. A few ideas/alternatives:
Use a Vertex api key, but gemini api as provider in Roo Code.There is only one key, ignore this alternative.Use vertex api as the provider in Roo Code--its just a little more complicated, you'll have to create a service account in the credentials page of the project, and paste the json in Roo Code when configuring the provider
If you have an OpenRouter account, you can go to the integrations page https://openrouter.ai/settings/integrations and add your vertex api key to the google vertex integration. You can also add a google ai studio api key to the Google AI Studio integration. In each setting window where you add the key, make sure it is enabled. Then, in Roo Code, you use your openrouter account, but whenever it uses Gemini 2.5 pro free, it will default to your API key, not one of theirs which is being rotated among many users.
Videos
I've been using Gemini 2.0 Flash and 2.0 Flash Thinking through third-party software AI providers like ChatLLM, which accesses these models via API. While these providers promise privacy, I'm still concerned about Google's role. If the underlying API is free, does that mean Google is extensively using our data for training and other purposes, regardless of what the third-party provider claims? What are your thoughts on this? Are there any ways to mitigate the risks, especially when using these APIs through intermediaries?
Gemini 1.5 APIs are not free. So, I would respect Google to respect user privacy for the 1.5 LLMs.
There are not paid versions of Gemini 2.0 Flash and 2.0 Flash Thinking at the moment. I can't pay even if I want to.