It appears that the US and Europe have 2 different ways of handling this, and apparently totally opposite.
The way things stand now, in the US, the program that made the image can not copyright the image. The image itself apparently can also not be copyrighted because it was not made by a human.
U.S. Copyright Office Says AI-Generated Images Do Not Qualify For Copyright Protection
Since it is not your program, you haven't bought it or created it, there are probably terms of service which have somehow become legal instruments that can govern how the users of the software can use the results. It may not be legal but a court would have to answer that question.
There are legal cases waiting to be resolved where the owners of the original art that was sampled (and originally copied to obtain the use of) are suing makers of the AI generated image software because the original owners never gave their permission for the artwork to be used.
Getty Images is suing the creators of AI art tool Stable Diffusion for scraping its content.
That probably stems from the terms of service agreements that handled the posting of the original images. The digital generation's (no age limits) answer to this is that if it ain't nailed down, it's free to take. (see fakebook for how this is used to make money)
I don't expect it to stay like this for 2 reasons.
1) The corporations that will be creating and using AI generators to create corporate work will not be happy if they can't control the process or own the results.
2) The US courts no longer make decisions based on modern precedent, or even existing precedent, which means anything goes.
Most people don't seem to understand that copying an image posted on the internet without permission from the owner is copying an image without permission from the owner.
This apparently is Europe's take on the issue:
‘In the case of a literary, dramatic, musical or artistic work which is computer-generated, the author shall be taken to be the person by whom the arrangements necessary for the creation of the work are undertaken.’ — Section 9(3) CDPA 1988.
The article then goes on to say:
As far as AI is concerned, the question of authorship/ownership of AI generated work will hopefully be resolved in the next few years in the UK, which last year (2021?) published its National AI Strategy.
"In the meantime, disputes arising from computer generated works in the UK from software/‘AI’ — such as Stable Diffusion or DALL-E — will need to be assessed on a case-by-case basis and will likely depend on the level of contribution of each of the parties in the creation of the work."
They do have some advice which seems to go under the heading of don't ask, don't tell,
"Consider not using any artist’s name or work in the generation of artwork — especially where their work is still under copyright protection. Without knowing the specifics of the tools and prompts used, it’s difficult to give a definitive answer on whether using the style of an artist would be considered an infringement of their rights — but it may nevertheless annoy said artist and result in unwanted bad press and/or infringement proceedings."
If the book cover is for a digital only book, it will be very simple to change the image if things don't go your way. If it is a hard cover book being printed in advance, changing the image could be a problem.
I would assume that some people are creating AI generated images and simply saying that they made the image. Problem solved.