How to Create API Keys
Last updated
Last updated
To integrate OpenAI or Anthropic models into your workspace, you will need an API key for each service. Below are the steps to generate API keys from both OpenAI and Anthropic, along with important billing and usage considerations.
Step 1. Account Setup
Visit OpenAI's platform and create an account or sign in with existing credentials.
If you're a new user, verify your account through the confirmation email that OpenAI sends.
Step 2. Generating the API Key
Once logged in, click on your profile icon in the top-right corner of the page.
Select "Dashboard" from the dropdown menu.
In the left-hand menu, click "API Keys."
Click "Create new secret key."
Important: Copy and save the key immediately, as it will not be visible again after you close the window.
Step 3. Important Setup Steps
Billing: Navigate to the Billing section to configure your billing preferences and set usage limits to manage monthly expenses.
Usage Limits: Ensure you set a cap on your API usage to avoid unexpected costs.
Terms of Service: Review OpenAI’s usage policies and terms of service to understand compliance requirements.
Step 1. Account Setup
Visit Anthropic's console and either create a new account or sign in using Google authentication for a quick login.
Step 2. Generating the API Key
Once logged in to the dashboard, click on "Settings" on the top menu, and then "API Keys" on the left menu.
Click the orange "Create Key" button.
Provide a name for the key (e.g., the project name it will be used for).
Important: Copy and securely store the key immediately, as it won’t be visible again after you close the window.
Step 3. Usage and Billing
Billing Configuration:
New accounts may receive initial credits for testing purposes.
You'll need to provide a phone number to claim these credits.
Without credits, you will need to select a payment plan:
Build: The standard self-service plan.
Scale: An enterprise plan requiring sales team contact.
Rate Limits: The API is subject to rate limits, measured by requests per minute, tokens per minute, and tokens per day. Exceeding these limits will result in a 429 error.
Pricing: Anthropic operates on a prepaid credit system. Costs vary based on the complexity of each API call.
Ensure your API keys are stored securely, as you won’t be able to view them again after initial generation.
Review both OpenAI and Anthropic’s usage policies, rate limits, and billing options to manage costs effectively.
Be aware of rate limits and configure usage to avoid exceeding limits, which can disrupt your service.