Retrieve the list of text-to-speech audio clips you have generated

December 23, 2024

Table of contents

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

Please configure at least one www.hailuo.ai account for this endpoint, see Setup MiniMax for details.

This endpoint will return audio clips generated by

https://api.useapi.net/v1/minimax/audio/?…

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

  • page and page_size are optional. Use them to retrieve the next page of data when the returned has_more field is true.
    Default page_size is 100.

Responses
  • 200 OK

    {
        "audio_list": [
            {
                "audio_id": "user:user_id-minimax:account_id-audio:audio_id",
                "audio_review": 0,
                "user_id": 987654321,
                "audio_title": "<Audio title>",
                "audio_url": "https://cdn.hailuoai.video/...mp3",
                "update_time": 1122334455778
            },
            {
                "audio_id": "user:user_id-minimax:account_id-audio:audio_id",
                "audio_review": 0,
                "user_id": 987654321,
                "audio_title": "Audio title",
                "audio_url": "https://cdn.hailuoai.video/...mp3",
                "update_time": 1122334455779
            }
        ],
        "total": 2025,
        "has_more": true
    }
    
  • 400 Bad Request

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

    {
      "error": "Unauthorized",
      "code": 401
    }
    
Model
{   // TypeScript, all fields are optional
    audio_list: {
        audio_id: string
        audio_review: number
        user_id: number
        audio_title: string
        audio_url: string
        update_time: number
    }[]
    total: number
    has_more: boolean
}
Examples
  • curl "https://api.useapi.net/v1/minimax/audio/?account=account" \
       -H "Accept: application/json" \
       -H "Authorization: Bearer …" 
    
  • const token = "API token";
    const account = "Previously configured account"; 
    const apiUrl = `https://api.useapi.net/v1/minimax/audio/?account=${account}`; 
    const response = await fetch(apiUrl, {
      headers: {
        "Authorization": `Bearer ${token}`,
      },
    });
    const result = await response.json();
    console.log("response", {response, result});
    
  • import requests
    token = "API token"
    account = "Previously configured account"
    apiUrl = f"https://api.useapi.net/v1/minimax/audio/?account={account}"
    headers = {
        "Content-Type": "application/json", 
        "Authorization" : f"Bearer {token}"
    }
    response = requests.get(apiUrl, headers=headers)
    print(response, response.json())
    
Try It