Overview
Bluma provides separate test and production environments to help you develop and test your integration safely before going live.Test Environment
Free unlimited testing
- Watermarked videos
- Lower quality rendering
- No credit charges
- Same API functionality
Production Environment
Production-ready videos
- Full-quality rendering
- No watermarks
- Credits charged
- Priority processing
Key Differences
| Feature | Test Mode | Production Mode |
|---|---|---|
| API Keys | bluma_test_* | bluma_live_* |
| Video Quality | Lower (720p max) | Full (up to 4K) |
| Watermark | ”TEST MODE” overlay | None |
| Credits | Free (unlimited) | Charged per video |
| Rate Limits | Same as your tier | Same as your tier |
| Processing Speed | Slower (low priority) | Fast (high priority) |
| Webhooks | Fully functional | Fully functional |
| API Functionality | 100% identical | 100% identical |
Test and production environments have identical APIs. Code that works in test will work in production.
Test Environment
Purpose
Test mode is designed for:- ✅ Development and debugging
- ✅ Integration testing
- ✅ Experimenting with templates
- ✅ Training and demos
- ✅ CI/CD pipeline testing
Limitations
Quality Restrictions:- Maximum resolution: 720p (even if you request 1080p or 4K)
- Lower bitrate encoding
- Reduced frame rate (24fps vs 30fps)
- No priority processing
- ❌ No custom branding
- ❌ No priority support
- ❌ No SLA guarantees
Getting Test API Keys
Test keys are available on all plans (including Free):Using Test Keys
Simply swap your API key:Production Environment
Purpose
Production mode is for:- ✅ Live applications
- ✅ Customer-facing content
- ✅ High-quality video generation
- ✅ Branded content
- ✅ Commercial use
Benefits
Full Quality:- Up to 4K resolution
- High bitrate encoding
- 30fps rendering
- Priority processing (2-3x faster)
- ✅ Custom branding
- ✅ White-label support
- ✅ Priority customer support
- ✅ SLA guarantees (Enterprise)
Getting Production API Keys
Production keys require a paid plan:- Upgrade your account at getbluma.com/billing
- Create production key:
Switching from Test to Production
Step 1: Test Thoroughly
Before switching to production:1
Test All Templates
Generate videos with every template you plan to use
2
Test Error Handling
Verify your code handles errors gracefully (invalid inputs, rate limits, etc.)
3
Test Webhooks
If using webhooks, verify signature verification and event handling
4
Load Test
Test with realistic volumes to ensure you’re within rate limits
5
Review Output
Verify video quality and content meet your requirements (ignore watermark)
Step 2: Upgrade Your Plan
If you’re on the Free tier, upgrade to a paid plan:- Go to getbluma.com/billing
- Select a plan (Starter, Pro, or Enterprise)
- Complete payment setup
Step 3: Create Production API Key
Step 4: Update Environment Variables
Update your environment configuration:Step 5: Update Your Code (Optional)
If you want environment-based switching:Step 6: Deploy and Monitor
1
Deploy to Production
Deploy your application with the production API key
2
Generate Test Video
Generate one video to verify production key works correctly
3
Monitor Usage
Watch usage dashboard for any issues
4
Set Up Alerts
Configure webhook alerts for
credits.low and credits.exhausted eventsEnvironment-Based Configuration
Node.js Example
Python Example
API Key Management
Separate Keys for Different Purposes
Local Development
Test key for local development
bluma_test_local_devCI/CD Pipeline
Test key for automated tests
bluma_test_ci_cdStaging Environment
Test or production key for staging
bluma_test_stagingProduction
Production key for live app
bluma_live_productionNaming Convention
Use descriptive names to identify keys:Key Rotation
Regularly rotate production keys for security:Credit Usage
Test Environment
- ✅ Zero credits consumed
- ✅ Unlimited video generation
- ✅ All features available (except full quality)
Production Environment
Credits are consumed per video based on:- Template complexity
- Resolution (720p, 1080p, 4K)
- Duration
- AI features used
Monitoring Credit Usage
Setting Up Credit Alerts
Rate Limits
Test and production keys share the same rate limits based on your account tier.
| Tier | Requests/Hour | Burst Limit |
|---|---|---|
| Free | 100 | 10 |
| Starter | 1,000 | 50 |
| Pro | 5,000 | 100 |
| Enterprise | 50,000 | 500 |
Common Mistakes to Avoid
Best Practices
Environment Variables
Store keys in environment variables, never in code
Separate Keys
Use different keys for dev, staging, and production
Test First
Always test changes in test environment before deploying
Monitor Usage
Set up dashboards and alerts for production usage
Rotate Keys
Regularly rotate production keys for security
Document Keys
Maintain documentation of which keys are used where
Checklist for Going to Production
Use this checklist before launching:- Thoroughly tested all templates in test environment
- Implemented error handling for all API calls
- Set up webhook signature verification
- Configured environment-based API key selection
- Added API keys to environment variables (not hardcoded)
- Added
.envfiles to.gitignore - Upgraded to a paid plan
- Created production API key
- Set up credit usage monitoring
- Configured webhook alerts for low credits
- Tested production key with single video
- Documented key rotation procedure
- Set up monitoring/logging for API calls
- Configured rate limit handling
- Reviewed security best practices
- Prepared rollback plan
Troubleshooting
Videos still have watermarks in production
Videos still have watermarks in production
Cause: Still using a test API keyCheck:Fix: Ensure you’re using a production key (
bluma_live_*)402 Insufficient Credits error
402 Insufficient Credits error
Cause: Not enough credits remainingCheck balance:Fix:
- Purchase more credits at getbluma.com/billing
- Upgrade your plan for higher monthly allowance
Test key not working
Test key not working
Possible causes:If you get 401, create a new test key.
- Key was deleted
- Typo in API key
- Missing
Bearerprefix
Different behavior in production
Different behavior in production
The API is identical in test and production. Only differences are:
- Video quality (test is lower)
- Watermark (test has it)
- Credits (test is free)
- Processing speed (production is faster)
- Environment variables
- Network/firewall differences
- Rate limiting
Next Steps
Generate Your First Video
Step-by-step video generation tutorial
Credits & Pricing
Understand credit consumption and pricing
Best Practices
Production-ready integration patterns
API Keys
API key management reference
Summary
- Test environment is free, unlimited, but produces watermarked lower-quality videos
- Production environment requires a paid plan but produces full-quality videos
- APIs are identical - code tested in test will work in production
- Use environment variables to manage keys and switch between environments
- Monitor usage in production to avoid unexpected credit consumption