Required API Keys
Google Gemini API Key
Required for all operations. Powers viral moment detection, title generation, video effects, and thumbnail creation.Get your free key: aistudio.google.com/app/apikeyHTTP Header:
X-Gemini-Key- Viral moment detection from transcripts
- SEO-optimized title and description generation
- AI video effects with FFmpeg filter generation
- YouTube thumbnail creation
- Video context analysis
- Free tier: 1,500 requests/day
- Paid tier: Higher quotas available
Optional API Keys
ElevenLabs API Key
Optional. Enables AI voice dubbing and translation to 30+ languages.Get your key: elevenlabs.ioHTTP Header:
X-ElevenLabs-Key- Voice cloning and translation
- Support for 30+ languages
- Automatic subtitle regeneration for dubbed videos
Upload-Post API Key
Optional. Enables one-click posting to TikTok, Instagram Reels, and YouTube Shorts.Get your key: app.upload-post.com/api-keysHTTP Header:
X-Upload-Post-Key- Direct upload to TikTok, Instagram, YouTube
- Multi-platform scheduling
- Profile management for multiple accounts
- Create account at app.upload-post.com/login
- Create user profile in Manage Users
- Connect social accounts (TikTok, Instagram, YouTube)
- Generate API key in API Keys
- Paste key in OpenShorts dashboard
How API Keys Work
Client-Side Encrypted Storage
OpenShorts implements a secure, privacy-first API key management system:- Browser-only storage: Keys are saved in
localStoragewith encryption - Never server-side: The backend never stores or logs your API keys
- Header-based authentication: Keys are sent via HTTP headers only when needed
- Per-request basis: Each API call includes only the required key
HTTP Header Format
API keys are transmitted as custom headers:Backend Implementation
The FastAPI backend extracts keys from headers:Entering API Keys
Dashboard UI
On first launch, OpenShorts prompts for required keys:- Open dashboard:
http://localhost:5173 - Enter Gemini API key in the initial prompt
- Optional keys: Click settings icon to add ElevenLabs or Upload-Post keys
- Keys persist in browser localStorage until cleared
Key Management
- View keys: Click settings/profile icon in dashboard
- Update keys: Enter new value and save
- Clear keys: Use browser’s localStorage inspector or clear site data
- Per-browser: Keys are isolated to each browser/device
Security Best Practices
API Key Permissions
Gemini API Key:- Read-only access to your Google Cloud project
- Cannot modify or delete resources
- Usage tracked in Google AI Studio
- Access to dubbing and voice cloning features
- Charged per character processed
- Monitor usage in ElevenLabs dashboard
- Access to connected social accounts
- Can post videos on your behalf
- Revoke access in Upload-Post dashboard
Troubleshooting
Invalid API Key Error
Symptom:400 Bad Request: Missing X-Gemini-Key header
Solutions:
- Verify key is entered in dashboard settings
- Check browser console for localStorage errors
- Clear browser cache and re-enter key
- Generate new key from provider
API Rate Limit Exceeded
Symptom:429 Too Many Requests
Solutions:
- Gemini: Wait for rate limit reset (usually 1 minute)
- ElevenLabs: Upgrade plan or wait for quota refresh
- Upload-Post: Check daily/monthly limits in dashboard
Key Not Persisting
Symptom: Re-prompted for key on every page load Solutions:- Check browser privacy settings (allow localStorage)
- Disable incognito/private mode
- Check for browser extensions blocking storage
- Try different browser
Social Posting Fails
Symptom: Upload-Post returns401 Unauthorized
Solutions:
- Verify API key is valid
- Check social account is still connected
- Re-authenticate account in Upload-Post dashboard
- Verify user profile ID matches