Finetuning.aiFinetuning.ai

POST /v1/playlists/:id/tracks/bulk-remove

Remove up to 100 tracks from a playlist

Remove up to 100 tracks from one of your playlists in a single request. This only takes the tracks out of the playlist — they stay in your library. To delete tracks permanently, use POST /v1/generations/bulk-delete.

Request

POST https://pub.finetuning.ai/v1/playlists/:id/tracks/bulk-remove

Path parameters

ParameterTypeDescription
idstringThe playlist ID (see GET /v1/playlists)

Headers

HeaderTypeRequiredDescription
X-API-KeystringYesYour API key
Content-TypestringYesapplication/json

Body

FieldTypeRequiredDescription
trackIdsstring[]Yes1–100 track IDs to remove from this playlist

Example

curl -X POST https://pub.finetuning.ai/v1/playlists/9b2f51e2-4c1a-4b8e-9d3e-2f7a8c641b05/tracks/bulk-remove \
  -H "X-API-Key: ft_live_your_key_here" \
  -H "Content-Type: application/json" \
  -d '{"trackIds": ["a4f6c1e9-2d3b-4c8a-9e5f-7b1d0c2a8e64", "c7d2e8a1-5f4b-4e9c-8a6d-3b9f1e0c5a72"]}'

Response

200 OK
{
  "data": {
    "removed": ["a4f6c1e9-2d3b-4c8a-9e5f-7b1d0c2a8e64"],
    "errors": [
      { "trackId": "c7d2e8a1-5f4b-4e9c-8a6d-3b9f1e0c5a72", "error": "Track not found in playlist or not authorized" }
    ]
  }
}

Response fields

FieldTypeDescription
data.removedstring[]Track IDs that were successfully removed
data.errorsarrayPer-item failures — omitted when every track was removed
data.errors[].trackIdstringThe track ID that failed
data.errors[].errorstringWhy it failed

The request returns 200 OK even if nothing was removed — check data.removed rather than the status code. A track fails individually if it isn't in the playlist or the playlist isn't yours.

Errors

CodeStatusDescription
VALIDATION_ERROR400trackIds is missing, empty, contains non-strings, or has more than 100 items
MISSING_API_KEY401X-API-Key header was not provided
INVALID_API_KEY401API key is malformed, revoked, or does not exist
INTERNAL_ERROR500Unexpected server error

On this page