This guide will help you obtain all the necessary API keys and credentials for VideoGen Messenger.
You need at least ONE of these providers to generate videos:
How to Get:
- Visit Google AI Studio
- Sign in with your Google account
- Create a new project or select existing one
- Navigate to "API Keys" section
- Click "Create API Key"
- Copy the API key
Environment Variables:
GOOGLE_VEO_API_KEY=your_api_key_here
GOOGLE_VEO_PROJECT_ID=your_project_idPricing: Pay-per-use (varies by region and quality)
How to Get:
- Visit Runway
- Sign up for an account
- Navigate to Account Settings → API Keys
- Generate new API key
- Copy the API key
Environment Variables:
RUNWAY_API_KEY=your_api_key_herePricing: ~$0.05 per second of video (check current pricing)
How to Get:
- Visit Minimax
- Create an account
- Go to API section
- Generate API key
- Note your Group ID
Environment Variables:
MINIMAX_API_KEY=your_api_key_here
MINIMAX_GROUP_ID=your_group_idPricing: Most cost-effective option
How to Get:
- Visit AWS Console
- Create an account (requires credit card)
- Navigate to IAM → Users
- Create new user with programmatic access
- Attach policies:
AmazonS3FullAccessCloudFrontFullAccess(optional)
- Download credentials
Create S3 Bucket:
- Go to S3 console
- Click "Create bucket"
- Name it (e.g.,
videogen-messenger-videos) - Choose region (e.g.,
us-east-1) - Keep default settings
- Create bucket
Environment Variables:
AWS_REGION=us-east-1
AWS_ACCESS_KEY_ID=your_access_key
AWS_SECRET_ACCESS_KEY=your_secret_key
AWS_S3_BUCKET=your-bucket-namePricing:
- S3: ~$0.023/GB storage + $0.09/GB transfer
- CloudFront: ~$0.085/GB (first 10 TB)
If using Docker Compose (recommended), these are automatically configured:
- ✅ PostgreSQL (port 5432)
- ✅ Redis (port 6379)
- ✅ Elasticsearch (port 9200)
Environment Variables (pre-configured):
DATABASE_URL=postgresql://postgres:postgres@localhost:5432/videogen_messenger
REDIS_URL=redis://localhost:6379
ELASTICSEARCH_NODE=http://localhost:9200How to Get:
- Visit Azure Portal
- Create Azure account (free tier available)
- Search for "Content Safety"
- Create new resource
- Go to "Keys and Endpoint"
- Copy Key and Endpoint URL
Environment Variables:
AZURE_CONTENT_SAFETY_ENDPOINT=https://your-resource.cognitiveservices.azure.com/
AZURE_CONTENT_SAFETY_KEY=your_key_here
MODERATION_STRICTNESS=mediumPricing: Free tier: 5,000 transactions/month
How to Get:
- Visit Google Cloud Console
- Create new project
- Navigate to "APIs & Services" → "Credentials"
- Click "Create Credentials" → "OAuth client ID"
- Choose "Web application"
- Add authorized redirect URI:
http://localhost:3000/api/v1/auth/oauth/google/callback - Copy Client ID and Secret
Environment Variables:
OAUTH_GOOGLE_CLIENT_ID=your_client_id
OAUTH_GOOGLE_CLIENT_SECRET=your_client_secretHow to Get:
- Visit GitHub Settings
- Click "New OAuth App"
- Fill in application details
- Authorization callback URL:
http://localhost:3000/api/v1/auth/oauth/github/callback - Copy Client ID and generate Client Secret
Environment Variables:
OAUTH_GITHUB_CLIENT_ID=your_client_id
OAUTH_GITHUB_CLIENT_SECRET=your_client_secretHow to Get:
- Visit Sentry.io
- Sign up for free account
- Create new project (Node.js)
- Copy DSN from project settings
Environment Variables:
SENTRY_DSN=your_dsn_herePricing: Free tier: 5,000 errors/month
How to Get:
- In AWS Console, go to CloudFront
- Click "Create Distribution"
- Set origin to your S3 bucket
- Configure cache behaviors
- Copy Distribution Domain Name
Environment Variables:
AWS_CLOUDFRONT_DOMAIN=https://d123456789.cloudfront.net
AWS_CLOUDFRONT_DISTRIBUTION_ID=E1234567890ABCTo get started quickly, you only need:
# Database (Docker Compose handles this)
DATABASE_URL=postgresql://postgres:postgres@localhost:5432/videogen_messenger
REDIS_URL=redis://localhost:6379
ELASTICSEARCH_NODE=http://localhost:9200
# Security (auto-generated by setup script)
JWT_SECRET=<auto-generated>
JWT_REFRESH_SECRET=<auto-generated>
API_KEY_SALT=<auto-generated>
# At least ONE AI provider
GOOGLE_VEO_API_KEY=your_key
# OR
RUNWAY_API_KEY=your_key
# OR
MINIMAX_API_KEY=your_key
# AWS S3 (for video storage)
AWS_ACCESS_KEY_ID=your_key
AWS_SECRET_ACCESS_KEY=your_secret
AWS_S3_BUCKET=your-bucket# Content Moderation
AZURE_CONTENT_SAFETY_KEY=your_key
AZURE_CONTENT_SAFETY_ENDPOINT=your_endpoint# CDN
AWS_CLOUDFRONT_DOMAIN=your_domain
# OAuth
OAUTH_GOOGLE_CLIENT_ID=your_id
OAUTH_GITHUB_CLIENT_ID=your_id
# Monitoring
SENTRY_DSN=your_dsn| Service | Free Tier | Development Cost |
|---|---|---|
| Google Veo | No | ~$10-50/month (light testing) |
| Runway | No | ~$20-100/month |
| Minimax | No | ~$5-20/month |
| AWS S3 | 5GB free (12 months) | ~$1-5/month |
| PostgreSQL (Docker) | Free | $0 |
| Redis (Docker) | Free | $0 |
| Elasticsearch (Docker) | Free | $0 |
| Azure Content Safety | 5K free/month | $0-5/month |
| Sentry | 5K errors/month | $0 |
| Total | ~$36-180/month |
-
Never commit API keys to Git
.envis in.gitignoreby default- Use
.env.exampleas template only
-
Use different keys for dev/prod
- Create separate AWS IAM users
- Use different API keys per environment
-
Rotate keys regularly
- Change keys every 90 days
- Use AWS Secrets Manager in production
-
Limit permissions
- Use least-privilege IAM policies
- Create service-specific API keys
-
Monitor usage
- Set up billing alerts in AWS
- Monitor API usage in provider dashboards
- Check key is copied correctly (no spaces)
- Verify key hasn't expired
- Check account has sufficient credits
- Verify IP restrictions if any
- Check IAM user has S3 permissions
- Verify bucket name is correct
- Check bucket region matches
AWS_REGION - Ensure bucket policy allows your IAM user
- Most providers have rate limits
- Implement retry logic (already done)
- Consider upgrading to paid tiers
- Space out development testing
| Provider | Support |
|---|---|
| Google Veo | https://ai.google.dev/support |
| Runway | support@runwayml.com |
| Minimax | https://www.minimaxi.com/support |
| AWS | https://aws.amazon.com/contact-us/ |
| Azure | https://azure.microsoft.com/support/ |
After getting your API keys, verify they work:
# Test Google Veo
curl -H "Authorization: Bearer $GOOGLE_VEO_API_KEY" \
https://generativelanguage.googleapis.com/v1/models
# Test AWS S3
aws s3 ls s3://your-bucket-name --profile your-profile
# Test Azure Content Safety
curl -X POST "$AZURE_CONTENT_SAFETY_ENDPOINT/contentsafety/text:analyze?api-version=2023-10-01" \
-H "Ocp-Apim-Subscription-Key: $AZURE_CONTENT_SAFETY_KEY" \
-H "Content-Type: application/json" \
-d '{"text": "test"}'Ready to start? Run the setup script:
cd backend
node scripts/setup.js