Skip to main content

API Authentication

All GigaReels API requests require authentication using API keys. This guide covers authentication methods, security best practices, and troubleshooting.

Authentication Methods

Bearer Token

Standard HTTP Bearer authentication (recommended)

CLI Authentication

Automatic credential management for development

Bearer Token Authentication

Request Format

Include your API key in the Authorization header:

SDK Implementation

The SDK handles authentication automatically:

API Key Management

Getting Your API Key

  1. Log in to your GigaReels Dashboard
  2. Navigate to Settings β†’ API Keys
  3. Click Generate New API Key
  4. Copy and securely store your API key
Security: API keys provide full access to your account. Never share them publicly or commit them to version control.

Key Properties

string
required
Your unique API key from the dashboard
string
Always starts with giga_ followed by 32 alphanumeric characters
string
Full access to all API endpoints and features
string
API keys do not expire but can be revoked from the dashboard

CLI Authentication

Login Process

The CLI authentication flow:
1

Browser Authentication

CLI opens your browser to the GigaReels authentication page
2

Account Verification

Log in with your existing account or sign up for a new one
3

API Key Generation

System automatically generates an API key for CLI use
4

Local Storage

Credentials are stored in ~/.gigareels/credentials.json

Checking Authentication Status

Logout

Authentication Errors

Common Error Responses

Cause: Invalid or missing API key
Solutions:
  • Verify your API key is correct
  • Check the Authorization header format
  • Regenerate your API key if compromised
Cause: Valid API key but insufficient permissions
Solutions:
  • Check your account subscription level
  • Verify the endpoint requires the permissions you have
  • Contact support if you believe this is an error
Cause: Rate limit exceeded
Solutions:
  • Implement exponential backoff in your requests
  • Check your rate limits in the dashboard
  • Consider upgrading your plan for higher limits

Security Best Practices

API Key Security

πŸ”’ Storage

  • Store in environment variables - Use secure secret management systems - Never commit to version control - Rotate keys regularly

🌐 Network Security

  • Always use HTTPS - Validate SSL certificates - Use proper CORS settings - Implement request timeouts

🚨 Monitoring

  • Monitor for unusual usage patterns - Log authentication failures - Set up alerts for suspicious activity - Track API key usage in dashboard

πŸ”„ Rotation

  • Rotate keys every 90 days - Generate new keys before travel - Revoke unused or compromised keys - Use separate keys per environment

Environment Variables

Set up secure environment variable management:

Request Security

Implement secure request patterns:

Rate Limits

Default Limits

Rate Limit Headers

API responses include rate limit information:

Handling Rate Limits

Testing Authentication

Test Script

CLI Testing

Migration Guide

From v1 to v2 Authentication

If you’re upgrading from an older version:

Credential Migration

Troubleshooting

  1. Verify the key format starts with giga_
  2. Check for extra spaces or characters
  3. Ensure you’re using the correct environment
  4. Try generating a new API key
  1. Clear existing credentials: npx @gigareels/sdk logout 2. Try logging in again: npx @gigareels/sdk login 3. Check your internet connection 4. Try using --local flag for development
  1. Verify you can reach https://gigareels.com
  2. Check firewall and proxy settings
  3. Ensure SSL certificates are valid
  4. Try a different network connection

Next Steps

1

Get Your API Key

Generate an API key from the GigaReels dashboard
2

Set Up Environment

Configure environment variables for secure key storage
3

Test Authentication

Verify your setup with a simple API call
4

Implement Security

Add proper error handling and security measures

Ready to Make API Calls?

Continue to the Render API Reference to start generating content.