Best Practices for API Key Management
Before you start obtaining keys for AI models, here are some best practices you should follow for managing your API keys.- Treat API Keys Like Passwords: They grant access to your account and billable services. Keep them confidential and secure. Do not share publicly.
- Rotate Keys Regularly: For enhanced security, consider regenerating your API keys periodically.
- Monitor Your API Usage: Keep an eye on your API usage dashboards provided by the AI model provider. This helps you track costs, stay within quotas, and detect any unauthorized activity.
- Understand Pricing and Quotas: Be aware of the pricing model, free tiers, rate limits, and usage quotas associated with each API to avoid unexpected charges or service disruptions.
- Revoke Unused or Compromised Keys: If a key is no longer needed or you suspect it has been compromised, revoke or delete it immediately from the provider’s dashboard.
OpenAI API Key
If you don’t have an OpenAI account yet:- Go to OpenAI Platform and click ‘Sign up’ to create a new account, or ‘Log in’ if you’ve already started the process.
- After logging in, you might see a ‘Get Started’ button. Click it to proceed.
- On the next page, click the ‘Create an API key’ button.
- On the API keys page, click the ‘Create new secret key’ button, typically located on the top right.
- A dialog will appear. Give your API Key a descriptive name (e.g., “Geekflare Connect Integration”) and then click ‘Create secret key’.
- Your new API Key (also referred to as a Secret Key) will be generated and displayed only once. Click the ‘Copy’ button to copy the key. Important: Store this key securely immediately. You will not be able to view it again after closing this window.
If you already have an OpenAI account:
- Go to the OpenAI Platform and log in to your account.
- Once logged in, click on your personal icon (usually in the top right corner) and select ‘View API keys’ from the dropdown menu.
(Alternatively, you can often directly navigate to https://platform.openai.com/api-keys after logging in.)
- On the API keys page, click the ‘Create new secret key’ button, typically located on the top right.
- Give your API Key a descriptive name (e.g., “Geekflare AI Integration”) and then click ‘Create secret key’.
- Your new API Key (Secret Key) will be generated and displayed only once. Click the ‘Copy’ button to copy it. Important: Store this key securely immediately. You will not be able to view it again after closing this window.
Gemini API Key
This guide assumes you are signing in for the first time or creating a new project for your Gemini API key.- Go to Google AI Studio and sign in with your Google account.
- On the main page, look for and click the ‘Get API Key’ button, found at the bottom left of the page. This will take you to the API key management interface.
- Click the ‘Create API Key’ button.
- Gemini API keys are associated with Google Cloud Projects. You will be prompted to either import an existing project or create a new project. Select the ‘Create project’ option and give your new project a descriptive name.
- Once the project is created, your new API key will be displayed. Click the ‘Copy’ button next to the key.
Video Tutorial
Claude API Key
To integrate Anthropic’s Claude models with Geekflare Connect, you’ll need an Anthropic Claude API Key.- Go to the Claude Console page and sign up for a new account or log in if you already have one.
- On the left-hand navigation menu, click the ‘API Keys’ option OR ‘Get API Key’ button on the dashboard.
- On the API Keys page, click the ‘Create Key’ button.
- A dialog will appear asking for a key name. Give your API Key a descriptive name (e.g., “Geekflare AI Integration”) and then click ‘Add’.
- Your new API key will be generated and displayed only once. Click the ‘Copy’ button to copy the key.
DeepSeek API Key
- Go to DeepSeek API Platform
- Log in to your existing account. If you are visiting for the first time, you will need to sign up.
- From the left navigation sidebar, click ‘API Keys’. Then, on the API Keys page, click the ‘Create new API key’ button.
- Give your API Key a name (e.g., “Geekflare AI Integration”) and then click ‘Create API Key’.
- Your API key is created. Save the key securely for your use.
Video Tutorial
Grok API Key
- Go to the Grok API platform and login or sign up if you don’t have an account, yet.
- Click API → API Console login
- If you are a first time user, you will need to buy some credits. For this, click ‘purchase’ and complete the payment
- After purchasing credits, click the ‘API keys’ from the left menu and ‘Create API key’. Give a name to your key and the ‘Create API Key’ button.
- Your API key will be generated. Save your key securely as it cannot be retrieved in future from the Grok API portal.
Mistral API Key
- Visit the Mistral AI Console page and sign up/log in.
- Click ‘API Keys’
- Click ‘Create a new Key’
- Give a Key Name and an Expiration date if required
- Copy the Key and save it securely for future use.
Perplexity Sonar API Key
- Visit the Perplexity API Platform and sign up/login by clicking ‘Get Started’.
- Select ‘API Key Management’ from the left side menu.
- First click ‘Create an API group’.
- Give your Group Name, description, and your billing address
- Scroll down the page and click ‘Generate API Keys’