Authorization header.
Getting Your API Key
1
Create an account
Sign up for a VoiceDub account at voicedub.ai if you haven’t already.
2
Navigate to developer dashboard
Go to the Developer Dashboard after logging in.
3
Generate an API key
Click “Create API Key” and give it a descriptive name for easy identification.
4
Add credits to your account
Purchase API credits from the Billing Dashboard to start using the API.
Making Authenticated Requests
Include your API key in theAuthorization header with the format Api-Key YOUR_API_KEY:
API Key Management
Best Practices
- Never commit API keys to version control - Use environment variables instead
- Use different API keys for different environments (development, staging, production)
- Rotate API keys regularly for enhanced security
- Monitor API key usage in your developer dashboard
- Delete unused API keys to minimize security risk
Environment Variables
Store your API key as an environment variable:- macOS/Linux
- Windows
- .env file
Error Responses
401 Unauthorized
This error occurs when your API key is missing, invalid, or malformed: 401 Unauthorized:- Missing
Authorizationheader - Incorrect API key format (should be
Api-Key YOUR_KEY) - Using a deleted or invalid API key
- API key not properly URL-encoded
403 Insufficient Credits
This error occurs when you don’t have enough API credits: 403 Insufficient Credits:/v1/me endpoint.
Rate Limits
The VoiceDub API implements rate limiting to ensure fair usage:- 100 requests per minute per API key
- 1,000 requests per hour per API key
429 Too Many Requests response:
429 Too Many Requests:
Rate limits are enforced per API key, so you can use multiple keys to increase your throughput if needed.
Testing Your Authentication
Verify your API key is working correctly by making a test request:Show Response
Show Response
If you receive your credit balance, your API key is configured correctly!