Retrieve generated music
December 2, 2024
Table of contents
https://api.useapi.net/v1/mureka/music/?…
Request Headers
Authorization: Bearer {API token}
Content-Type: application/json
API token
is required, see Setup useapi.net for details.
Query Parameters
-
account
is optional when only one account configured. However, if you have multiple accounts configured, this parameter becomes required. -
last_id
is optional. Use it to retrieve the next page of data. To do so, set its value to thelast_id
returned in the previous response when themore
field in that response istrue
. -
expand
is optiona. Set it totrue
if you want to retrieve complete song details.
Supported values:true
,false
(default).
Responses
-
{ "list": [ { "feed_id": 111222333, "state": 3, "songs": [ { "song_id": "user:777-mureka:123456789-song:111122222", "title": "<song title>", "version": "1", "duration_milliseconds": 123456, "generate_at": 123456789, "genres": [ "rock", "metal" ], "moods": [ "majestic", "romantic", "mysterious" ], "mp3_url": "https://<download link>.mp3", "share_key": "<share key>", "machine_audit_state": 1, "credit_type": 1, "cover": "https://<cover image>.png", "share_link": "https://<share link>" }, { "song_id": "user:777-mureka:123456789-song:33334444", "title": "<song title>", "version": "1", "duration_milliseconds": 223456, "generate_at": 223456789, "genres": [ "rock", "metal" ], "moods": [ "quirky", "relaxed", "mysterious" ], "mp3_url": "https://<download link>.mp3", "share_key": "<share key>", "machine_audit_state": 1, "credit_type": 1, "cover": "https://<cover image>.png", "share_link": "https://<share link>" } ], "is_accelerated": true }, { "feed_id": 444555666, "state": 3, "songs": [ { "song_id": "user:777-mureka:123456789-song:55556666", "title": "<song title>", "version": "1", "duration_milliseconds": 123456, "generate_at": 123456789, "genres": [ "latin", "world-music" ], "moods": [ "calm", "romantic", "happy" ], "mp3_url": "https://<download link>.mp3", "share_key": "<share key>", "machine_audit_state": 1, "credit_type": 1, "cover": "https://<cover image>.png", "share_link": "https://<share link>" }, { "song_id": "user:777-mureka:123456789-song:77778888", "title": "<song title>", "version": "1", "duration_milliseconds": 223456, "generate_at": 223456789, "genres": [ "pop", "indie" ], "moods": [ "majestic", "inspired", "quirky" ], "mp3_url": "https://<download link>.mp3", "share_key": "<share key>", "machine_audit_state": 1, "credit_type": 1, "cover": "https://<cover image>.png", "share_link": "https://<share link>" } ], "is_accelerated": true } ], "last_id": 123456789, "more": true, "total": 9623 }
-
{ "error": "<Error message>", "code": 400 }
-
{ "error": "Unauthorized", "code": 401 }
Model
{ // TypeScript, all fields are optional
list: {
feed_id: number
state: number
songs: {
song_id: number
title: string
version: string
duration_milliseconds: number
generate_at: number
genres: string[]
moods: string[]
mp3_url: string
share_key: string
share_link: string
machine_audit_state: number
wave_list: number[]
credit_type: number
cover: string
is_played?: boolean
is_liked?: boolean
video?: {
video_url: string
video_cover_url: string
video_id: number
}
}[]
is_accelerated: boolean
}[]
last_id: number
total: number
}
Examples
-
curl "https://api.useapi.net/v1/mureka/music/?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/music/?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/music/?account={account}" headers = { "Content-Type": "application/json", "Authorization" : f"Bearer {token}" } response = requests.get(apiUrl, headers=headers) print(response, response.json())