Retrieve the list of voices for lipsync

December 6, 2024

Table of contents

  1. Request Headers
  2. Query Parameters
  3. Responses
  4. Model
  5. Examples
  6. Try It

https://api.useapi.net/v2/pixverse/videos/voices/?…

Request Headers
Authorization: Bearer {API token}
Content-Type: application/json
Query Parameters
  • email is optional when only one account configured. However, if you have multiple accounts configured, this parameter becomes required.
Responses
  • 200 OK

    {
        "tts_list": [
            {
                "speaker_id": "1",
                "url": "https://media.pixverse.ai/pixverse/mp3/lipsync/tts/1.mp3",
                "display_name": "Emily"
            },
            {
                "speaker_id": "2",
                "url": "https://media.pixverse.ai/pixverse/mp3/lipsync/tts/2.mp3",
                "display_name": "James"
            },
            {
                "speaker_id": "3",
                "url": "https://media.pixverse.ai/pixverse/mp3/lipsync/tts/3.mp3\n",
                "display_name": "Isabella"
            },
            {
                "speaker_id": "4",
                "url": "https://media.pixverse.ai/pixverse/mp3/lipsync/tts/4.mp3",
                "display_name": "Liam"
            },
            {
                "speaker_id": "5",
                "url": "https://media.pixverse.ai/pixverse/mp3/lipsync/tts/5.mp3",
                "display_name": "Chloe"
            },
            {
                "speaker_id": "6",
                "url": "https://media.pixverse.ai/pixverse/mp3/lipsync/tts/6.mp3",
                "display_name": "Adrian"
            }
        ]
    }
    
  • 400 Bad Request

    {
        "error": "<Error message>",
        "code": 400
    }
    
  • 401 Unauthorized

    {
      "error": "Unauthorized",
      "code": 401
    }
    
Model
{   // TypeScript, all fields are optional
    tts_list: {
        speaker_id: string
        url: string
        display_name: string
    }[]
}
Examples
  • curl "https://api.useapi.net/v2/pixverse/videos/voices/?email=email" \
       -H "Accept: application/json" \
       -H "Authorization: Bearer …" 
    
  • const token = "API token";
    const email= "Previously configured account email"; 
    const apiUrl = `https://api.useapi.net/v2/pixverse/videos/voices/?email=${email}`; 
    const response = await fetch(apiUrl, {
      headers: {
        "Authorization": `Bearer ${token}`,
      },
    });
    const result = await response.json();
    console.log("response", {response, result});
    
  • import requests
    token = "API token"
    email= "Previously configured account email"
    apiUrl = f"https://api.useapi.net/v2/pixverse/videos/voices/?email={email}"
    headers = {
        "Content-Type": "application/json", 
        "Authorization" : f"Bearer {token}"
    }
    response = requests.get(apiUrl, headers=headers)
    print(response, response.json())
    
Try It