> ## Documentation Index
> Fetch the complete documentation index at: https://docs.voxnexus.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Quickstart

> Get started with VoxNexus voice services in minutes

## Get Started in 3 Steps

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

### Step 1: Create Your Account

<AccordionGroup>
  <Accordion icon="user-plus" title="Sign up for free">
    1. Visit [voxnexus.ai/dashboard](https://voxnexus.ai/dashboard)
    2. Create your free account
    3. Verify your email address

    <Tip>No credit card required for the free tier!</Tip>
  </Accordion>

  <Accordion icon="key" title="Get your API key">
    1. Log in to your [Dashboard](https://voxnexus.ai/dashboard)
    2. Navigate to the API Keys section
    3. Click "Create API Key"
    4. Copy and securely store your API key

    <Warning>Keep your API key secure. Never commit it to version control or share it publicly.</Warning>
  </Accordion>
</AccordionGroup>

### Step 2: Make Your First API Call

<AccordionGroup>
  <Accordion icon="code" title="Text-to-Speech Example">
    Convert text to speech with a simple API call:

    ```bash theme={null}
    curl -X POST https://api.voxnexus.ai/v1/tts \
      -H "X-Api-Key: YOUR_API_KEY" \
      -H "Content-Type: application/json" \
      -d '{
        "text": "Hello, welcome to VoxNexus!",
        "model_id": "vn-tts-basic",
        "voice_id": "vn-xiaoxiao",
        "format": "wav",
        "sample_rate": 16000
      }' \
      --output audio.wav
    ```

    This will generate a WAV audio file with the synthesized speech.
  </Accordion>

  <Accordion icon="microphone" title="Speech-to-Text Example">
    Transcribe audio to text:

    ```bash theme={null}
    curl -X POST "https://api.voxnexus.ai/v1/stt?model_id=vn-stt-basic&sample_rate=16000&language=en-US" \
      -H "X-Api-Key: YOUR_API_KEY" \
      -H "Content-Type: audio/wav" \
      --data-binary @your-audio.wav
    ```

    Replace `your-audio.wav` with your audio file path.
  </Accordion>

  <Accordion icon="globe" title="Try the API Playground">
    Test APIs directly in your browser:

    1. Navigate to any endpoint in the [API Reference](/api-reference/introduction)
    2. Click "Try it" in the API Playground
    3. Enter your API key
    4. Fill in the parameters and click "Send"

    <Tip>The API Playground is perfect for testing without writing code!</Tip>
  </Accordion>
</AccordionGroup>

### Step 3: Integrate into Your Application

<AccordionGroup>
  <Accordion icon="code" title="JavaScript Example">
    Add voice synthesis to your web app:

    ```javascript theme={null}
    async function synthesizeSpeech(text, voiceId) {
      const response = await fetch('https://api.voxnexus.ai/v1/tts', {
        method: 'POST',
        headers: {
          'X-Api-Key': 'YOUR_API_KEY',
          'Content-Type': 'application/json'
        },
        body: JSON.stringify({
          text: text,
          model_id: 'vn-tts-basic',
          voice_id: voiceId,
          format: 'wav',
          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!', 'vn-xiaoxiao');
    ```
  </Accordion>

  <Accordion icon="python" title="Python Example">
    Use VoxNexus in your Python application:

    ```python theme={null}
    import requests

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

    # Usage
    synthesize_speech('Hello, world!', 'vn-xiaoxiao', 'YOUR_API_KEY')
    ```
  </Accordion>

  <Accordion icon="plug" title="WebSocket Example">
    Use WebSocket for real-time voice synthesis. Authenticate using query parameter:

    ```javascript theme={null}
    // 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',
        model_id: 'vn-tts-basic',
        voice_id: 'vn-xiaoxiao',
        format: 'wav',
        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...
      }
    };
    ```
  </Accordion>
</AccordionGroup>

## Next Steps

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

<CardGroup cols={2}>
  <Card title="API Reference" icon="code" href="/api-reference/introduction">
    Complete API documentation with examples
  </Card>

  <Card title="Features" icon="star" href="/features">
    Learn about platform capabilities
  </Card>

  <Card title="Voice Library" icon="user" href="/voices">
    Browse available voices
  </Card>

  <Card title="Use Cases" icon="lightbulb" href="/use-cases">
    See real-world applications
  </Card>

  <Card title="FAQ" icon="circle-question" href="/faq">
    Find answers to common questions
  </Card>

  <Card title="Support" icon="headset" href="mailto:support@voxnexus.ai">
    Get help from our team
  </Card>
</CardGroup>

## Common Tasks

### Find the Right Voice

```bash theme={null}
# List all voices
curl -X GET "https://api.voxnexus.ai/v1/voices" \
  -H "X-Api-Key: YOUR_API_KEY"

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

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

### Customize Voice Output

```json theme={null}
{
  "text": "Hello, world!",
  "model_id": "vn-tts-basic",
  "voice_id": "vn-xiaoxiao",
  "speed": 1.2,
  "pitch": 2,
  "volume": 0.8
}
```

### Enable Advanced STT Features

```bash theme={null}
curl -X POST "https://api.voxnexus.ai/v1/stt?model_id=vn-stt-basic&sample_rate=16000&enable_timestamps=true&enable_speaker_diarization=true" \
  -H "X-Api-Key: YOUR_API_KEY" \
  -H "Content-Type: audio/wav" \
  --data-binary @audio.wav
```

<Note>
  **Need help?** Check our [FAQ](/faq) or contact [support@voxnexus.ai](mailto:support@voxnexus.ai) for assistance.
</Note>
