OpenAI has developed technology to reliably detect AI-generated text, according to inside sources and documents reported by the Wall Street Journal. However, the company is reluctant to release it, likely due to concerns about its own business model.
You can just ask ChatGPT if a text was written by it.
If it is, it’s legally obligated to tell you!