Go to OpenAI and sign in our create an account.
- go to https://platform.openai.com/settings/organization/general
- In the top-left of the page-header, select "Personal" as you Organization
- optional: create a new project "advanced_text_analysis_gesis" as shown below.
- Go to the Billing in the menu on the left (under "Organzation")
- Click on "Add payment details" and link a credit card
- In the Configure payment pop-up (or by clicking "Add to credit balance"), add some credit, e.g., U.S.$ 10
<img src="./imgs/openai_project_create_new.png", alt="Step 2.3" style="width:400px;"/>
<img src="./imgs/openai_billing_overview.png", alt="Step 2.4 and 2.5" style="width:400px;"/>
<img src="./imgs/openai_billing_configure_payment.png", alt="Step 2.6" style="width:400px;"/>
- Go to the API keys page.
- Create a new API key by clicking on the "Create new secret key" button.
- Fill your information in the form shown below and click on the "Create secret key" button.
IMPORTANT — Make sure you take the step next to store the API key in a safe place. This will be the only time you will be able to see your API key.
- Create a file called
.env
in the root of your project folder. (It's important that the file name starts with a dot!) - Open it in a text editor
- Now,
- add
OPENAI_API_KEY=
in the first line of the file, - copy your API key from your browser window,
- paste the key in your
.env
file behind the=
- save the file and close it
- add
Run the code in notebook test_openai_key.ipynb to verify that your API key is accessible in VS Code and your API access works.