Overview
Agent Human uses simple API key authentication. Include your API key in thex-api-key header with every request - that’s it!
Authentication Method: API Key (Header-based)Supported Endpoints: All REST API endpoints (
/v1/*)Security: Keys are encrypted in transit via HTTPS
Quick Setup: Get your API key from the dashboard, add it to your environment variables, and start building in minutes.
Getting Your API Key
- Sign in to your account at app.agenthuman.com
- Navigate to Settings → API Keys
- Click “Create New API Key”
- Give your key a descriptive name
- Copy and securely store your key
How to Authenticate
Include your API key in thex-api-key header with every request:
Environment Variables
For security, store API keys in environment variables:Security Best Practices
Do’s ✅
- Store API keys in environment variables or secure key management systems
- Use different keys for different environments (development, staging, production)
- Rotate keys regularly
- Monitor key usage for unusual activity
- Revoke compromised keys immediately
Don’ts ❌
- Hard-code API keys in your source code
- Commit API keys to version control
- Share API keys via email or chat
- Use API keys in client-side JavaScript
- Log or display API keys in error messages
Key Management
Rotating Keys
Regularly rotate your API keys for enhanced security:- Create a new API key
- Update your application to use the new key
- Test thoroughly
- Delete the old key
Revoking Keys
If a key is compromised:- Sign in to your account immediately
- Navigate to Settings → API Keys
- Find the compromised key
- Click “Delete” to revoke it instantly
- Create a new key if needed
Error Responses
Invalid API Key
401 Unauthorized
Missing API Key
401 Unauthorized
Deactivated Key
401 Unauthorized
Most
/v1/* endpoints return errors as { "success": false, "error": { "message": "...", "suggestion": "..." } }, but authentication failures return an error string as shown above.Testing Authentication
Using the API Playground
The easiest way to test your API key is using the built-in API Playground:- Navigate to any API endpoint documentation page
- Look for the “API Playground” section
- Enter your API key in the x-api-key field
- Fill in any required parameters
- Click “Send Request” to test the endpoint
The API Playground will automatically include your API key in all requests once entered.
Manual Testing
You can also test your API key with these simple requests:Need Help?
If you’re having authentication issues:- Verify your API key is correct and hasn’t been revoked
- Check that you’re using the correct header name (
x-api-key) - Ensure you’re using HTTPS for all requests
- Contact support at [email protected] if issues persist