If you don’t take advantage of the upgrade process first, this registration will never happen. There’s no way to enter a Windows 7 or 8.1 key into the Windows 10 installer, nor is there some sort of web form that will give you a Windows 10 key if you provide
your Windows 7 or 8.1 key. Sorry — you’ll have to upgrade to Windows 10 before you can perform a clean install.
If you need to upgrade, you can download Microsoft's Windows 10 media creation tool and tell it to “Upgrade this PC now.” It will automatically upgrade you to Windows 10 if your PC is running a genuine version of Windows 7 or Windows 8.1.