Skip to main content

API Key Authentication

Agentbase uses API keys to authenticate requests. All API requests must include a valid API key in the Authorization header.

Getting Your API Key

1

Sign Up

Create an account at base.agentbase.sh/sign-up
Use your work email to get free credits automatically!
2

Access Dashboard

Log in to your dashboard at base.agentbase.sh
3

Copy API Key

Find your API key in the dashboard under Settings or API Keys

Using Your API Key

Include your API key in the Authorization header:

Security Best Practices

Don’t do this:
Do this instead:
Why: Committing API keys to version control exposes them to anyone with repository access.
Store API keys in environment variables:
Note: Add .env to your .gitignore file.
Rotate your API keys periodically:
1

Create New Key

Generate a new API key in the dashboard
2

Update Applications

Update all applications to use the new key
3

Test Thoroughly

Verify all integrations work with the new key
4

Revoke Old Key

Once confirmed, revoke the old API key
Recommended schedule: Every 90 days or when team members leave
Never expose API keys in client-side code:
Instead, proxy through your backend:
Regularly review API usage in your dashboard:
  • Check for unexpected spikes
  • Monitor cost trends
  • Review active sessions
  • Identify anomalies
Set up alerts for unusual activity:
  • Sudden usage increases
  • Cost threshold exceeded
  • Failed authentication attempts

Error Handling

Handle authentication errors gracefully:

Common Errors

Rate Limiting

Agentbase implements rate limiting to ensure fair usage:
  • Rate limits are applied per account
  • Limits vary by account tier
  • Headers include rate limit information:
Handling rate limits: