# Music Studio

The Music Studio API generates AI music, organizes it into a personal library, groups tracks into collections, drives continuous focus sessions, and shares tracks or collections through public links.

All generation runs on the Aitronos music engine. Call [List available music engines](/docs/api-reference/music/engines) to discover the enabled engines and their capabilities (maximum duration, vocals, stems, supported languages, and licence class) before submitting a job.

## Concepts

- **Engine** — an Aitronos-branded music engine identified by an internal `engine_key`. Each engine advertises its own capabilities and licence class.
- **Generation job** — an asynchronous request to produce a track. Submit it, then poll for status until it succeeds, fails, is cancelled, or is refused.
- **Track** — a produced piece of audio (id prefixed `mtrack_`). Tracks expose freshly-minted, short-TTL signed playback URLs.
- **Library** — your saved tracks. Saving adds a library edge (`mlib_`); it never modifies the track.
- **Collection** — a user-owned, ordered grouping of tracks (`mcoll_`). A track may belong to many collections.
- **Focus session** — a continuously generated stream of crossfade-able segments (`mfocus_`) toward a target length.
- **Share link** — a public, token-based link (`mslink_`) to a track or collection. The raw token is shown once.


## Authentication & scope

Every Music Studio endpoint (except the public share resolve) requires authentication via Bearer token or API key, and is scoped to an organization passed in the path as `{organization_id}`. The caller may only act within an organization they belong to.

## Licence honesty

Each engine and track carries a truthful `licence_class` (`commercial_cleared`, `commercial_enterprise`, `personal_only`, or `unclear`), a `commercial_use` boolean, and a `requires_attribution` boolean. These are never overstated — always check them before using generated audio commercially.

## Endpoints

| Group | Endpoint |
|  --- | --- |
| Engines | [List available music engines](/docs/api-reference/music/engines) |
| Generation | [Create a generation job](/docs/api-reference/music/create-generation) · [List generation jobs](/docs/api-reference/music/list-generations) · [Get a generation job](/docs/api-reference/music/get-generation) · [Cancel a generation job](/docs/api-reference/music/cancel-generation) |
| Tracks | [List saved tracks](/docs/api-reference/music/list-tracks) · [Get a track](/docs/api-reference/music/get-track) · [Save a track](/docs/api-reference/music/save-track) · [Remove a saved track](/docs/api-reference/music/unsave-track) · [Delete a track](/docs/api-reference/music/delete-track) |
| Collections | [Create a collection](/docs/api-reference/music/create-collection) · [List collections](/docs/api-reference/music/list-collections) · [Get a collection](/docs/api-reference/music/get-collection) · [Update a collection](/docs/api-reference/music/update-collection) · [Delete a collection](/docs/api-reference/music/delete-collection) · [Add a track to a collection](/docs/api-reference/music/add-collection-track) · [Remove a track from a collection](/docs/api-reference/music/remove-collection-track) · [List a collection's tracks](/docs/api-reference/music/list-collection-tracks) · [Reorder a collection](/docs/api-reference/music/reorder-collection) |
| Focus | [Start a focus session](/docs/api-reference/music/start-focus-session) · [Get a focus session](/docs/api-reference/music/get-focus-session) · [End a focus session](/docs/api-reference/music/end-focus-session) · [Promote a focus segment](/docs/api-reference/music/promote-focus-segment) |
| Sharing | [Share a track](/docs/api-reference/music/share-track) · [Share a collection](/docs/api-reference/music/share-collection) · [Revoke a share link](/docs/api-reference/music/revoke-share) · [Open a shared link](/docs/api-reference/music/resolve-share) · [Save a shared track](/docs/api-reference/music/save-shared-track) |
| Usage | [Get music usage](/docs/api-reference/music/get-usage) |