Skip to main content
Welcome to the Vox platform! This guide will help you generate your first hyper-realistic audio using the Vox API.

Prerequisites

1

Sign Up & Get API Key

  1. Visit tts.timepay.ai and sign up for an account.
  2. Navigate to the API Keys tab.
  3. Create a new API Key and copy it immediately.
2

Set Environment Variable

It is best practice to keep your key secure. Export it in your terminal:
export TIMEPAY_API_KEY="YOUR_API_KEY_HERE"

Generate Speech

Since Vox is designed for flexibility, you can interact with the API using any standard HTTP client.
Note on Streaming: The endpoint streams audio data in chunks to ensure ultra-low latency. The examples below demonstrate how to capture this stream and save it to a file.
curl -X POST "https://api.tts.timepay.ai/api/v1/get_speech" \
  -H "Authorization: Bearer YOUR_API_KEY_HERE" \
  -H "Content-Type: application/json" \
  -d '{
    "text": "Hello world! This is Vox speaking.",
    "voice_id": "khvTFYgvagfvagvfuavdf",
    "language": "en",
    "addWavHeader": true,
    "speed":1.0,
    "sample_rate": 24000
  }' \
  --output output.wav

Need Help?

If you have any questions or need assistance, please contact our support team at support@timepay.ai.