Training, retention and review are three questions
Training is whether your content improves a model. Retention is how long it is stored. Review is whether a person may read it. Google’s terms for unpaid Gemini API services answer yes to training and to review. Groq’s data page answers the retention question (by default it does not retain customer data for inference requests, and Zero Data Retention can be enabled) and is silent on training.
On a router, the answer is the upstream provider’s
OpenRouter and Hugging Face pass your request to another company. OpenRouter lets you forbid routing to providers that may train on your data, with a separate switch for free models. With that switch off, fewer free endpoints may be available to you.
Paying usually changes the answer
On the Gemini API, content sent on the paid tier is not used to improve Google products. If the data matters, the price of privacy is the paid tier, not a different free one. For what you may build on each tier, see commercial use.