Playlists
Create playlist
POST
https://api.tunio.ai/ v1/ playlistsCreates a dynamic or static playlist in the account's library. A dynamic playlist picks tracks by its filters (genres, BPM, languages, instrumental, music source, collection).
Request body
Create playlist request
| Name | Type | Description |
|---|---|---|
| bpm_from | integer | Lower BPM bound. Must not be greater than bpm_to. |
| bpm_to | integer | Upper BPM bound. |
| collection_id | string | UUID of a music collection in your library to draw tracks from. |
| genres | string | Genre filter as a comma-separated string of genre names from GET /v1/genres, for example "lounge,jazz". A JSON array is rejected. |
| intro_asset_id | string | UUID of an audio asset in your library to play as the intro. |
| is_instrumental | boolean | true for instrumental tracks only, false for vocal tracks only; omit for both. |
| kind | string | "dynamic" (tracks are picked by the filters below) or "static" (a fixed track list). Default "dynamic"; any other value is replaced with "dynamic". |
| music_languages | string | Comma-separated language codes of the vocals to select, for example "en,es". |
| music_type | string | Music source: "ai", "human" or "mixed". Default "ai"; any other value is replaced with "ai". |
| titleRequired | string | Playlist title. Must not be blank. |
Request example
01{02 "bpm_from": 90,03 "bpm_to": 120,04 "collection_id": "string",05 "genres": "lounge,jazz",06 "intro_asset_id": "string",07 "is_instrumental": true,08 "kind": "dynamic",09 "music_languages": "en,es",10 "music_type": "ai",11 "title": "Evening lounge"12}
Responses
| Name | Type | Description |
|---|---|---|
| playlist | object | The playlist. |
| bpm_from | integer | Lower BPM bound of a dynamic playlist; null when not set. |
| bpm_to | integer | Upper BPM bound of a dynamic playlist; null when not set. |
| collection | object | Collection the playlist draws from; omitted when collection_id is null. |
| collection_id | string | UUID of the music collection the playlist draws tracks from; null when it uses the whole catalog. |
| cover_id | string | UUID of the cover image; null when the playlist has none. |
| created_at | string | Creation time, RFC 3339 in UTC. |
| genres | array | Genre filter of a dynamic playlist, as genre names from GET /v1/genres. Empty when not set. |
| internal_name | string | Internal name used by Tunio staff; usually null. |
| intro_asset | object | Intro asset of the playlist; omitted when intro_asset_id is null. |
| intro_asset_id | string | UUID of the intro audio asset; null when the playlist has none. |
| is_instrumental | boolean | Instrumental filter: true for instrumental tracks only, false for vocal tracks only. Omitted when not set. |
| is_open_music | boolean | Whether this is an open-music playlist: tracks without watermarks that play directly and can be started or paused at will. Such playlists are left out of GET /v1/playlists?allow_insertion=true. |
| is_public | boolean | Whether the playlist is published in the public catalog. Playlists created through the API are never public. |
| kind | string | "dynamic" (tracks are picked by the filters) or "static" (a fixed track list). |
| music_languages | string | Comma-separated language codes of the vocals a dynamic playlist selects, for example "en,es"; null when not set. |
| music_type | string | Music source: "ai" (AI-generated), "human" (human-made) or "mixed". |
| original_playlist_id | string | UUID of the playlist this one was copied from; null for an original playlist. |
| playlist_id | string | Playlist UUID. |
| title | string | Playlist title. |
| total_music_duration | integer | Total duration of the playlist's tracks, in seconds. |
| tracks_count | integer | Number of tracks in the playlist. |
| user | object | Owner of the playlist. |
| success | boolean | Always true. |
| Name | Type | Description |
|---|---|---|
| errors | object | Failed validation rules keyed by JSON field name, for example "required field", "min=1" or "oneof=ai human mixed". |
| message | string | Always "validation_error". |
| success | boolean | Always false for error payloads. |
| Name | Type | Description |
|---|---|---|
| message | string | Error code or human-readable error details. |
| success | boolean | Always false for error payloads. |
| Name | Type | Description |
|---|---|---|
| message | string | Error code or human-readable error details. |
| success | boolean | Always false for error payloads. |
| Name | Type | Description |
|---|---|---|
| message | string | Error code or human-readable error details. |
| success | boolean | Always false for error payloads. |