Imagine GPT 3.5/4 being a sort of black boxes. If you use them via API keys, you are just using their LLM service and they do not store inputs / outputs in any database. (https://openai.com/enterprise-privacy#our-commitments)
But if you use there interface of ChatGPT, they store both inputs as well as outputs and use it to train their models.
But if you use there interface of ChatGPT, they store both inputs as well as outputs and use it to train their models.