Retrieve your reference tracks
December 13, 2024
Table of contents
Retrieve full list of track uploaded using POST /files. Keep in mind that all uploaded files will be visible to all users of Mureka.ai website.
Use id value to reference a track when using the parameter ref_id of POST /music/create-advanced.
https://api.useapi.net/v1/mureka/files/?…
Request Headers
Authorization: Bearer {API token}
Content-Type: application/json
- API tokenis required, see Setup useapi.net for details.
Query Parameters
-  accountis optional when only one account configured. However, if you have multiple accounts configured, this parameter becomes required.
-  last_idis optional. Use it to retrieve the next page of data. To do so, set its value to thelast_idreturned in the previous response when themorefield in that response istrue.
Responses
-   { "list": [ { "id": 1122334455, "url": "https://<song download url>.mp3", "duration_milliseconds": 30000, "mood": "relaxed", "title": "<song title>", "genre": "afrobeat", "username": "<user name>" }, { "id": 66778899, "url": "https://<song download url>.mp3", "duration_milliseconds": 30000, "mood": "restless", "title": "<song title>", "genre": "rock", "username": "<user name>" } ], "last_id": 77665544332211, "more": true }
-   { "error": "<Error message>", "code": 400 }
-   { "error": "Unauthorized", "code": 401 }
Model
{ // TypeScript, all fields are optional
    list: {
        id: number
        url: string
        duration_milliseconds: number
        mood: string
        title: string
        genre: string
        username: string
    }[]
    last_id: number
    more: boolean
}
Examples
-  curl "https://api.useapi.net/v1/mureka/files/?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/mureka/files/?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/mureka/files/?account={account}" headers = { "Content-Type": "application/json", "Authorization" : f"Bearer {token}" } response = requests.get(apiUrl, headers=headers) print(response, response.json())