Beats
GET/v0/tracks/:trackId/beats
The beats endpoint provides information about the timestamps of beats in a track. You can use this endpoint to simplify the process to cut the video in sync with the music.
Unlike BPM which is a single number for the entire track, beats can change dynamically across a music piece. This is particularly valuable for capturing variations in tempo, such as a slower intro, a build-up with faster beats, or changes in rhythm throughout the composition.
The response includes two types of metadata: time
and value
.
time
represents the timestamp of the beat in milliseconds. value
indicates the beat's position in a bar (or measure in the US), where 1 corresponds to the first beat (downbeat).
Examples:
Most pop songs have four beats in a bar. For example, if we looked at the beats data for Coolio’s 1, 2, 3, 4
it would look something like: 1-2-3-4, 1-2-3-4
However, a waltz has three beats in a bar, and the data would look something like: 1-2-3, 1-2-3
Usage Scenarios:
-
Automatically cut a video in sync with the beat
-
Adding snap markers aligned with beat timestamps in the UI.
Request
Path Parameters
Track id
Responses
- 200
- 400
- 401
- 403
- 404
- 429
Beats response
- application/json
- Schema
- Example (from schema)
- Example
Schema
Array [
]
beats
object[]
{
"beats": [
{
"time": 0,
"value": "string"
}
]
}
{
"beats": [
{
"time": 0,
"value": "1.0"
},
{
"time": 0.62,
"value": "2.0"
},
{
"time": 1.2,
"value": "3.0"
},
{
"time": 1.8,
"value": "4.0"
}
]
}
Bad request.
- application/json
- Schema
- Example (from schema)
- Example
Schema
Array [
]
Human readable message
errors
object[]
Error key
Error messages
{
"message": "string",
"errors": [
{
"key": "string",
"messages": [
"string"
]
}
]
}
{
"message": "Bad request"
}
Unauthorized. Most likely your access token has expired.
- application/json
- Schema
- Example (from schema)
- Example
Schema
Array [
]
Human readable message
errors
object[]
Error key
Error messages
{
"message": "string",
"errors": [
{
"key": "string",
"messages": [
"string"
]
}
]
}
{
"message": "Invalid credentials"
}
User does not have access to download the track.
- application/json
- Schema
- Example (from schema)
- Example
Schema
Array [
]
Human readable message
errors
object[]
Error key
Error messages
{
"message": "string",
"errors": [
{
"key": "string",
"messages": [
"string"
]
}
]
}
{
"message": "User does not have access to download the track"
}
Track was not found.
- application/json
- Schema
- Example (from schema)
- Example
Schema
Array [
]
Human readable message
errors
object[]
Error key
Error messages
{
"message": "string",
"errors": [
{
"key": "string",
"messages": [
"string"
]
}
]
}
{
"message": "Track was not found"
}
Rate limit exceeded.
- application/json
- Schema
- Example (from schema)
- Example
Schema
Array [
]
Human readable message
errors
object[]
Error key
Error messages
{
"message": "string",
"errors": [
{
"key": "string",
"messages": [
"string"
]
}
]
}
{
"message": "Rate limit exceeded"
}