Skip to main content
All API requests require authentication using an API key.

Create an API Key

  1. Visit the API Keys dashboard
  2. Click ”+ API Key”
  3. Name your key (e.g., “Production”, “Development”)
  4. Click “Create”
API keys are only shown once when created. Copy and store your key securely.

Using Your API Key

Include your API key in the Authorization header as a Bearer token:
Authorization: Bearer YOUR_API_KEY
import requests

# Upload audio file using multipart/form-data
with open('voice_sample.mp3', 'rb') as f:
    files = {'file': ('voice_sample.mp3', f, 'audio/mpeg')}
    data = {'name': 'My Voice'}
    response = requests.post(
        'https://dev.voice.ai/api/v1/tts/clone-voice',
        headers={'Authorization': 'Bearer YOUR_API_KEY'},
        files=files,
        data=data
    )

Browser Usage & CORS

Browser Requests: The API has CORS restrictions. TypeScript/JavaScript examples in the docs are for reference. For browser-based applications, use a backend proxy or server-side code to avoid CORS errors. API keys should never be exposed in client-side code.
For browser applications, make API calls from your backend server (Node.js, Python, etc.) rather than directly from the browser to avoid CORS issues and keep your API key secure.

Security Best Practices

  • Never commit API keys to version control
  • Never expose API keys in client-side code
  • Use environment variables or secret management tools
  • Rotate keys regularly
  • Use separate keys for development, staging, and production
  • Delete unused keys

Base URL

https://dev.voice.ai