02. OpenAI API key issuance and testing
OpenAI API key issuance and setup
1) OpenAI API key issuance
Access to OpenAI API web site To.
Top right "Sign Up" Press Membership To. (If you are already signed up Press the "Log in" button to log in To.

Top right Set by pressing Setting Go to
Top right Set by pressing Setting Go to

left "Billing" From menu "Payment methods" Click Register a credit card To.

If you have registered a credit card, the registered credit card will appear in the list as below.

"Add to credit balance" Press the button to enter the US dollar (dollar) to use.

amount $5 You can add a booster. (In other words, the minimum payment amount $5 or higher must be paid)
After entering the amount "Continue" Press to proceed with payment.

Left "Limits" You can set the monthly usage on the tab.
"Set a month budge" : Specifies monthly usage. When this amount is reached, the API will stop using it without further billing.
"Set an email notification threshold" : You can specify the rate at which the email is sent. An email will be sent when this amount is reached.

Right Profile image click - "Your profile"

API Key Management Menu Access with.
"Create new secret key" Click.

Name and project Enter. (If you don't have a project you created separately, set up Default project)

Right "Copy" Press the button to copy the key.
caution!!!
When the key is leaked, someone else can use my API KEY to use GPT, and payments are made in my wallet.
never Keep the key in a safe place, not share it with others Do it! (I think it's a password)

2) .env File settings
To the project root directory
.envCreate a file..envTo fileOPENAI_API_KEY=Enter the key you just copied Press Ctrl + S to save and close the file.

Make sure API Key is set well.
Last updated