What you’ve described is allowed, but you need to make sure your users follow OpenAI guidelines as you’re responsible for what’s sent via your API key…
This is a great place to get more information…
If you search the forums a bit, you should find a lot of other similar projects.