Authentication
GigaReels uses API keys to authenticate requests. You can get your API key from the dashboard or use our CLI for automatic authentication.CLI Authentication (Recommended)
The easiest way to authenticate is using the CLI login command:- Open your browser to the GigaReels authentication page
- Authenticate with your existing account or sign up
- Generate an API key automatically
- Store credentials locally in
~/.gigareels/credentials.json
Local Development
For local development, you can authenticate against a local server:http://localhost:3000 instead of the production server.
Check Authentication Status
You can check if you’re already authenticated:Manual API Key Authentication
For production applications, you should use manual API key authentication:1. Get Your API Key
- Go to your GigaReels Dashboard
- Navigate to Settings → API Keys
- Click Generate New API Key
- Copy your API key and store it securely
2. Initialize the Client
Environment Variables
For production applications, use environment variables to store your API key:Authentication Methods Comparison
- CLI Authentication
- Manual API Key
Pros:
- ✅ Automatic credential management
- ✅ Perfect for development
- ✅ Browser-based login
- ✅ No manual API key handling
- ❌ Not suitable for production servers
- ❌ Requires interactive login
SDK Initialization Patterns
Pattern 1: Auto-Detection
The SDK can automatically detect stored credentials:Pattern 2: Explicit Configuration
Pattern 3: Conditional Authentication
Authentication Errors
Common authentication errors and solutions:No API key provided
No API key provided
Error: Or provide an API key manually:
No API key provided and no stored credentials foundSolution:Invalid API key
Invalid API key
Error:
Invalid API key or 401 UnauthorizedSolutions:- Check your API key is correct
- Regenerate your API key in the dashboard
- Ensure you’re using the right base URL
Expired credentials
Expired credentials
Error:
Authentication expiredSolution: Re-authenticate with the CLI:Security Best Practices
🔒 Secure Storage
- Never commit API keys to version control - Use environment variables for production - Rotate API keys regularly - Store keys in secure secret management systems
🛡️ Access Control
- Use separate API keys for different environments - Implement proper error handling - Monitor API key usage - Revoke unused API keys
🌐 Network Security
- Always use HTTPS - Validate SSL certificates - Implement request timeout - Use proper CORS settings
📝 Logging
- Log authentication events - Never log API keys - Monitor failed authentication attempts - Set up alerts for suspicious activity
Next Steps
Start Building
Explore the Render Types to start generating content
Need Help?
If you’re having trouble with authentication, check our troubleshooting
guide or contact albert@gigareels.com.