This website will show how to get the API Key: https://www.onmsft.com/how-to/how-to-get-an-openai-api-key/
Then download the game from this itch.io page. When you run it there will be an option on the main menu to copy/paste the API key into the game. If no dialog is generated you'll need to add a billing option under your account in the openai site.
I hope that helps!