Setting up API Keys

Required for all Motte tools

API keys are required to use Motte's AI capabilities. This guide will help you obtain and configure them.

Required API Keys

OpenAI API Key

Required

Used for GPT models, embeddings, and fine-tuning. Required for MotteRL, MotteMB, and general AI operations.

  1. Visit platform.openai.com/api-keys
  2. Sign in or create an account
  3. Click "Create new secret key"
  4. Copy the key (starts with sk-)

Anthropic API Key

Optional

Access to Claude models for advanced reasoning and analysis tasks.

  1. Visit console.anthropic.com
  2. Create an account and verify your email
  3. Go to API Keys section
  4. Generate a new API key

Supabase Keys

Required for MotteMB

Database and vector storage for MotteMB memory management.

  1. Visit supabase.com/dashboard
  2. Create a new project
  3. Go to Settings → API
  4. Copy the URL and anon key

Security Best Practices

  • Never share your API keys publicly or commit them to version control
  • Use environment variables to store keys securely
  • Regularly rotate your API keys
  • Monitor your API usage and set up billing alerts
  • Use the principle of least privilege - only grant necessary permissions

Environment Variables

Create a .env.local file in your project root with the following variables:

# Environment Variables
# Required
OPENAI_API_KEY=sk-...

# Optional but recommended
ANTHROPIC_API_KEY=sk-ant-...
GROQ_API_KEY=gsk_...

# Required for MotteMB
NEXT_PUBLIC_SUPABASE_URL=https://xxx.supabase.co
SUPABASE_ANON_KEY=eyJ...
SUPABASE_SERVICE_ROLE_KEY=eyJ...

# Optional for advanced features
XAI_API_KEY=xai-...
DEEPINFRA_API_KEY=...

Verification

Test Your Configuration

Once you've set up your API keys, you can test them using the following methods:

Visit any Motte tool and try a basic operation
Check the browser console for any API key errors
Monitor your API provider dashboards for usage