No, you cannot use a Windows 7 product key for Windows 8 or 8.1 installation.
No, you cannot use a Windows 7 product key for Windows 8 or 8.1 installation.
It isn't possible to apply the Windows 7 product key to Windows 8 or 8.1 since each version has its own requirements. Please be aware of this difference.