Skip to main content

Get Started in 3 Steps

Start using VoxNexus voice services in your application with these simple steps.

Step 1: Create Your Account

  1. Visit voxnexus.ai/dashboard
  2. Create your free account
  3. Verify your email address
No credit card required for the free tier!
  1. Log in to your Dashboard
  2. Navigate to the API Keys section
  3. Click “Create API Key”
  4. Copy and securely store your API key
Keep your API key secure. Never commit it to version control or share it publicly.

Step 2: Make Your First API Call

Convert text to speech with a simple API call:
curl -X POST https://api.voxnexus.ai/v1/tts \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "text": "Hello, welcome to VoxNexus!",
    "voice_id": "vl-xiaoxiao",
    "format": "mp3",
    "sample_rate": 16000
  }' \
  --output audio.mp3
This will generate an MP3 audio file with the synthesized speech.
Transcribe audio to text:
curl -X POST "https://api.voxnexus.ai/v1/stt?sample_rate=16000&language=en-US" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: audio/wav" \
  --data-binary @your-audio.wav
Replace your-audio.wav with your audio file path.
Test APIs directly in your browser:
  1. Navigate to any endpoint in the API Reference
  2. Click “Try it” in the API Playground
  3. Enter your API key
  4. Fill in the parameters and click “Send”
The API Playground is perfect for testing without writing code!

Step 3: Integrate into Your Application

Add voice synthesis to your web app:
async function synthesizeSpeech(text, voiceId) {
  const response = await fetch('https://api.voxnexus.ai/v1/tts', {
    method: 'POST',
    headers: {
      'Authorization': 'Bearer YOUR_API_KEY',
      'Content-Type': 'application/json'
    },
    body: JSON.stringify({
      text: text,
      voice_id: voiceId,
      format: 'mp3',
      sample_rate: 16000
    })
  });
  
  if (!response.ok) {
    throw new Error(`HTTP ${response.status}`);
  }
  
  const audioBlob = await response.blob();
  const audioUrl = URL.createObjectURL(audioBlob);
  const audio = new Audio(audioUrl);
  audio.play();
}

// Usage
synthesizeSpeech('Hello, world!', 'vl-xiaoxiao');
Use VoxNexus in your Python application:
import requests

def synthesize_speech(text, voice_id, api_key):
    url = 'https://api.voxnexus.ai/v1/tts'
    headers = {
        'Authorization': f'Bearer {api_key}',
        'Content-Type': 'application/json'
    }
    data = {
        'text': text,
        'voice_id': voice_id,
        'format': 'mp3',
        'sample_rate': 16000
    }
    
    response = requests.post(url, json=data, headers=headers)
    response.raise_for_status()
    
    with open('output.mp3', 'wb') as f:
        f.write(response.content)
    
    return 'output.mp3'

# Usage
synthesize_speech('Hello, world!', 'vl-xiaoxiao', 'YOUR_API_KEY')
Use WebSocket for real-time voice synthesis. Authenticate using query parameter:
// Connect with token as query parameter (recommended for browser)
const ws = new WebSocket('wss://api.voxnexus.ai/v1/tts/realtime?token=YOUR_API_KEY');

ws.onopen = () => {
  // Initialize
  ws.send(JSON.stringify({
    type: 'init',
    voice_id: 'vl-xiaoxiao',
    format: 'mp3',
    sample_rate: 16000
  }));
};

ws.onmessage = (event) => {
  const message = JSON.parse(event.data);
  
  if (message.type === 'ready') {
    // Send text to synthesize
    ws.send(JSON.stringify({
      type: 'text',
      text: 'Hello, world!',
      is_final: true
    }));
  } else if (message.type === 'audio') {
    // Handle audio data (base64 encoded)
    const audioData = atob(message.data);
    // Play audio...
  }
};

Next Steps

Now that you’ve made your first API call, explore these resources:

Common Tasks

Find the Right Voice

# List all voices
curl -X GET "https://api.voxnexus.ai/v1/voices" \
  -H "Authorization: Bearer YOUR_API_KEY"

# Search for voices
curl -X GET "https://api.voxnexus.ai/v1/voices/search?q=xiaoxiao" \
  -H "Authorization: Bearer YOUR_API_KEY"

# Filter by language
curl -X GET "https://api.voxnexus.ai/v1/voices?language=zh-CN" \
  -H "Authorization: Bearer YOUR_API_KEY"

Customize Voice Output

{
  "text": "Hello, world!",
  "voice_id": "vl-xiaoxiao",
  "speed": 1.2,
  "pitch": 2,
  "volume": 0.8
}

Enable Advanced STT Features

curl -X POST "https://api.voxnexus.ai/v1/stt?sample_rate=16000&enable_timestamps=true&enable_confidence=true&enable_speaker_diarization=true" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: audio/wav" \
  --data-binary @audio.wav
Need help? Check our FAQ or contact support@voxnexus.ai for assistance.