Is bring-your-own Gemini API key allowed in an adult consumer iOS app?

Hi Gemini API team,

I’m Mahmoud Metwally, the developer of Portion, an iPhone meal-tracking app: triplefour .ae/portion/en. Adults can photograph a meal or enter a description and receive an estimated calorie and macro range. It is informational, not a medical device or a source of medical advice.

The app’s default path uses Firebase AI Logic with the Agent Platform/Vertex AI backend on our own billed Google Cloud project. We are considering a separate, optional “bring your own key” (BYOK) path: an adult user creates their own Gemini Developer API key, enters it in the app, and the app stores it in iOS Keychain and calls the Gemini API directly from that user’s device. We would explain billing and data handling clearly. BYOK is currently disabled for public release while we seek guidance.

Could a Google team member clarify the Gemini API Additional Terms for this specific design?

  1. The terms say Gemini API is for developers building for professional or business purposes, “not for consumer use.” Does that prohibit a consumer of a third-party app from supplying their own Gemini API key for personal meal tracking, even if the app developer built the integration professionally?
  2. If BYOK is permitted, must each user’s key come from a Cloud project with active billing when they use the app in the EEA, UK, or Switzerland? Is the relevant region the user’s physical location, residence, or App Store storefront?
  3. Does Google’s guidance against exposing API keys client-side also rule out user-supplied keys stored in Keychain and used on their own device, or is there an approved pattern for this?
  4. Is there a no-cost official channel for a written terms clarification if this forum is not the right place?

We are holding the BYOK feature until we understand the answer. Thank you.

Mahmoud Metwally

Hello @Mahmoud_Metwally,

We can’t provide specific legal guidance on this forum. Please refer to the documents below: