Standard, enterprise, or streams: how to choose
Pick the right AudD recognition surface for your input: standard for a short clip, enterprise for long files, streams for continuous live audio.
AudD allows you to recognize music both in audio files (from TikTok UGC to microphone recordings) and live audio streams, and there are 3 ways to send us the audio. On this page: a decision rule, a side-by-side table, the reasons behind it, and four worked examples.
TL;DR
- If you want to identify one song in a short clip, use the standard endpoint (
POST https://api.audd.io/). - If you need to recognize longer audio files, or files with more than one song, use the enterprise endpoint (
POST https://enterprise.audd.io/) instead. - If you want to identify the songs that are being played on radio stations, Twitch channels or YouTube live streams, use streams:
addStreamonapi.audd.io, then callbacks or longpoll.
If your input never ends, it’s probably a stream. If it ends, it’s a file: send it to the standard or the enterprise endpoint.
Decision table
| Standard | Enterprise | Streams | |
|---|---|---|---|
| You send | a short clip, as file or url | an audio or video file, or a web-page URL | a live stream URL, once |
| What’s analyzed | the first 12 seconds; up to 10 MB | the whole file, in 12-second chunks | the stream, continuously |
| What you get back | one best match, or result: null | every recognized track, chunk by chunk | one result per song, by callback or longpoll |
| Response time | under 2 seconds | seconds to minutes | real time |
| Counted as | 1 request per call | 1 request per 12 seconds (set limit) | $45 per concurrent stream per month |
test token | yes, 10 requests per day | no | no |
ISRC, UPC, score | not in standard results | on request at [email protected] | score for every streams account; ISRC/UPC on request at [email protected] |
| Typical use | ”name that song” button, voice query | DJ set, podcast, UGC scan | radio, Twitch, YouTube live monitoring |
Why this matters
The three are not interchangeable: choosing the wrong one will result in the wrong shape of data (one song where you needed a tracklist), or in slower and more expensive requests. The standard endpoint is right for a “what’s this song” button and wrong for a two-hour DJ set: the file is far over 10 MB, and even a file that fit would get one song back, not a tracklist. The enterprise response is different from the standard endpoint’s: result is an array of chunks, and each chunk has its offset in the file and the songs recognized in it. You can send a 5-second clip to the enterprise endpoint, but that is more work: you deal with chunks and 12-second counting for an answer that the standard endpoint gives you in one call.
Streams work the other way round: they’re push, and our servers send each result to your server as a callback. The standard and enterprise endpoints are pull: you send a file and get the result in the response to the same request. Don’t call recognize() on a live stream in a loop: add it with addStream, and receive the results in the callbacks or with longpoll. You can’t use addStream for a finite file either. Pick the endpoint before you write code: the request, the response you parse, the errors you handle and how requests are counted all follow from it.
The standard endpoint: one clip, one answer
POST https://api.audd.io/ is for short audio clips. Provide the URL of the file in the url parameter, or post the file itself in the file parameter. The maximum size of a file you upload is 10 MB, and only the first 12 seconds are analyzed. Supported audio formats: MP3, WAV, FLAC, M4A, OGG, AAC, WMA, and AIFF.
If the server has successfully processed the request, but there are no matches, the result field is null. It’s not an error, so check for it in your code.
api_token is required for all your requests. Send return with a comma-separated list of apple_music, spotify, deezer, musicbrainz for streaming links and more metadata; each provider’s data comes back in a field of the same name.
from audd import AudD
audd = AudD("your-api-token") # get your own token at dashboard.audd.io
result = audd.recognize("https://audd.tech/example.mp3")
print(f"{result.artist} — {result.title}" if result else "no match")
The enterprise endpoint: long files, every song
We have a separate endpoint that handles large files: POST https://enterprise.audd.io/. It takes anything the standard endpoint can’t: full-length songs, short-form videos, podcasts, broadcasts, and hours- or days-long DJ sets. There is no practical limit on the file size, and it also accepts video files: MP4, AVI, MOV, MKV, and WebM. You don’t have to have an enterprise account in order to use the enterprise endpoint: any paid plan can use it.
When you upload a file, our servers split it into 12-second chunks, and the response contains all the tracks recognized in them. timecode is the position, in the original song, where the matched fragment is playing. offset is the position, in the audio file you submitted, of the start of the 12-second fragment that contains matches. start_offset and end_offset are the positions (in milliseconds), in the 12-second fragment, of the start and end of the fragment we matched to a song.
The requests are counted as 1 request per 12 seconds of audio. If you don’t want every one of these chunks to be recognized and counted as requests, there are parameters that you can use:
limit- the upper bound for the number of chunks the server will recognize.every- how many chunks should be recognized in a row.skip- how many 12-second chunks are skipped after the ones that are recognized.skip_first_seconds- how many seconds of the file to skip before the first chunk.accurate_offsets- set to"true"to get accurate start and end offsets of the recognized tracks.
Always set
limitduring development. Without a limit, the server can process hours of audio before it returns: hundreds of chunks, all counted as requests. Start with a smalllimit, and raise it only after you know what your real files cost.
matches = audd.recognize_enterprise(
"https://audd.tech/djatwork_example.mp3",
limit=10, # cap metered chunks while developing
)
for m in matches:
print(m.timecode, m.artist, "—", m.title)
Streams: continuous live audio
For live audio streams, use the streams methods on api.audd.io: they power radio charts, now-playing widgets, and bots for YouTube and Twitch streams.
- Use the
setCallbackUrlAPI method to set the callback URL once. - Add the streams using the
addStreamAPI method, with theurland aradio_id: any integer that will identify this stream for you. We support most of the stream formats, including DASH, Icecast, HLS, m3u/m3u8. We also natively support Twitch broadcasts and YouTube live streams, and you can sendtwitch:<channel>,youtube:<video_id>, andyoutube-ch:<channel_id>as the URL. - Receive the results in the callbacks (we POST them to your URL), or use longpoll (
GET https://api.audd.io/longpoll/) to get them from your client. Longpoll is part of streams, and it needs a callback URL too. You can manage the streams withgetStreams,setStreamUrl, anddeleteStream.
By default, callbacks are sent after the song ends and contain the total played time of the song. Set callbacks="before" on addStream if you want to receive the callbacks as soon as a song starts playing; if you send before, you won’t receive the total played time. If something happens to an audio stream, we’ll let you know by sending a notification: 650 means that we can’t connect to the stream, and 651 means that we don’t receive any music from the stream, only white noise.
audd.streams.set_callback_url("https://yourapp.example/audd-callback")
audd.streams.add(url="twitch:monstercat", radio_id=3249)
You pay for the maximum number of streams you run at the same time: set your stream limit on the API Dashboard. If you want additional metadata (e.g. Apple Music, Spotify, MusicBrainz metadata) to be returned with the callbacks, contact us: [email protected]. How you receive the results, callbacks or longpoll, is a separate choice: see the related concept page below.
A decision tree in prose
Ask these questions in order.
- Does your input ever end? If not, use streams: we recognize what’s playing on radio stations and audio streams, 24/7. Add the streams using the
addStreamAPI method. - If it ends, is it a short clip, and is one song the answer? Then use the standard endpoint, the default API method (
recognizein the SDKs), for a few seconds of audio, up to 10 MB. - Is the file long, can it have more than one song, or do you want every track? Then use the enterprise endpoint. Set
limitto cap the requests per file while you develop (limit=10means at most 10);everyandskiplet you recognize only some of the chunks.
One edge case is a single full-length song (three to five minutes). If it’s under 10 MB and its first 12 seconds are enough to identify it, the standard endpoint handles it. If you want every recognized segment, or the file is over 10 MB, use the enterprise endpoint.
Worked example
1. A 10-second clip recorded from a phone mic. This is Shazam-style recognition of one short clip, so use the standard endpoint. Post the file in the file parameter: we recommend sending a file this way when the file is not available by a URL.
2. A 2-hour recorded DJ set you want a full tracklist for. It ends, so it’s not a stream, and you want every track in it: use the enterprise endpoint. Use the offset of each chunk (in the Python SDK, each match’s start_seconds) to turn the response into a tracklist with timestamps. If you don’t need every chunk, use skip and every: if you want to recognize 12 seconds, then skip 48 seconds, then recognize 12 seconds again, skip 48 seconds again, etc., these parameters should be skip=4 and every=1.
3. A 24/7 community radio station. It never ends, so there’s no file to send: monitor its airplay, report played songs, or create radio charts with streams. Call setCallbackUrl once, and then addStream with the station’s Icecast or HLS URL and a radio_id you choose. Use callbacks="before" if you want to show the song that is playing now.
4. A TikTok video URL. It’s a finite file, and one short-form video can have more than one track in it, so send the URL to the enterprise endpoint: our server will download and recognize music from it; you can send a URL of a web page that contains audio or video instead of the URL of the actual audio file. If you only want one match from a short audio clip cut from the video, use the standard endpoint with a url.
Common mistakes
- Sending a long file to the standard endpoint. A file over 10 MB gets error #400 (audio file too large). Even if a long file fits, only its first 12 seconds are analyzed, so send it to the enterprise endpoint.
- Calling enterprise without
limit. Every chunk the server recognizes counts as one request, so a multi-hour file without a limit counts hundreds of them. Let us know if you want a hard monthly limit on requests: send an email to [email protected]. - Treating
result: nullas an error. If there are no matches, the request was still successfully processed: the clip might be mostly speech or silence, or the song might not be in our database. - Starting longpoll without a callback URL set. Please set the callback URL to a URL that responds
200 OKto POST requests even if you want to use longpoll only. Otherwise, the poll returns no results. If you don’t have any such URLs, sethttps://audd.tech/empty/as the callback URL.
Related
Reading this as an AI agent? The raw Markdown is at concepts/standard-vs-enterprise-vs-streams.md, and the full index is /resources/llms.txt.
