Prerequisites
Before starting, make sure you have:- ✅ A Bluma account (sign up)
- ✅ An API key (get one here)
- ✅ Basic knowledge of making HTTP requests
Step 1: Choose a Template
First, let’s see what templates are available:consumerclub-discord-zoomed.
Step 2: Create the Video
Let’s generate a fun personality quiz video:Save the
id - you’ll need it to check the status and download your video!Step 3: Check the Status
Video generation is asynchronous (takes 2-5 minutes). Poll the status endpoint:queued→processing→completed✓
Step 4: Download Your Video
Once status iscompleted, get the download URL:
Download URLs expire in 1 hour. Download your video before expiration!
Complete Example
Here’s the full workflow in one script:Troubleshooting
401 Authentication Error
401 Authentication Error
Problem: Invalid or missing API keySolution:
- Verify your API key is correct
- Check it’s in the Authorization header:
Bearer YOUR_KEY - Ensure it starts with
bluma_live_orbluma_test_
402 Insufficient Credits
402 Insufficient Credits
Problem: Not enough credits for video generationSolution:
- Check balance:
GET /v1/credits/balance - Use a test key (free, unlimited)
- Purchase more credits or upgrade plan
Video stuck in 'processing'
Video stuck in 'processing'
Problem: Video taking longer than expectedSolution:
- Complex templates can take 5-10 minutes
- Check status hasn’t changed to ‘failed’
- Set up webhooks instead of polling
Download URL expired
Download URL expired
Problem: Waited too long to downloadSolution:
- Request a new download URL (doesn’t cost credits)
- Download immediately after getting URL
- Store videos in your own storage if needed long-term
Next Steps
Set Up Webhooks
Stop polling - get notified when videos are ready
Explore Templates
Try different video styles and templates
Production Setup
Switch from test to production mode
Best Practices
Build robust production integrations
Congratulations! 🎉
You’ve successfully generated your first AI video with the Bluma API. The same pattern applies to all templates - just change thetemplate_id and customize the context.