You can download the Windows 8.1 installation using the Media Creation Tool on the Official Microsoft page:

If your current computer is not supporting the Media Creation Tool, you can use the ISO downloads on that page.

Please make sure that you use the option Windows 8.1 not any other version or your key will not work.