Hello, now that Gemma 4 has been released, many people are running tests, myself included. Google’s free tier offers very generous usage. I’d like to know whether I can use Gemma via an API key from AI Studio in specific ways.
Building a proxy and using the Gemma model in various projects/programs, e.g. Claude Code, Openclaw, Hermes.
My own original work. I’m an amateur, but I take inspiration from existing tools, for example, I built a small CLI modeled after gemini-cli where I add my own options and run tests using Gemma.
Thanks in advance for the answer. I’d like to know what violates the TOS and what is permitted. Just to clarify, I’m accessing Gemma via an API key from AI Studio.
1 Like
Hi @Dawid_M,
Thanks for reaching out, and it’s awesome to hear you are experimenting and building your own CLI tools with Gemma 4!
To clarify the rules: because you are accessing the model via the Google AI Studio API (rather than downloading the raw weights to host yourself), your usage is governed by the Google APIs Terms of Service and the Generative AI Additional Terms of Service, along with our Prohibited Use Policy.
To answer your specific use-case questions:
-
Building Custom Programs & CLIs: Building a small CLI modeled after existing tools or integrating the API into your own original projects is exactly what the API is built for! We highly encourage this kind of experimentation.
-
Integrating with Third-Party Tools (Claude Code, Hermes, etc.): Using your personal AI Studio API key to power local third-party tools for your own personal use is generally perfectly fine, provided you aren’t using them to generate content that violates our Acceptable Use Policy (malicious code, harassment, etc.).
-
Building a Proxy: This depends on your definition. If you mean building a backend server to securely route requests so you don’t expose your API key in a frontend app, that is standard best practice. However, if you mean building a proxy to circumvent rate limits, resell the free tier API access to others, or create a public-facing production application on the free tier, that would violate the TOS.
One important note for your original work: Since you mentioned using the Free Tier of AI Studio, please keep in mind that prompts and responses sent through the Free Tier may be used by Google to improve our products. If you are working with highly sensitive original data, you may want to consider upgrading to the Paid Tier, where your data is not used for training.
You can review the full terms here:
You can also refer here for Gemma 4 model’s Limitations and Usage.
Hope this helps clarify things! We can’t wait to see what you build.
2 Likes