Hallucination is a good word for this and puts into language something I was thinking about how ChatGPT can "fool" us. One of the dangers of ChatGPT is that it can convincingly imitate the stylistic conventions of whatever it is you are asking for, without any attendant content.