OpenAI
Connect your OpenAI account to Memex for AI-powered API access and operations.
What is OpenAI?
OpenAI is the company behind GPT models, DALL-E, and other powerful AI systems. When you connect OpenAI to Memex, you can access OpenAI's APIs to generate text, create images, and leverage AI capabilities directly through natural conversation.
Published apps use your API key
If you publish a Memex app that uses this connector, visitors to your app will make requests using your API key. You will be billed by OpenAI for all usage.
What You'll Need
To connect OpenAI to Memex, you'll need an API key from your OpenAI account:
OPENAI_API_KEY
Your OpenAI API key for authentication
sk-proj-...
Creating an API Key
Step 1: Access the OpenAI Platform
Go to platform.openai.com
Sign in to your OpenAI account (or create one if you don't have one)
Step 2: Set Up Billing
Before you can use the API, you'll need to set up billing:
Click on Settings in the left sidebar
Select Billing
Click Add payment method and enter your payment details
Add credits to your account (minimum $5)
Billing is Required: OpenAI uses a prepaid billing model. You must add credits to your account before you can use the API. Without billing set up, your API key won't work.
Step 3: Navigate to API Keys
Click on API keys in the left sidebar (or go directly to platform.openai.com/api-keys)
You'll see a list of your existing API keys (if any)
Step 4: Generate a New Key
Click Create new secret key
Enter a Name for your key (e.g., "Memex Access")
Optionally, select a Project to associate the key with
Click Create secret key
Step 5: Copy Your Key
Copy your key immediately! OpenAI only shows the key once. If you lose it, you'll need to generate a new one.
Connecting to Memex
Open the Memex Hub from the sidebar
Click on the Connectors tab
Click on the OpenAI card
Enter a Connection Name (e.g., "My OpenAI Account")
Paste your OPENAI_API_KEY
Click Add Connection
Your OpenAI account is now connected! Memex can access it across all your conversations.
Verifying Your Connection
After connecting, try asking Memex:
If Memex returns a list of models like GPT-4 and GPT-3.5-turbo, your connection is working correctly.
Building Apps with Your Connection
Use your OpenAI connection to build AI-powered applications:
Security Considerations
Protecting Your API Key
Your key is stored securely in Memex's encrypted storage
Never share your API key publicly or commit it to a repository
Never hardcode your API key in application code
Use environment variables when building applications
Key Rotation
Rotate your API keys periodically for better security
If you suspect a key has been compromised, delete it immediately and create a new one
OpenAI allows you to have multiple active keys, making rotation seamless
Revoking Access
If you need to revoke Memex's access:
Delete the connection in Memex Hub
Click the trash icon next to the key you created for Memex
If you suspect your API key has been compromised, delete it immediately in your OpenAI settings and create a new one. Compromised keys can result in unexpected charges.
Troubleshooting
You can ask the Memex agent to help troubleshoot, but here are a few common problems:
"Invalid API key" Error
Verify you copied the entire key without extra spaces
Check that the key hasn't been deleted in your OpenAI settings
Ensure you're using a key with the correct format (
sk-proj-...)
"Insufficient quota" Error
Check your billing settings at platform.openai.com/settings/organization/billing
Add more credits to your account if your balance is low
Verify that your payment method is valid and not expired
"Rate limit exceeded" Error
Wait a moment and try again
Consider spreading requests over time
Check your current rate limits in your OpenAI dashboard
"Model not found" Error
Verify you have access to the model you're trying to use
Some models require special access or are in limited beta
Check the OpenAI models documentation for availability
Learn More
Last updated
Was this helpful?