Skip to content

AudDMusic/audd-openapi

Repository files navigation

audd-openapi

CI

The canonical OpenAPI 3.1 specification for the AudD music recognition API.

This repository is the source of truth that all official AudD SDKs build their typed models against. Third parties can also use this spec to generate their own clients.

File Purpose
openapi.yaml OpenAPI 3.1 spec covering every public AudD endpoint
fixtures/ Real captured API responses, PII scrubbed — used by every SDK's contract tests
tests/validate.py Validates each fixture against its schema in openapi.yaml
tests/capture_fixtures.py Re-capture fixtures from the live API (requires an api_token)

What's covered

  • Standard recognitionPOST/GET https://api.audd.io/
  • Enterprise recognitionPOST https://enterprise.audd.io/ (hours- to days-long files)
  • Stream managementsetCallbackUrl, getCallbackUrl, addStream, getStreams, setStreamUrl, deleteStream
  • LongpollGET /longpoll/
  • Custom catalog uploadPOST /upload/ (special access required)
  • Lyrics searchPOST /findLyrics/

The WebSocket recognition variant is intentionally not modeled — AudD recommends the HTTP endpoints for all use cases.

Validate locally

python -m venv .venv
source .venv/bin/activate
pip install -r requirements-dev.txt
python tests/validate.py

To re-capture fixtures from the live API:

AUDD_TEST_TOKEN_STD=... AUDD_TEST_TOKEN_ENTERPRISE=... \
    python tests/capture_fixtures.py
python tests/scrub_fixtures.py

Generate a client

This spec is hand-written and validates against real fixtures. You can use it with any OpenAPI-compatible code generator. Note that AudD's official SDKs are hand-written rather than generated — to maximize idiomatic feel in each language — but they validate against this same spec.

Contract drift detection

When this repo lands a change to openapi.yaml or fixtures/, a workflow fires repository_dispatch events at every audd-<lang> SDK repo to re-run their contract tests against the new spec. Each SDK also runs the same tests on a nightly cron as a safety net.

License

MIT — see LICENSE.

Support

Packages

 
 
 

Contributors

Languages