curl --request POST \
--url https://api.musicful.ai/v1/music/generate \
--header 'Content-Type: application/json' \
--data '
{
"action": "auto",
"style": "Happy songs",
"mv": "MFV2.0",
"instrumental": 0
}
'import requests
url = "https://api.musicful.ai/v1/music/generate"
payload = {
"action": "auto",
"style": "Happy songs",
"mv": "MFV2.0",
"instrumental": 0
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({action: 'auto', style: 'Happy songs', mv: 'MFV2.0', instrumental: 0})
};
fetch('https://api.musicful.ai/v1/music/generate', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.musicful.ai/v1/music/generate",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'action' => 'auto',
'style' => 'Happy songs',
'mv' => 'MFV2.0',
'instrumental' => 0
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.musicful.ai/v1/music/generate"
payload := strings.NewReader("{\n \"action\": \"auto\",\n \"style\": \"Happy songs\",\n \"mv\": \"MFV2.0\",\n \"instrumental\": 0\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.musicful.ai/v1/music/generate")
.header("Content-Type", "application/json")
.body("{\n \"action\": \"auto\",\n \"style\": \"Happy songs\",\n \"mv\": \"MFV2.0\",\n \"instrumental\": 0\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.musicful.ai/v1/music/generate")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"action\": \"auto\",\n \"style\": \"Happy songs\",\n \"mv\": \"MFV2.0\",\n \"instrumental\": 0\n}"
response = http.request(request)
puts response.read_body{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}V1 Generate Music
Generate music with or without lyrics using AI models.
curl --request POST \
--url https://api.musicful.ai/v1/music/generate \
--header 'Content-Type: application/json' \
--data '
{
"action": "auto",
"style": "Happy songs",
"mv": "MFV2.0",
"instrumental": 0
}
'import requests
url = "https://api.musicful.ai/v1/music/generate"
payload = {
"action": "auto",
"style": "Happy songs",
"mv": "MFV2.0",
"instrumental": 0
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({action: 'auto', style: 'Happy songs', mv: 'MFV2.0', instrumental: 0})
};
fetch('https://api.musicful.ai/v1/music/generate', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.musicful.ai/v1/music/generate",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'action' => 'auto',
'style' => 'Happy songs',
'mv' => 'MFV2.0',
'instrumental' => 0
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.musicful.ai/v1/music/generate"
payload := strings.NewReader("{\n \"action\": \"auto\",\n \"style\": \"Happy songs\",\n \"mv\": \"MFV2.0\",\n \"instrumental\": 0\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.musicful.ai/v1/music/generate")
.header("Content-Type", "application/json")
.body("{\n \"action\": \"auto\",\n \"style\": \"Happy songs\",\n \"mv\": \"MFV2.0\",\n \"instrumental\": 0\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.musicful.ai/v1/music/generate")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"action\": \"auto\",\n \"style\": \"Happy songs\",\n \"mv\": \"MFV2.0\",\n \"instrumental\": 0\n}"
response = http.request(request)
puts response.read_body{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Body
- AutoGenerateRequest
- CustomGenerateRequest
- ExtendGenerateRequest
- ConcatGenerateRequest
- UploadGenerateRequest
- UploadExtendGenerateRequest
- ArtistGenerateRequest
MFV3.0: Generates songs up to 8 minutes long and supports lyrics inputs of up to 5,000 words. Leveraging the latest and most powerful music generation models, it delivers richer sound quality and faster generation speeds. MFV2.0: Generates songs up to 8 minutes long and supports lyrics inputs of up to 5,000 words. Leveraging the latest and most powerful music generation models, it delivers richer sound quality and faster generation speeds. MFV1.5X: Generates songs up to 8 minutes long and supports lyrics inputs of up to 5,000 words. Leveraging the latest and most powerful music generation models, it delivers richer sound quality and faster generation speeds. MFV1.5: Generates songs up to 8 minutes long and supports lyrics inputs of up to 5,000 words. It boasts studio-quality sound, optimal genre fusion, and faster generation speeds. MFV1.0: Generates songs up to 4 minutes long and supports lyrics inputs of up to 3,000 words. Songs are more vivid and sound better.
MFV3.0, MFV2.0, MFV1.5X, MFV1.5, MFV1.0 "MFV2.0"
Response
Successful Response