API Keys

Generate API keys for unlimited MCP access in Cursor IDE, Claude Desktop, and programmatic API calls.

Overview

Free users: MCP works without API keys - get 3 free recommendations per day instantly.

Pro users: Generate API keys for unlimited recommendations + programmatic access.

With API Key (Pro):

  • Unlimited MCP recommendations
  • Unlimited API calls
  • Track usage in your dashboard
  • Revoke access anytime
  • 5 keys for different projects

Without API Key (Free):

  • 3 recommendations/day via MCP (IP-based)
  • 10 recommendations/month on web app
  • ⚠️ No API key generation
  • 📈 Upgrade to Pro for unlimited

Getting Started

Free Tier (No API Key Needed)

Use ArchitectGBT MCP immediately - no signup, no configuration:

npx -y architectgbt-mcp

You'll get 3 free recommendations per day. Perfect for trying it out!

Pro Tier (Unlimited with API Key)

  1. Upgrade to Pro
  2. Generate API key (instructions below)
  3. Set environment variable
  4. Get unlimited recommendations

Generating API Keys

1. Upgrade to Pro

API key generation is a Pro feature. If you're on the free tier:

  1. Go to Pricing
  2. Choose Pro plan ($15-29/month)
  3. Complete checkout
  4. Return to Settings → API Keys

2. Navigate to Settings

  1. Sign in to architectgbt.com
  2. Go to your Dashboard
  3. Click Settings in the navigation
  4. Select API Keys tab 4

3. Create New Key

  1. Click "Generate New API Key"
  2. (Optional) Give it a descriptive name
    • Example: "Cursor IDE"
    • Example: "Production Server"
  3. Click Generate

3. Copy Your Key

⚠️ Important: The full key is shown only once!

agbt_1a2b3c4d5e6f7g8h9i0j1k2l3m4n5o6p

Copy it immediately and store securely.

Using API Keys

MCP Integration (Cursor/Claude)

Set as environment variable:

Windows (PowerShell):

$env:ARCHITECTGBT_API_KEY = "agbt_your_key_here"

macOS/Linux:

export ARCHITECTGBT_API_KEY=agbt_your_key_here

Make it permanent:

  • Windows: System Properties → Environment Variables
  • macOS/Linux: Add to ~/.bashrc or ~/.zshrc

Then restart your IDE.

Direct API Calls

Include in Authorization header:

curl -X POST https://architectgbt.com/api/recommend \
  -H "Authorization: Bearer agbt_your_key_here" \
  -H "Content-Type: application/json" \
  -d '{
    "prompt": "Recommend a model for building a chatbot"
  }'

Response:

{
  "success": true,
  "recommendations": [...],
  "estimatedCost": "$0.50/1M tokens"
}

Managing API Keys

View Active Keys

In your dashboard, you'll see:

  • Key prefix: agbt_abc... (first 8 chars)
  • Name: Your custom label
  • Created: When key was generated
  • Last used: Most recent usage
  • Usage count: Total requests made

Revoke Keys

To deactivate a key:

  1. Click Revoke next to the key
  2. Confirm deletion
  3. Key is immediately invalidated

Use cases for revocation:

  • Key was leaked/exposed
  • No longer using that integration
  • Rotating keys for security
  • Decommissioning a project

Security Best Practices

1. Never Commit Keys

❌ Don't:

# .env
ARCHITECTGBT_API_KEY=agbt_abc123...  # Don't commit this!

✅ Do:

# .env.example
ARCHITECTGBT_API_KEY=your_key_here

# Add .env to .gitignore

2. Use Environment Variables

Store keys in environment, not code:

// ❌ Don't hardcode
const apiKey = "agbt_abc123...";

// ✅ Use environment
const apiKey = process.env.ARCHITECTGBT_API_KEY;

3. Rotate Regularly

For production use:

  • Generate new key monthly/quarterly
  • Update environment variables
  • Revoke old key

4. Limit Scope

Create separate keys for:

  • Development environment
  • Staging environment
  • Production environment
  • Personal use (Cursor IDE)

This way you can revoke one without affecting others.

5. Monitor Usage

Check your dashboard regularly:

  • Unexpected usage spikes
  • Unauthorized access attempts
  • Keys not being used (revoke them)

Key Limits

  • Maximum keys per user: 5
  • Key format: agbt_ + 32 alphanumeric characters
  • Storage: SHA-256 hashed (never plain text)
  • Validity: Forever (until revoked)

API Endpoints

List Keys

GET /api/api-keys
Authorization: Bearer <clerk_session_token>

Create Key

POST /api/api-keys
Authorization: Bearer <clerk_session_token>
Content-Type: application/json

{
  "name": "My Key Name"
} & Quotas

### Anonymous (No Account, No API Key)
- **3 requests/day** via MCP
- **IP-based** rate limiting
- Resets every 24 hours
- Perfect for trying out the service

### Free Account (Web App Only)
- **10 requests/month** on architectgbt.com
- MCP stays at **3/day** (anonymous)
- Cannot generate API keys
- [Upgrade to Pro](/pricing) for unlimited

### Pro Account (With API Key)
- ✅ **Unlimited MCP recommendations**
- ✅ **Unlimited web app usage**
- ✅ **Unlimited API calls**
- ✅ Up to 5 API keys
- No daily/monthly
With API key authentication:
- ✅ **Unlimited MCP recommendations**
- ✅ **Unlimited API calls**
- ✅ Credits only deducted for architecture generation

Without API key (anonymous):
- ⚠️ **3 recommendations per day**
- Based on IP address
- Use API key to remove limits

## Troubleshooting

### "Invalid API Key"

**Possible causes:**
1. Key was revoked
2. Typo in the key
3. Missing `Bearer` prefix in API calls
4. Key not set in environment variable

**Solutions:**
- Verify key in dashboard
- Check for extra spaces/characters
- Generate new key if lost

### "Rate Limit Exceeded" (with API key)

This shouldn't happen! Contact support:
- 📧 support@architectgbt.com
- Include your user ID (not the key!)

### Environment Variable Not Loaded

**Verify it's set:**
```bash
# Windows
echo $env:ARCHITECTGBT_API_KEY

# mUpgrading from Free to Pro

Already using MCP anonymously? Here's how to upgrade:

### Before (Free):
```bash
# No configuration needed
npx -y architectgbt-mcp
# Gets 3 recommendations/day

After (Pro):

  1. Upgrade to Pro ($15-29/month)
  2. Generate API key in Settings
  3. Set environment variable:
    $env:ARCHITECTGBT_API_KEY = "agbt_your_key_here"
    
  4. Restart Cursor/Claude
  5. Now unlimited! 🚀

Your prompts stay the same - just more capacity

Already using anonymous MCP? Upgrade to API key:

  1. Generate API key in dashboard
  2. Set environment variable
  3. Restart Cursor/Claude Desktop
  4. Continue using - now with unlimited access!

No changes to your prompts needed.

Next Steps