When you send an image to the Gemini image API, that image leaves your machine and is processed on Google's cloud infrastructure. Understanding exactly what Google does with your prompts and images is essential for any developer building with the Gemini image API, especially when handling sensitive or proprietary visual data. This guide explains the privacy terms, the distinction between Paid Services and Unpaid Services, and how to keep your data practices aligned with Google's policies.
What Google Does with Your Data: Unpaid Services vs. Paid Services
Google's Gemini API Additional Terms of Service draw a clear line between Unpaid Services and Paid Services. This distinction directly affects how your images and prompts are used.
Unpaid Services: Data Used for Product Improvement
The Gemini API terms define Unpaid Services as any Services that are offered free of charge, including direct interactions with Google AI Studio and unpaid quota in Gemini API. When you use Unpaid Services, Google uses the content you submit—including images and prompts—and any generated responses to provide, improve, and develop Google products and services and machine learning technologies, consistent with Google's Privacy Policy. Human reviewers may read, annotate, and process your API input and output to help with quality. Google states that it takes steps to protect your privacy in this process, including disconnecting this data from your Google Account, API key, and Cloud project before reviewers see it. The terms explicitly warn: "Do not submit sensitive, confidential, or personal information to the Unpaid Services."
Paid Services: No Training on Your Data
A Service is considered a Paid Service when it is offered for a fee. Your access to Gemini API is a Paid Service only when you access the API through a Cloud Project associated with an active billing account. In this case, Google does not use your prompts (including associated system instructions, cached content, and files such as images, videos, or documents) or responses to improve our products, and processes them in accordance with the Data Processing Addendum for Products Where Google is a Data Processor. Google may log prompts and responses for a limited period of time, solely for detecting and preventing violations of the Prohibited Use Policy to maintain the safety and security of the Services, and any required legal or regulatory disclosures. This logging is not for product improvement.
Key takeaway: If you are building a production application with the Gemini image API and care about data privacy, you should use a Paid Service. The Unpaid Services tier is not appropriate for sensitive or confidential images.
Practical Implications for Image Editing with Gemini
When you edit images with Gemini using the API, your original image and the edited output are processed in the cloud. This has several practical implications:
- Data residency for logs: For Paid Services, logged prompts and responses may be stored transiently or cached in any country in which Google or its agents maintain facilities. The terms do not guarantee data residency in a specific region.
- Retention for Paid Services: Logs are kept only for a limited period, solely for detecting and preventing violations of the Prohibited Use Policy and maintaining service safety and security. Unpaid Services data may be used longer for product improvement.
- Grounding with Google Search: When using this feature, Google stores prompts, contextual information, and output for thirty (30) days for the purposes of creating Grounded Results and Search Suggestions, and the stored information can be used for debugging and testing of systems that support Grounding with Google Search. This applies even to Paid Services, where such processing is handled in accordance with the Data Processing Addendum.
Before sending proprietary images to the Gemini image API, review your organization's data handling policies and confirm whether the Paid Service terms meet your requirements.
Setting Up the Gemini Image API: Environment Variables and Authentication
To call the Gemini image API, you need an API key obtained from Google AI Studio. Both Google's documentation and the Nano Banana FAQ recommend setting the key as an environment variable, either GOOGLE_API_KEY or GEMINI_API_KEY, in your terminal. This keeps your key out of your source code.
The Nano Banana FAQ also notes that the maintained request format is shown in Google's image-generation documentation, which you should consult for the latest request structure, model IDs, and supported parameters rather than relying on third-party examples. For a full walkthrough, see the Nano Banana Quickstart Guide.
Common Errors and How to Handle Them
When working with the Gemini image API, you may encounter errors that can arise from incorrect authentication, account configuration, or policy enforcement. The official Gemini API terms do not list specific error codes, but Google's API documentation provides troubleshooting guidance. For practical advice on alternative workflows when cloud API access is constrained, refer to our article on running AI models locally.
Cloud API vs. Local Open-Weight Models
It is important to distinguish between the hosted Gemini image API and local open-weight models. The Gemini image API is a cloud service: your images are processed on Google's servers, and you cannot run the model offline. The Nano Banana FAQ explicitly notes that the Nano Banana 2 model (Google's Gemini 3.1 Flash Image) cannot be downloaded or run offline; only a client that sends requests to Google's API can run on your machine.
In contrast, open-weight models can be run entirely on your own hardware, which may be preferable for air-gapped or privacy-sensitive environments. The Nano Banana FAQ points to its Hardware Guide for alternative models including Z-Image, Qwen-Image, and HunyuanImage. If your priority is data privacy and you cannot use a Paid Service tier, consider using a local open-weight model. For guidance on hardware and setup, see our guide to running models locally.
Conclusion
When using the Gemini image API, always check the current Gemini API Additional Terms and choose the appropriate service tier for your data sensitivity. For production use, the Paid Service tier offers stronger privacy guarantees because Google does not use your prompts or responses to improve its products. For absolute data control, local open-weight models remain the only option. By understanding these boundaries, you can make an informed decision about whether the Gemini image API is right for your project.