-
Book Overview & Buying
-
Table Of Contents
Python Automation Cookbook - Third Edition
By :
For most of our recipes, we will use OpenAI models. We need to set up an API key to allow connecting to their services. You'll need to set up an account capable of calling their API by going to https://platform.openai.com/ and creating an account.
You'll need to go to Billing and add your payment details.

Figure 11.1: Enter your payment details
Note that this is independent of your ChatGPT account. You may have a paying ChatGPT account and not be able to make API calls.
After you set some credit (for example, $10), you'll see your credit reflected on the page.

Figure 11.2: After setting your details and purchasing some credit
Monitor your expenses on the https://platform.openai.com/settings/organization/usage page.
Go to https://platform.openai.com/settings/organization/api-keys and create a key with all permissions. Store the key safely to be used later. You won't be able to see the key again, but if you lose it, you can cancel it and create...