The AI-Generated Music Detection Model can help you determine if a music was entirely generated by an AI model, or if it is a real music. This model was trained on artificially-created and human-created music spanning all sorts of music styles such as pop, rock, electronic, classical, jazz and more.
The Model works by analyzing the acoustic content of the audio. No meta-data is used in the analysis. Tampering with meta-data therefore has no effect on the scoring.
The Model was trained to detect music generated by the main models currently in use: Suno, Udio, Riffusion... Additional models will be added over time as they become available. The model works best on audio files with no vocals.
The following model can provide a useful complement to the AI-generated music model:
This model is currently gated. Please contact sales to get access.
To analyze a music track, simply send a POST request with the audio file. Supported audio formats: OGG, OPUS, FLAC, WAV, MP3.
curl -X POST 'https://api.sightengine.com/1.0/audio/check.json' \
-F 'audio=@/path/to/audio.mp3' \
-F 'models=genai' \
-F 'api_user={api_user}' \
-F 'api_secret={api_secret}'
# this example uses requests
import requests
import json
params = {
'models': 'genai',
'api_user': '{api_user}',
'api_secret': '{api_secret}'
}
files = {'audio': open('/path/to/audio.mp3', 'rb')}
r = requests.post('https://api.sightengine.com/1.0/audio/check.json', files=files, data=params)
output = json.loads(r.text)
$params = array(
'audio' => new CurlFile('/path/to/audio.mp3'),
'models' => 'genai',
'api_user' => '{api_user}',
'api_secret' => '{api_secret}',
);
// this example uses cURL
$ch = curl_init('https://api.sightengine.com/1.0/audio/check.json');
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, $params);
$response = curl_exec($ch);
curl_close($ch);
$output = json_decode($response, true);
// this example uses axios and form-data
const axios = require('axios');
const FormData = require('form-data');
const fs = require('fs');
data = new FormData();
data.append('audio', fs.createReadStream('/path/to/audio.mp3'));
data.append('models', 'genai');
data.append('api_user', '{api_user}');
data.append('api_secret', '{api_secret}');
axios({
method: 'post',
url:'https://api.sightengine.com/1.0/audio/check.json',
data: data,
headers: data.getHeaders()
})
.then(function (response) {
// on success: handle response
console.log(response.data);
})
.catch(function (error) {
// handle error
if (error.response) console.log(error.response.data);
else console.log(error.message);
});
See request parameter description
| Parameter | Type | Description |
| audio | file | audio file to analyze |
| models | string | comma-separated list of models to apply |
| api_user | string | your API user id |
| api_secret | string | your API secret |
The API will then return a JSON response with the following structure:
{
"status": "success",
"request": {
"id": "req_0zrbHDeitGYY7wEGncAne",
"timestamp": 1491402308.4762,
"operations": 15
},
"type": {
"ai_generated": 0.01
},
"media": {
"id": "med_0zrbk8nlp4vwI5WxIqQ4u",
"uri": "music.mp3"
}
}
The JSON response contains the ai_generated score. This score is a float between 0 and 1. The higher the value, the higher the confidence that the audio is AI-generated.
Additional information can be provided, such as a breakdown of the score by time segments. Please contact sales for more details.
See our full list of Image/Video models for details on other filters and checks you can run on your images and videos. You might also want to check our Text models to moderate text-based content: messages, reviews, comments, usernames...
Was this page helpful?