---
title: "AudD for game developers"
description: "How game studios use AudD to check the audio files and trailers they ship for commercial recordings, to identify the song a player is listening to from inside a game, and to check clips and VODs that players submit. With the CLI commands, what each job costs, and where the token goes."
slug: "/resources/for/game-developers"
section: "for"
keywords: [audd, game development, game audio, copyrighted music, trailers, unity, music recognition, rhythm game, music trivia, ugc, vod, cli]
---

# AudD for game developers

If you make games, there are three ways to use our API. You can check the audio files and trailers of your game for recordings from our database before you ship. In the game, you can identify the song that's playing near the player, for music trivia or a rhythm feature. You can also check the clips and VODs that players send you. We wanted to make it as simple as possible: you send us the audio, and we send you the songs in it.

To check a folder of audio files with the [AudD CLI](https://docs.audd.io/cli), run these two commands:

```bash
audd recognize ./assets --enterprise --limit 25 --max-files 1000 --dry-run
audd recognize ./assets --enterprise --limit 25 --max-files 1000 --format csv > assets-music.csv
```

The first command only shows the plan: how many files there are and how many requests the scan would use. The second one sends the files and writes a CSV file with a row for every match: the file, the artist and the title, and where the song plays in the file (`start_seconds` and `end_seconds`). A file with no match gets a row too, with `no_match` in the `status` column.

## Check your game's audio and trailers

You can install the CLI with `npm install -g @audd/cli` (the [CLI docs](https://docs.audd.io/cli) list the other ways), and sign in with `audd login`. The CLI sends each file to our enterprise endpoint, which scans the whole file, and for a folder, it shows a plan with the number of requests and asks you to confirm.

When you upload a file, our servers think of it as a bunch of 12 seconds long audio chunks, and we count requests as 1 request per chunk; a partial last chunk counts too. With `--limit 25`, the CLI sets the upper bound for the number of chunks the server will recognize: 25 chunks, or 5 minutes of audio, per file. A 1-minute loop is 5 requests and a 2-minute trailer is 10, so 200 one-minute loops are 1,000 requests: $5 at $5.00 per 1,000. Results are cached by file contents, so when you run the scan again, only the new and changed files are sent.

A row with `matched` in the `status` column means that the file contains a recording from our database of 160 million songs. If you have licensed a track, it can match too, so keep a list of the tracks you have licensed and check the results against it. Music composed for your game will only match if that recording is in our database. The output will tell you which recording is playing, but not whether your licence covers it.

If you want to check every pull request that adds or changes media files, follow the steps in [Check pull requests for commercial music with GitHub Actions](/resources/integrations/github-actions). If you want to check a single trailer or gameplay video, follow the steps in [Check a video for copyrighted music before you upload it](/resources/recipes/check-a-video-for-copyrighted-music-before-upload).

## Identify the song the player is listening to

When the player presses a button, the game records 10 seconds from the microphone and sends the recording to your server. Your server sends the recording to AudD's Music Recognition API with your token. AudD's response will contain the title and artist of the song, and a link to the song's lis.tn page, and the game shows them. [Add music recognition to a Unity game](/resources/integrations/unity) has the scripts and a C# server, and [Add music recognition to a Flutter app](/resources/integrations/flutter) does the same for Flutter.

The result can be used for more than showing the song. `timecode` is the time in the recognized song when the fragment you sent is played, so the game knows how far into the song the player is. If you ask for the Spotify metadata with `return=spotify`, the Spotify block also has the length of the track, in `duration_ms`.

If the server has successfully processed the request, but there are no matches, the `result` field is `null`. It's not an error: show "No match" and let the player try again. If the music was quiet, or the recording was mostly talking or game sounds, ask the player to move closer to the speaker.

### Keep the token on your server

You can share the results with your players, but please don't include your API tokens in the client-side software. If you put your token in a game, anyone who has a copy of the game can use the token to access the AudD API with your account. There are no rate limits on the standard endpoint: you can send requests in parallel, as many as you need, and so can anyone with your token. Your server should limit how often each player can call it, and [Keeping your API token on the server](/resources/concepts/keeping-your-token-server-side) shows a complete server that does.

### What it costs

Every clip the game sends counts as one request. Normally, our plans include as-you-go pricing: some number of requests is included with your monthly bill, but you can send requests on top of what's included and will be charged for those separately:

```text
 10,000 songs a month:  $5 + 9 × $5.00 = $50   (Indie: $5 per month with 1,000 requests, then $5.00 per 1,000)
100,000 songs a month:  $450                    (Startup: $450 per month with 100,000 requests)
```

For a first try, the public `test` token allows 10 requests a day, and new accounts get a free trial of 300 requests, where available. The prices are from our [pricing page](https://audd.io/pricing/).

## Check clips and VODs that players submit

We have a separate endpoint that handles large files. It's especially useful for some types of UGC and other content that you might want to check against our copyrighted music DB, like the clips and VODs players send you for a contest or a highlight reel. We count requests to it as 1 request per 12 seconds of audio, so set `limit` on every call: a whole 60-minute VOD is 300 requests, or $1.50 at $5.00 per 1,000. The free trial lets you upload files to the enterprise endpoint, but you'll need a paid plan to send it a URL.

If you want to scan a folder of VODs and clips, follow the steps in [Scan your stream archive for copyrighted music](/resources/recipes/scan-vods-and-clips-for-copyrighted-music).

## What recognition finds

We recognize the recordings in our database of 160 million songs, or in your own catalog. A cover or a live take is a different recording, and it won't match the original. If a file has no match, we didn't find a known recording in it. That doesn't mean the file is free of commercial music. [What music recognition matches, and what it doesn't](/resources/concepts/what-recognition-matches) goes through the cases. If you want us to recognize your own recordings, like your game's soundtrack, contact us at [api@audd.io](mailto:api@audd.io).

---

**Related**

- [Add music recognition to a Unity game](/resources/integrations/unity)
- [Check pull requests for commercial music with GitHub Actions](/resources/integrations/github-actions)
- [Scan your stream archive for copyrighted music](/resources/recipes/scan-vods-and-clips-for-copyrighted-music)
- [AudD for Twitch streamers](/resources/for/twitch-streamers)
- [Keeping your API token on the server](/resources/concepts/keeping-your-token-server-side)
- [What music recognition matches, and what it doesn't](/resources/concepts/what-recognition-matches)

## Sitemap

See the [resources sitemap](https://audd.io/resources/sitemap.md) for every guide and the [glossary](https://audd.io/resources/reference/glossary.md) for AudD terms.
