Visit https://platform.openai.com in your browser.
Log in using your existing OpenAI account. If you don’t have one, sign up using your email, Google, or Microsoft account.
Once logged in, click on your profile icon (top-right corner) and select "View API Keys" or go to **https://platform.openai.com/account/api-keys** directly.
Click on the "Create new secret key" button. A new key will be generated.
Copy the key and store it in a safe place (such as a password manager or .env
file). You won’t be able to view it again after closing the popup.