Server-Side Integration
Use ADN's API directly to store tracks and manage playback. Build fully custom experiences without ADN components.
Best For
Playing Tracks
Create play sessions and fetch track URLs from your server.
Use ADN's API directly from your server to create play sessions and fetch track URLs. Build completely custom playback experiences — no ADN web components involved.
1. Create an API Key
Go to Settings → API Keys and create an API Access key.
2. Create a Play Session
const response = await fetch('https://api.audiodelivery.net/v1/play_session/collection', {
method: 'POST',
headers: {
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json'
},
body: JSON.stringify({
collection_id,
variants: ['preview'],
is_downloadable: false,
expires_in: 3600 // session duration in seconds (default: 3600, min: 60, max: 86400)
})
});
const { play_session_id, tracks } = await response.json(); This is where you apply business logic — check subscriptions, verify purchases, or enforce access rules before creating the session.
3. Fetch Track Data
const { id: track_id } = tracks[0];
// No auth needed - the session ID acts as a bearer token
const response = await fetch(`https://api.audiodelivery.net/v1/play/${play_session_id}/${track_id}`);
const { variants } = await response.json();
const preview = variants.find(v => v.variant.variant_type.id === 'preview');
console.log(`Play Audio File: ${preview.url}`); 4. Custom Playback
Use the returned URL in your own audio player implementation. Works with any player library or native mobile audio APIs.
Waveform Data
levels field in the track response contains the data — use it to render waveforms
in your own player, or generate custom waveforms via the Audio Analysis variant type.
Cover Images & Theme Colors
cover_image
in the track response (in icon/small/regular/large sizes). You can also upload a cover image
separately via the API. When a cover image is present, ADN extracts a palette of colors
and selects a primary player_color — use these to style your player UI. The full
image_colors array contains all extracted colors with hex values, area, lightness, and saturation data.
Uploading Tracks
Use ADN's API to manage the entire upload flow from your server.
Use ADN's API directly from your server to create upload sessions, store tracks, and manage the entire upload flow. Build fully custom upload interfaces — no ADN web components involved.
1. Create an API Key
Go to Settings → API Keys and create an API Access key.
2. Create an Upload Session
const response = await fetch('https://api.audiodelivery.net/v1/upload_session', {
method: 'POST',
headers: {
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json'
},
body: JSON.stringify({
collection_id: 'COLLECTION-ID',
expires_in: 3600 // session duration in seconds (default: 3600, min: 60, max: 86400)
})
});
const { upload_session } = await response.json(); 3. Create Tracks Within the Session
const response = await fetch(`https://api.audiodelivery.net/v1/upload/${id}/track`, {
method: 'POST',
headers: {
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json'
},
body: JSON.stringify({ file_name: 'song.wav' })
});
const { track_upload } = await response.json();
const { method, upload_url, expires_at } = track_upload; 4. Upload Files
const file = document.querySelector('input[type="file"]').files[0];
await fetch(upload_url, {
method,
headers: { 'Content-Type': file.type },
body: file
}); 5. Optional: Webhooks
Enable a webhook under Settings → Webhooks to receive notifications when processing is complete.
Cover Images
image_colors)
that can be used to style your player UI.