sangtao.ai
API key

Assets & References

Background tracks

Returns all available background music tracks.

GEThttps://api.sangtao.ai/v2/assets/background-tracks

Authorization

None — this endpoint is public, call it without an API key.

The background music you can use. Send a track's id as backgroundMusic.trackId. The whole list comes back — there are no filters. No API key needed.

Response

data is a list of tracks, each with these fields:

  • idstring

    The track's id, e.g. "music_acoustic_warm" — send it as backgroundMusic.trackId

  • namestring

    Display name

  • audioUrlstring

    The track itself, to listen to (mp3)

  • durationSecondsnumber?

    Length in seconds

  • bpmnumber?

    Tempo, in beats per minute

Errors

StatuserrorCodeWhen
400VALIDATION_ERRORA query parameter has a value it does not take — error says which
GET/assets/background-tracks
curl "https://api.sangtao.ai/v2/assets/background-tracks"
{
  "success": true,
  "data": [
    {
      "id": "music_acoustic_warm",
      "name": "Acoustic Warm",
      "audioUrl": "https://cdn.sangtao.ai/motion/system/audio/5fc464fe045b5e772e78c32a08337fa8134cefd52117938f322f8a15c7b5e15d.mp3",
      "durationSeconds": 45.02,
      "bpm": 92.28
    },
    {
      "id": "music_bolero_vn",
      "name": "Bolero Vn",
      "audioUrl": "https://cdn.sangtao.ai/motion/system/audio/92f8b98a65cfbb0b1c356d26428f5955d0635bda627f440a450c69a86f41d136.mp3",
      "durationSeconds": 60.12,
      "bpm": 71.78
    }
  ]
}