|
| 1 | +--- |
| 2 | +title: OpenAI |
| 3 | +--- |
| 4 | + |
| 5 | +*This tutorial provides step-by-step instructions on how to rotate an OpenAI API key.* |
| 6 | + |
| 7 | +--- |
| 8 | + |
| 9 | +## Generate a new OpenAI API key |
| 10 | + |
| 11 | +### Step 1 - Navigate to the API key page |
| 12 | + |
| 13 | +The API key page is located at https://platform.openai.com/api-keys. |
| 14 | + |
| 15 | + |
| 16 | +### Step 2 - Generate a new API key |
| 17 | + |
| 18 | +#### 2a. Click on the `Create new secret key` button |
| 19 | + |
| 20 | +Click the `Create new secret key` button underneath any existing API keys |
| 21 | + |
| 22 | + |
| 23 | +#### 2b. Configure the key |
| 24 | + |
| 25 | +Within the `Create new secret key` modal, there are two settings: an optional |
| 26 | +`Name` field and `Permissions`. Make any necessary modifications and click the |
| 27 | +`Create secret key` button. |
| 28 | + |
| 29 | + |
| 30 | +#### 2c. Copy the key |
| 31 | + |
| 32 | +Upon success, a `Save your key` modal will be displayed. Press the `Copy` button |
| 33 | +to place it on your clipboard. |
| 34 | + |
| 35 | + |
| 36 | +--- |
| 37 | + |
| 38 | +## Replace the original OpenAI API key |
| 39 | + |
| 40 | +Replace the original OpenAI API key with the new one in all impacted applications |
| 41 | +and services. |
| 42 | + |
| 43 | +--- |
| 44 | + |
| 45 | +## Revoke the original OpenAI API key |
| 46 | + |
| 47 | +### Step 1 - Navigate to the API key page |
| 48 | + |
| 49 | +The API key page is located at https://platform.openai.com/api-keys. |
| 50 | + |
| 51 | + |
| 52 | +### Step 2 - Revoke the OpenAI API key |
| 53 | + |
| 54 | +#### 2a. Start the revocation process |
| 55 | + |
| 56 | +Identify the API key to be revoked and click the trash can icon associated with |
| 57 | +it. |
| 58 | + |
| 59 | + |
| 60 | +#### 2b. Confirm the revocation |
| 61 | + |
| 62 | +Within the `Revoke secret key` modal, ensure the correct key is selected and |
| 63 | +click the `Revoke key` button. |
| 64 | + |
| 65 | + |
| 66 | +--- |
| 67 | + |
| 68 | +## Resources |
| 69 | +- [OpenAI's API help page](https://help.openai.com/en/collections/3675931-api) |
| 70 | +- [OpenAI's Best Practices for API Key Safety](https://help.openai.com/en/articles/5112595-best-practices-for-api-key-safety) |
0 commit comments