# API reference

Every endpoint, generated from the OpenAPI spec: base URL, keys, errors, and a table of all endpoints.

activQC by wavbee checks music releases before they reach the stores: the metadata, the cover art and the
audio. Send a release and get back a verdict and a plain report of every finding.

When something is unclear, activQC asks the artist a question instead of rejecting the release. Each
question comes with ready answers; answering one fixes the release and re-checks only what changed.

Every request carries a secret key as `Authorization: Bearer <key>`. Test keys start with `wqc_test_`:
the same checks run, apart from live data (matching against other recordings can be limited or simulated, and
the finding says so). Live keys start with `wqc_live_`. Keep keys on your server. Requests that create something take an `Idempotency-Key` header.

Guides, examples and the Markdown versions of these pages are at `/docs` (start with `/docs/quickstart`).
For AI coding agents: `/llms.txt` and `/llms-full.txt`.

## Base URL and keys

Every path below starts at your activQC host. The examples read it, and your key, from two environment
variables:

```bash
export ACTIVQC_BASE_URL="https://YOUR-ACTIVQC-HOST"
export ACTIVQC_KEY="wqc_test_..."

curl -s "$ACTIVQC_BASE_URL/v1/ping" -H "Authorization: Bearer $ACTIVQC_KEY"
```

Send the key as `Authorization: Bearer <key>` on every call. A `wqc_test_` key runs every check for real and
bills nothing; a `wqc_live_` key works once your account is live. Keep keys on your server.
[Keys, sandbox and live](https://activqc.wavbee.com/docs/authentication.md).

## Errors and retries

Every error has the same shape. Branch on `code`, never on `message`.

```json
{ "errors": [ { "code": "validation_error", "message": "release.title is missing", "field": "release.title" } ] }
```

Requests that create something take an `Idempotency-Key` header. Retry a timed-out request with the same key
and you get the first answer, without the work being done or counted twice.
[Errors and idempotency](https://activqc.wavbee.com/docs/errors.md).

## For tools and agents

- The OpenAPI 3 description: [/openapi.json](https://activqc.wavbee.com/openapi.json) or [/openapi.yaml](https://activqc.wavbee.com/openapi.yaml). Its server is
  the host you fetched it from.
- Every docs page is also plain Markdown: add `.md` to its URL, for example [/docs/api-qc-runs.md](https://activqc.wavbee.com/docs/api-qc-runs.md).
- [/llms.txt](https://activqc.wavbee.com/llms.txt) lists every page; [/llms-full.txt](https://activqc.wavbee.com/llms-full.txt) is all of them in one file.
- Try calls in your browser with the [interactive console](https://activqc.wavbee.com/api-docs).

## Endpoints

### Meta

Check that your key works. [All Meta endpoints](https://activqc.wavbee.com/docs/api-meta.md).

| Method | Path | What it does |
|---|---|---|
| `GET` | [`/v1/ping`](https://activqc.wavbee.com/docs/api-meta.md#get-v1-ping) | Health ping for an authenticated key |

### QC runs

Send a release for checking, read the verdict and the report, and ask about the rules. [All QC runs endpoints](https://activqc.wavbee.com/docs/api-qc-runs.md).

| Method | Path | What it does |
|---|---|---|
| `POST` | [`/v1/qc/assist`](https://activqc.wavbee.com/docs/api-qc-runs.md#post-v1-qc-assist) | Answer what an artist typed about a draft's open question |
| `POST` | [`/v1/qc/conversation`](https://activqc.wavbee.com/docs/api-qc-runs.md#post-v1-qc-conversation) | Advance the deterministic builder chat by one turn |
| `POST` | [`/v1/qc/imports/wavbee`](https://activqc.wavbee.com/docs/api-qc-runs.md#post-v1-qc-imports-wavbee) | Turn a wavbee release into a QC run payload |
| `PUT` | [`/v1/qc/findings/{id}/review`](https://activqc.wavbee.com/docs/api-qc-runs.md#put-v1-qc-findings-id-review) | Say whether a QC finding was right |
| `GET` | [`/v1/qc/accuracy`](https://activqc.wavbee.com/docs/api-qc-runs.md#get-v1-qc-accuracy) | How often each rule was judged right |
| `GET` | [`/v1/qc/rules`](https://activqc.wavbee.com/docs/api-qc-runs.md#get-v1-qc-rules) | Every rule QC runs, in words |
| `GET` | [`/v1/qc/rules/search`](https://activqc.wavbee.com/docs/api-qc-runs.md#get-v1-qc-rules-search) | Find the rules, policies and decisions that bear on a question |
| `POST` | [`/v1/qc/runs`](https://activqc.wavbee.com/docs/api-qc-runs.md#post-v1-qc-runs) | Submit a release for QC |
| `GET` | [`/v1/qc/runs/{id}`](https://activqc.wavbee.com/docs/api-qc-runs.md#get-v1-qc-runs-id) | Fetch a QC run |
| `GET` | [`/v1/qc/runs/{id}/report`](https://activqc.wavbee.com/docs/api-qc-runs.md#get-v1-qc-runs-id-report) | Fetch the full QC report (per-rule findings) |
| `POST` | [`/v1/qc/validate`](https://activqc.wavbee.com/docs/api-qc-runs.md#post-v1-qc-validate) | Validate a draft release without creating a run |

### Clarifications

The questions activQC asks instead of rejecting, and how to answer them. [All Clarifications endpoints](https://activqc.wavbee.com/docs/api-clarifications.md).

| Method | Path | What it does |
|---|---|---|
| `GET` | [`/v1/qc/runs/{qc_run_id}/clarifications`](https://activqc.wavbee.com/docs/api-clarifications.md#get-v1-qc-runs-qc-run-id-clarifications) | List the questions a run raised |
| `POST` | [`/v1/qc/clarifications/{id}/answer`](https://activqc.wavbee.com/docs/api-clarifications.md#post-v1-qc-clarifications-id-answer) | Answer a clarification |

### Release drafts

Your own release form with the same live checks and questions as the embedded builder. [All Release drafts endpoints](https://activqc.wavbee.com/docs/api-release-drafts.md).

| Method | Path | What it does |
|---|---|---|
| `GET` | [`/v1/release_drafts`](https://activqc.wavbee.com/docs/api-release-drafts.md#get-v1-release-drafts) | List release drafts |
| `POST` | [`/v1/release_drafts`](https://activqc.wavbee.com/docs/api-release-drafts.md#post-v1-release-drafts) | Create a release draft |
| `GET` | [`/v1/release_drafts/{id}`](https://activqc.wavbee.com/docs/api-release-drafts.md#get-v1-release-drafts-id) | Fetch a release draft |
| `PATCH` | [`/v1/release_drafts/{id}`](https://activqc.wavbee.com/docs/api-release-drafts.md#patch-v1-release-drafts-id) | Update a release draft via JSON Patch or full editable payload |
| `POST` | [`/v1/release_drafts/{id}/validate`](https://activqc.wavbee.com/docs/api-release-drafts.md#post-v1-release-drafts-id-validate) | Validate the stored draft payload without creating a run |
| `GET` | [`/v1/release_drafts/{id}/questions`](https://activqc.wavbee.com/docs/api-release-drafts.md#get-v1-release-drafts-id-questions) | List open clarification questions for a release draft |
| `POST` | [`/v1/release_drafts/{id}/answers`](https://activqc.wavbee.com/docs/api-release-drafts.md#post-v1-release-drafts-id-answers) | Answer an open question on a release draft and re-validate |
| `POST` | [`/v1/release_drafts/{id}/submit`](https://activqc.wavbee.com/docs/api-release-drafts.md#post-v1-release-drafts-id-submit) | Submit a release draft as a QC run |
| `POST` | [`/v1/release_drafts/{id}/archive`](https://activqc.wavbee.com/docs/api-release-drafts.md#post-v1-release-drafts-id-archive) | Archive a release draft |

### Builder

Uploads, lookups and fixes used by the release builder and the Draft API. [All Builder endpoints](https://activqc.wavbee.com/docs/api-builder.md).

| Method | Path | What it does |
|---|---|---|
| `POST` | [`/v1/builder/cover_fixes`](https://activqc.wavbee.com/docs/api-builder.md#post-v1-builder-cover-fixes) | Take what may not be on a cover off it ("Remove it for me") |
| `GET` | [`/v1/builder/cover_fixes/{id}`](https://activqc.wavbee.com/docs/api-builder.md#get-v1-builder-cover-fixes-id) | Where a cover fix has got to |
| `POST` | [`/v1/builder/fixes`](https://activqc.wavbee.com/docs/api-builder.md#post-v1-builder-fixes) | Fix what can be fixed in a builder master ("Fix it for me") |
| `GET` | [`/v1/builder/fixes/{id}`](https://activqc.wavbee.com/docs/api-builder.md#get-v1-builder-fixes-id) | Where a fix has got to, or what one would do |
| `GET` | [`/v1/builder/lookups`](https://activqc.wavbee.com/docs/api-builder.md#get-v1-builder-lookups) | What the release builder offers to choose from |
| `GET` | [`/v1/builder/people`](https://activqc.wavbee.com/docs/api-builder.md#get-v1-builder-people) | Names the release builder offers while a credit is typed |
| `POST` | [`/v1/builder/trims`](https://activqc.wavbee.com/docs/api-builder.md#post-v1-builder-trims) | Trim the long silence off a builder master ("Trim it for me") |
| `GET` | [`/v1/builder/trims/{id}`](https://activqc.wavbee.com/docs/api-builder.md#get-v1-builder-trims-id) | Where a trim has got to |
| `GET` | [`/v1/builder/uploads/{id}/waveform`](https://activqc.wavbee.com/docs/api-builder.md#get-v1-builder-uploads-id-waveform) | The shape of an uploaded master, for a player's waveform |
| `POST` | [`/v1/builder/uploads`](https://activqc.wavbee.com/docs/api-builder.md#post-v1-builder-uploads) | Upload a builder's cover or master (multipart `file` and `kind`), or finish a direct upload |
| `POST` | [`/v1/builder/uploads/direct`](https://activqc.wavbee.com/docs/api-builder.md#post-v1-builder-uploads-direct) | Start a direct upload: describe the file, get a link to PUT it to |

### Embed

Mint a short-lived session for the embedded builder, mastering bench or stem splitter. [All Embed endpoints](https://activqc.wavbee.com/docs/api-embed.md).

| Method | Path | What it does |
|---|---|---|
| `POST` | [`/v1/embed/sessions`](https://activqc.wavbee.com/docs/api-embed.md#post-v1-embed-sessions) | Mint a short-lived embed session |

### Realtime

Mint a short-lived token so a browser can receive live updates over WebSocket. [All Realtime endpoints](https://activqc.wavbee.com/docs/api-realtime.md).

| Method | Path | What it does |
|---|---|---|
| `POST` | [`/v1/realtime/tokens`](https://activqc.wavbee.com/docs/api-realtime.md#post-v1-realtime-tokens) | Mint a short-lived Action Cable token |

### Webhooks

Endpoints that receive signed events from activQC. [All Webhooks endpoints](https://activqc.wavbee.com/docs/api-webhooks.md).

| Method | Path | What it does |
|---|---|---|
| `GET` | [`/v1/webhook_endpoints`](https://activqc.wavbee.com/docs/api-webhooks.md#get-v1-webhook-endpoints) | List webhook endpoints |
| `POST` | [`/v1/webhook_endpoints`](https://activqc.wavbee.com/docs/api-webhooks.md#post-v1-webhook-endpoints) | Register a webhook endpoint |
| `GET` | [`/v1/webhook_endpoints/{id}`](https://activqc.wavbee.com/docs/api-webhooks.md#get-v1-webhook-endpoints-id) | Fetch a webhook endpoint |
| `DELETE` | [`/v1/webhook_endpoints/{id}`](https://activqc.wavbee.com/docs/api-webhooks.md#delete-v1-webhook-endpoints-id) | Delete or disable a webhook endpoint |
| `POST` | [`/v1/webhook_endpoints/{id}/rotate_secret`](https://activqc.wavbee.com/docs/api-webhooks.md#post-v1-webhook-endpoints-id-rotate-secret) | Rotate the signing secret |
| `POST` | [`/v1/webhook_endpoints/{id}/test`](https://activqc.wavbee.com/docs/api-webhooks.md#post-v1-webhook-endpoints-id-test) | Send a synthetic ping through the real signing path |

### Events

The event log: list past events and redeliver one. [All Events endpoints](https://activqc.wavbee.com/docs/api-events.md).

| Method | Path | What it does |
|---|---|---|
| `GET` | [`/v1/events`](https://activqc.wavbee.com/docs/api-events.md#get-v1-events) | List events and their delivery state |
| `POST` | [`/v1/events/{id}/redeliver`](https://activqc.wavbee.com/docs/api-events.md#post-v1-events-id-redeliver) | Re-queue an event with its original signed payload |

### Audio

Tell vocal tracks from instrumentals. [All Audio endpoints](https://activqc.wavbee.com/docs/api-audio.md).

| Method | Path | What it does |
|---|---|---|
| `POST` | [`/v1/audio/classifications`](https://activqc.wavbee.com/docs/api-audio.md#post-v1-audio-classifications) | Tell vocal tracks from instrumentals |
| `GET` | [`/v1/audio/classifications/{id}`](https://activqc.wavbee.com/docs/api-audio.md#get-v1-audio-classifications-id) | Where a classification has got to |

### Mastering

Master a track, render versions, split stems and release the files. [All Mastering endpoints](https://activqc.wavbee.com/docs/api-mastering.md).

| Method | Path | What it does |
|---|---|---|
| `GET` | [`/v1/mastering/sessions`](https://activqc.wavbee.com/docs/api-mastering.md#get-v1-mastering-sessions) | List the tenant's sessions, newest first |
| `POST` | [`/v1/mastering/sessions`](https://activqc.wavbee.com/docs/api-mastering.md#post-v1-mastering-sessions) | Upload a master (multipart `file`) or name one by `audio_url` |
| `GET` | [`/v1/mastering/sessions/{id}`](https://activqc.wavbee.com/docs/api-mastering.md#get-v1-mastering-sessions-id) | Fetch a session, its assessment and its renders |
| `POST` | [`/v1/mastering/sessions/{id}/renders`](https://activqc.wavbee.com/docs/api-mastering.md#post-v1-mastering-sessions-id-renders) | Render the master with chosen settings |
| `GET` | [`/v1/mastering/sessions/{id}/visual`](https://activqc.wavbee.com/docs/api-mastering.md#get-v1-mastering-sessions-id-visual) | The source's waveform, spectrum, spectrogram and clipping map |
| `GET` | [`/v1/mastering/renders/{id}/visual`](https://activqc.wavbee.com/docs/api-mastering.md#get-v1-mastering-renders-id-visual) | A render's waveform, spectrum, spectrogram and clipping map |
| `GET` | [`/v1/mastering/renders/{id}`](https://activqc.wavbee.com/docs/api-mastering.md#get-v1-mastering-renders-id) | Fetch a render |
| `POST` | [`/v1/mastering/renders/{id}/release`](https://activqc.wavbee.com/docs/api-mastering.md#post-v1-mastering-renders-id-release) | Release a finished render for full-quality download in a payment-held embed session |
| `POST` | [`/v1/mastering/sessions/{id}/stems`](https://activqc.wavbee.com/docs/api-mastering.md#post-v1-mastering-sessions-id-stems) | Split the master into vocals, drums, bass and other |
| `GET` | [`/v1/mastering/stems/{id}`](https://activqc.wavbee.com/docs/api-mastering.md#get-v1-mastering-stems-id) | Fetch a stem separation |
| `POST` | [`/v1/mastering/stems/{id}/release`](https://activqc.wavbee.com/docs/api-mastering.md#post-v1-mastering-stems-id-release) | Release a finished stem split for full-quality download in a payment-held embed session |

### Mastering references

Reference tracks that guide a master. [All Mastering references endpoints](https://activqc.wavbee.com/docs/api-mastering-references.md).

| Method | Path | What it does |
|---|---|---|
| `GET` | [`/v1/mastering/references`](https://activqc.wavbee.com/docs/api-mastering-references.md#get-v1-mastering-references) | List the reference library |
| `POST` | [`/v1/mastering/references`](https://activqc.wavbee.com/docs/api-mastering-references.md#post-v1-mastering-references) | Add a reference track (multipart `file`, or `audio_url`) |
| `GET` | [`/v1/mastering/references/{id}`](https://activqc.wavbee.com/docs/api-mastering-references.md#get-v1-mastering-references-id) | Fetch a reference with its measurements |
| `PATCH` | [`/v1/mastering/references/{id}`](https://activqc.wavbee.com/docs/api-mastering-references.md#patch-v1-mastering-references-id) | Correct a reference, or take it out of (or back into) training |
| `DELETE` | [`/v1/mastering/references/{id}`](https://activqc.wavbee.com/docs/api-mastering-references.md#delete-v1-mastering-references-id) | Remove a reference |

### Mastering profiles

Genre profiles and the closest match for a session. [All Mastering profiles endpoints](https://activqc.wavbee.com/docs/api-mastering-profiles.md).

| Method | Path | What it does |
|---|---|---|
| `GET` | [`/v1/mastering/profiles`](https://activqc.wavbee.com/docs/api-mastering-profiles.md#get-v1-mastering-profiles) | List the library's genres and whether each can make a profile |
| `GET` | [`/v1/mastering/profiles/{genre}`](https://activqc.wavbee.com/docs/api-mastering-profiles.md#get-v1-mastering-profiles-genre) | A genre's profile, built from its approved references |
| `GET` | [`/v1/mastering/sessions/{id}/closest`](https://activqc.wavbee.com/docs/api-mastering-profiles.md#get-v1-mastering-sessions-id-closest) | The references that sound closest to this master, as a profile |

### Mastering feedback

Rate a render so later masters improve. [All Mastering feedback endpoints](https://activqc.wavbee.com/docs/api-mastering-feedback.md).

| Method | Path | What it does |
|---|---|---|
| `POST` | [`/v1/mastering/renders/{id}/feedback`](https://activqc.wavbee.com/docs/api-mastering-feedback.md#post-v1-mastering-renders-id-feedback) | Judge a render |
| `GET` | [`/v1/mastering/feedback`](https://activqc.wavbee.com/docs/api-mastering-feedback.md#get-v1-mastering-feedback) | Every engineer's feedback, newest first (200 most recent) |

### Billing

Your usage, and the service levels. [All Billing endpoints](https://activqc.wavbee.com/docs/api-billing.md).

| Method | Path | What it does |
|---|---|---|
| `GET` | [`/v1/usage`](https://activqc.wavbee.com/docs/api-billing.md#get-v1-usage) | Metered usage for the current period |
| `GET` | [`/v1/sla`](https://activqc.wavbee.com/docs/api-billing.md#get-v1-sla) | Measured fast-lane latency percentiles |

### Accounts

[All Accounts endpoints](https://activqc.wavbee.com/docs/api-accounts.md).

| Method | Path | What it does |
|---|---|---|
| `GET` | [`/v1/accounts/{id}`](https://activqc.wavbee.com/docs/api-accounts.md#get-v1-accounts-id) | Fetch an uploading account's trust |
| `PUT` | [`/v1/accounts/{id}`](https://activqc.wavbee.com/docs/api-accounts.md#put-v1-accounts-id) | Save your own trust score for an account |
| `POST` | [`/v1/accounts/batch`](https://activqc.wavbee.com/docs/api-accounts.md#post-v1-accounts-batch) | Save your own trust scores for many accounts |

### Roster

[All Roster endpoints](https://activqc.wavbee.com/docs/api-roster.md).

| Method | Path | What it does |
|---|---|---|
| `GET` | [`/v1/roster`](https://activqc.wavbee.com/docs/api-roster.md#get-v1-roster) | List the approved artists, approved labels and high-profile names |
| `POST` | [`/v1/roster`](https://activqc.wavbee.com/docs/api-roster.md#post-v1-roster) | Add names |
| `DELETE` | [`/v1/roster/{id}`](https://activqc.wavbee.com/docs/api-roster.md#delete-v1-roster-id) | Remove a name |

