AI Music Detection
AI Music Detection is the Cyanite product that finds out whether a track was likely generated by a Gen AI music model, such as Suno or Udio, and by which one. It's a product of its own: you can use it on its own or together with Tagging and Search.
This guide explains why and how the detection works, shows you how to fetch and use the result in your application, and how far to trust it.
Why detect AI-generated music?
Gen AI music models can produce complete, convincing tracks in seconds. For anyone who receives music from third parties, such as distributors, publishers, libraries and platforms, that raises questions that the metadata of a track can't answer:
- Catalogue integrity: does the catalogue contain what it claims to contain?
- Policy and royalties: many services treat fully AI-generated tracks differently when it comes to licensing, payouts or eligibility.
- Transparency: listeners and clients increasingly expect AI-generated music to be disclosed.
AI Music Detection gives you an independent signal from the audio itself, so you can apply your policy consistently across a large catalogue.
How it works
AI Music Detection looks at the audio only. It doesn't rely on the title, the artist, file metadata or embedded watermarks, so it works regardless of how a track was delivered or whether its metadata was changed.
Different Gen AI music models leave different traces in the audio. Cyanite
therefore runs one detector per supported Gen AI music model, each trained
to recognize that model's output. Each detector produces a likelihood between
0.0 and 1.0 that the track was generated by its model.
The result combines them:
scoreis the highest likelihood across all detectors.isAiMusicistruewhenscoreis above0.5.suspectedModelnames the model whose detector produced that score, for examplesunoorudio. It's only set whenisAiMusicistrue, andnullotherwise.
So a track gets a high score if any of the detectors recognizes it, and the result tells you which one.
The detection covers the whole track and produces one result per track, not per segment.
AI Music Detection and Tagging
AI Music Detection is sold separately from Tagging, but it's built on the same
foundation. Its result is delivered as the AiMusicDetectionV1
model output, the same kind of result that
Tagging delivers:
- It runs as part of the regular analysis of every uploaded track, alongside any Tagging model outputs your account has. You don't start it separately.
- You fetch it from the same endpoint as every other model output,
GET /v1/library-tracks/{id}/models, withmodel=AiMusicDetectionV1. - If your account has only AI Music Detection,
AiMusicDetectionV1is the only model output you can request. Other model outputs fail with a401. - If your account also has Search, you can use
AiMusicDetectionV1.isAiMusicin a metadata filter.
Prerequisites
- A Cyanite API key with AI Music Detection enabled. AI Music Detection is available on its own or together with Tagging. Reach out to Cyanite to enable it.
- A webhook endpoint that receives the
analysisJob/finishedevent, set up as in the Quick Start Guide. - A track uploaded to your Library, as in Step 2 of the Quick Start Guide.
Fetch the result
When your webhook receives analysisJob/finished for a track, request the
AiMusicDetectionV1 model output for that track:
GET https://rest-api.cyanite.ai/v1/library-tracks/{id}/models?model=AiMusicDetectionV1
API reference: Get Model Outputs
- Typescript
- PHP
- Python
// trackId comes from the webhook payload: payload.data.track.id
const response = await fetch(
`https://rest-api.cyanite.ai/v1/library-tracks/${trackId}/models?model=AiMusicDetectionV1`,
{
headers: {
"x-api-key": process.env.CYANITE_API_KEY,
},
},
);
const { items } = await response.json();
const detection = items.find(
(item) => item.version === "AiMusicDetectionV1",
);
<?php
use Illuminate\Support\Facades\Http;
// $trackId comes from the webhook payload: $payload['data']['track']['id']
$response = Http::withHeaders([
'x-api-key' => env('CYANITE_API_KEY'),
])->get("https://rest-api.cyanite.ai/v1/library-tracks/{$trackId}/models?model=AiMusicDetectionV1");
$detection = collect($response->json('items'))
->firstWhere('version', 'AiMusicDetectionV1');
import json
import os
import urllib.request
api_key = os.environ.get("CYANITE_API_KEY")
# track_id comes from the webhook payload: payload["data"]["track"]["id"]
req = urllib.request.Request(
f"https://rest-api.cyanite.ai/v1/library-tracks/{track_id}/models?model=AiMusicDetectionV1",
headers={"x-api-key": api_key},
)
with urllib.request.urlopen(req) as response:
items = json.loads(response.read().decode("utf-8"))["items"]
detection = next(
(item for item in items if item["version"] == "AiMusicDetectionV1"), None
)
If your account also has Tagging, you can request AiMusicDetectionV1 together
with other model outputs in the same call, for example
?model=AiMusicDetectionV1&model=MainGenreV2.
Read the result
{
"items": [
{
"version": "AiMusicDetectionV1",
"isAiMusic": true,
"score": 0.94,
"suspectedModel": "suno"
}
]
}
| Field | Type | Description |
|---|---|---|
version | string | Always "AiMusicDetectionV1". |
isAiMusic | boolean | true if the track is likely AI-generated, which is the case when score is above 0.5. |
score | number | 0.0-1.0. The highest likelihood across all supported Gen AI music models that the track was generated by one of them. |
suspectedModel | string | null | The Gen AI music model the track most likely comes from, for example suno or udio. null when isAiMusic is false. |
Interpreting the result
score expresses how likely the track is to be AI-generated. It's a
probability, not proof. Like every classifier, the detection can be wrong in
both directions:
- False positives: a human-made track can score above
0.5. - False negatives: an AI-generated track can score below
0.5, for example when it comes from a Gen AI music model Cyanite doesn't detect yet.
The score of AI Music Detection isn't comparable to the scores of other model
outputs, such as moods or genres, see
Interpreting scores.
Use the result to prioritize and support decisions, such as sorting a review queue or asking a supplier for clarification, rather than as the only basis for irreversible actions like takedowns.
Flag tracks for review
The simplest policy is to use isAiMusic directly, for example to route
AI-generated tracks to a review queue:
- Typescript
- PHP
- Python
// sendToReviewQueue stands for your own code
if (detection.isAiMusic) {
await sendToReviewQueue(trackId, {
reason: "ai-generated",
suspectedModel: detection.suspectedModel,
});
}
// sendToReviewQueue() stands for your own code
if ($detection['isAiMusic']) {
sendToReviewQueue($trackId, [
'reason' => 'ai-generated',
'suspectedModel' => $detection['suspectedModel'],
]);
}
# send_to_review_queue() stands for your own code
if detection["isAiMusic"]:
send_to_review_queue(
track_id,
reason="ai-generated",
suspected_model=detection["suspectedModel"],
)
Treat the result as a strong signal, not as proof. See Interpreting the result.
Use your own threshold
isAiMusic uses a threshold of 0.5. That's a balanced default, but your use
case may need a different trade-off:
- A higher threshold flags fewer tracks, and the flagged tracks are more likely to be AI-generated. Choose it when a false accusation is costly.
- A lower threshold catches more AI-generated tracks, at the cost of flagging more human-made ones. Choose it when missing an AI-generated track is costly and a human reviews every flag.
Many integrations combine both: automatic action only for very high scores and
human review for the range in between. Apply your own threshold to score, for
example review everything above 0.3, but only block automatically above
0.9:
- Typescript
- PHP
- Python
// block and sendToReviewQueue stand for your own code
if (detection.score > 0.9) {
await block(trackId);
} else if (detection.score > 0.3) {
await sendToReviewQueue(trackId, { reason: "possibly-ai-generated" });
}
// block() and sendToReviewQueue() stand for your own code
if ($detection['score'] > 0.9) {
block($trackId);
} elseif ($detection['score'] > 0.3) {
sendToReviewQueue($trackId, ['reason' => 'possibly-ai-generated']);
}
# block() and send_to_review_queue() stand for your own code
if detection["score"] > 0.9:
block(track_id)
elif detection["score"] > 0.3:
send_to_review_queue(track_id, reason="possibly-ai-generated")
Show the suspected model
When isAiMusic is true, suspectedModel names the Gen AI music model the
track most resembles. It's useful context for a reviewer, but it describes the
strongest match, not a certainty. Cyanite adds detectors for new models over
time, so new values can appear. Treat the field as an open set of names and
display unknown values as they are instead of mapping only a fixed list:
- Typescript
- PHP
- Python
const label = detection.suspectedModel
? `Likely generated with ${detection.suspectedModel}`
: "No AI generation detected";
$label = $detection['suspectedModel']
? "Likely generated with {$detection['suspectedModel']}"
: 'No AI generation detected';
label = (
f"Likely generated with {detection['suspectedModel']}"
if detection["suspectedModel"]
else "No AI generation detected"
)
Exclude AI-generated tracks from search
AiMusicDetectionV1.isAiMusic can be used in a search
metadata filter, if your account
also has Search. This Search by Prompt only
returns tracks that aren't predicted to be AI-generated:
{
"query": "warm acoustic folk for a family brand",
"metadataFilter": {
"AiMusicDetectionV1.isAiMusic": { "$eq": false }
}
}
Tracks without an AI Music Detection result don't match this filter.
Limitations
- Partial AI use. The detection estimates whether a track as a whole was generated by a Gen AI music model. It doesn't tell you whether a human used AI tools for parts of the production, such as a stem, a sample or mastering.
- Rights and ownership. A result says nothing about who owns a track or whether it may be used. A human-made track can still infringe rights, and an AI-generated one can be licensed properly.
- Models it doesn't know. A track from a Gen AI music model that Cyanite has no detector for can get a low score.
Troubleshooting
| Problem | Cause | What to do |
|---|---|---|
401 | Invalid API key, or AI Music Detection isn't enabled. | Check x-api-key, or contact Cyanite. |
401 when requesting other models | Your account only has AI Music Detection. | Only request AiMusicDetectionV1. The error's detail names the models you can't access. |
404 | The track doesn't exist or doesn't belong to your account. | Check the Library Track ID. |
Empty items | The analysis hasn't finished yet. | Wait for the analysisJob/finished webhook before fetching the result. |
analysisJob/failed webhook | The track couldn't be analyzed, for example because it's too long. | Check the file, then upload it again. If it keeps failing, contact Cyanite. |
Next steps
- Quick Start Guide: upload a track and set up your webhook.
- AiMusicDetectionV1 schema:
the
AiMusicDetectionV1fields. - API Reference: the complete request and response schema.