Skip to main content
The VoiceDub API uses API keys for authentication. All API requests must include your API key in the 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.
Store your API key securely. It won’t be shown again after creation.
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 the Authorization header with the format Api-Key YOUR_API_KEY:
curl -X GET 'https://api.voicedub.ai/v1/me' \
  -H 'Authorization: Api-Key YOUR_API_KEY'

API Key Management

Best Practices

Follow these security best practices when working with API keys:
  • 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:
export VOICEDUB_API_KEY="your_api_key_here"
Then reference it in your code:
curl -X GET 'https://api.voicedub.ai/v1/me' \
  -H "Authorization: Api-Key $VOICEDUB_API_KEY"

Error Responses

401 Unauthorized

This error occurs when your API key is missing, invalid, or malformed: 401 Unauthorized:
{
  "code": "unauthorized",
  "message": "Invalid API key"
}
Common causes:
  • Missing Authorization header
  • 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:
{
  "code": "not_enough_credits",
  "message": "Looks like you don't have enough credits! Purchase more at https://voicedub.ai/developer/billing"
}
Solution: Purchase more credits or check your credit balance using the /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
When you exceed the rate limit, you’ll receive a 429 Too Many Requests response: 429 Too Many Requests:
{
  "code": "rate_limit_exceeded", 
  "message": "Rate limit exceeded. Please wait before making more 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:
curl -X GET 'https://api.voicedub.ai/v1/me' \
  -H 'Authorization: Api-Key YOUR_API_KEY'
{
  "user": {
    "apiCredits": 1000
  }
}
This endpoint returns your current API credit balance and confirms your authentication is working properly.
If you receive your credit balance, your API key is configured correctly!