Endpointpost /v3/scanAudio
Parameters
data string, required |
The complete audio file in base64-encoded format. |
spec_id int, optional |
The ID of an ad specification set against which you want to validate the creative. Defaults to 0 (IAB guidelines). |
workspace_id int, optional |
The ID of the workspace in which you want to store the results. |
name string, optional |
The file name of the audio file. Will be added to the JSON result, allowing you to keep track of which audio file you scanned. |
Response200 400 401 429
audio_wave array |
An object containing an image of the audio wave of the file.
|
info array |
An array with data points collected from the audio file. See the response object for more details.
|
job_id string |
A unique ID assigned to the scan.
|
meta array |
Meta-data about the scan, like the CPU used, the time it took to complete the scan, the server location, etc.
|
name string |
The name of the creative (copied from the payload).
|
tips_and_updatesscan_results object |
An object containing the full scan results, including the number of passed/failed tests.
The tests array contains the result of each test performed.
|
screenshot array |
A thumbnail of the audio wave. The url points to a JPG image.
The background_color is in hex-format. It generally goes well with the main colors of the screenshot.
|
|
cURL
curl "https://{your_name}.api.advalify.io/v3/scanAudio"
-H "X-ApiKey: TCm2Hd_rT4pRNvSZ2cGYCJ6... (example)"
-X POST
-d '{ "data": "dGhpcyBpcyBzb21lIGltYWdlIGRhdGE..." }'
Example Response
{
"audio_wave": {
"bytes": 5972,
"color": "#e0e0e0",
"mime_type": "image/png",
"url": "https://try.cdn.advalify.io/img/9k30d-79707058-54ad6e51-c2450-81e0a-ae2fa-xc7sgwhn.png" },
"info": {
"bit_rate": 192,
"bit_rate_mode": "Constant",
"channels": 2,
"codec": "MPEG Audio",
"compression": "lossy",
"duration": 414,
"file_extension": "mpeg",
"file_size": 9959059,
"format": "MPEG Audio",
"mime_type": "audio/mpeg",
"sample_rate": 44.1 },
"job_id": "c2450-81e0a-ae2fa",
"loudness": {
"lra": 13.3,
"lufs": -14.3,
"true_peak": -0.6 },
"meta": {
"api_version": "v3",
"cpu": "AMD 16-Core EPYC 7302P",
"creative_type": "audio",
"ram": "128GB",
"scan_duration": "1.010519",
"server_location": "ams",
"timestamp": 1652869385,
"duration": "1.207079" },
"name": "audio.mp3",
"scan_results": {
"failed": 0,
"passed": 8,
"report_url": "https://share.advalify.local/c2450-a876d-662d1-4a775",
"tests": {
"bit_rate": {
"actual": 192,
"data_type": "int",
"expected": 128,
"expected_text": "greater than or equal to 128 Kbps",
"name": "Audio Bit Rate",
"operator": ">=",
"result": "passed",
"unit": "Kbps" }, }, },
"screenshot": {
"thumbnail": {
"bytes": 1634,
"color": "#27292d",
"height": 57,
"mime_type": "image/jpg",
"url": "https://try.cdn.advalify.io/img/9k30d-79707058-54ad6e51-c2450-81e0a-ae2fa-5csfh9m4.jpg",
"width": 100 } } }
|