Voice API
    Voice API
    • Welcome to Async Voice API
    • Get Started
    • API Reference
      • API Status
        • API Status Check
      • Text-to-Speech
        • Text to Speech (WebSocket)
        • Text to Speech
        • Text to Speech with Word Timestamps
        • Text to Speech (Stream)
      • Voice Management
        • Clone Voice
        • List Voices
        • Get Voice
        • Update Voice
        • Delete Voice
        • Get Voice Preview
    • Advanced Guides
      • Embed Player
      • Custom Pronunciations
        • Embedding Custom Phonemes in Async Voice API
        • Pronouncing digits one‑by‑one
        • Insert Silent Pauses with <break>
    • Integrations
      • Integrate with Twilio
      • Pipecat Integration

    Get Started

    Getting Started with the Async Voice API#

    Welcome! This quick-start guide walks you through sending your first request and turning text into real-time audio.

    Prerequisites#

    Developer account on Async Voice API
    API key
    A command-line HTTP client (examples use cURL; feel free to use Postman, Python requests, etc.)
    ffmpeg (optional, but handy for converting the raw stream to other formats for playback)

    Get Your API Key#

    1.
    Log in to the Async Voice API dashbaord.
    2.
    Navigate to API Keys → Create API Key.
    3.
    Copy the key and store it securely (it starts with sk_).
    4.
    You can export it as an environment variable so it never appears in your shell history:

    Make Your First Request#

    Here’s a simple curl command that sends text and receives streamed audio in response:

    Playing or Converting the Stream#

    The command above stores 44.1 kHz 16-bit mono PCM samples in speech.pcm.
    Quick playback (macOS/Linux)
    Convert to WAV
    Tip: For real-time playback, pipe the cURL output directly into ffplay:

    Handling Errors#

    HTTP CodeMeaningMost common fixes
    401 UnauthorizedBad or missing X-Api-KeyCheck key spelling; confirm it has TTS scope.
    429 Too Many RequestsYou hit the rate limit.Wait for the mentioned time and retry (or upgrade plan).
    400 Bad RequestValidation error in your JSON.Validate JSON, field names, and ranges.
    Need help? Ping us or hop into our developer Discord. Happy building!
    Modified at 2025-10-31 06:41:14
    Previous
    Welcome to Async Voice API
    Next
    API Status Check
    Built with