That doesn't sound right to me. If it's a derivative work I can still assert copyright over the modifications I have made, but not over the original material.
In this case the majority of the work was done by another company on your instruction. When you signed up was there anything in the terms that said you get ownership over the output?
You're right that derivative works are copyrightable. I got that wrong.
I think you can claim the prompt itself. But you didn't create the new code. I'd argue copyright belongs to the original author.