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.

circle-exclamation

What You'll Need

To connect OpenAI to Memex, you'll need an API key from your OpenAI account:

Credential
Description
Example

OPENAI_API_KEY

Your OpenAI API key for authentication

sk-proj-...

circle-info

Key Format: OpenAI project keys use the prefix sk-proj-... which is the current default format when creating new keys.

Creating an API Key

Step 1: Access the OpenAI Platform

  1. 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:

  1. Click on Settings in the left sidebar

  2. Select Billing

  3. Click Add payment method and enter your payment details

  4. Add credits to your account (minimum $5)

circle-exclamation

Step 3: Navigate to API Keys

  1. Click on API keys in the left sidebar (or go directly to platform.openai.com/api-keysarrow-up-right)

  2. You'll see a list of your existing API keys (if any)

Step 4: Generate a New Key

  1. Click Create new secret key

  2. Enter a Name for your key (e.g., "Memex Access")

  3. Optionally, select a Project to associate the key with

  4. Click Create secret key

Step 5: Copy Your Key

circle-exclamation

Connecting to Memex

  1. Open the Memex Hub from the sidebar

  2. Click on the Connectors tab

  3. Click on the OpenAI card

  4. Enter a Connection Name (e.g., "My OpenAI Account")

  5. Paste your OPENAI_API_KEY

  6. 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:

  1. Delete the connection in Memex Hub

  2. Click the trash icon next to the key you created for Memex

circle-exclamation

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

"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

Learn More

Last updated

Was this helpful?