Music
0 / 1,000
Describe a song, or start from one of these:
0 / 6,000
Length
Guest songs are 30 s long. Sign in to choose the length.
The song plays here, with a waveform, its length and a download.
View code
The same song with an API key: POST /v1/music/generations on api.albastov.com, then read it until it is done. Set ALBASTAR_API_KEY first.
job=$(curl -sS https://api.albastov.com/v1/music/generations \
-H "Authorization: Bearer $ALBASTAR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"prompt": "",
"instrumental": false,
"duration_s": 30,
"model": "ace",
"format": "mp3"
}')
id=$(echo "$job" | jq -r .id)
state=$(echo "$job" | jq -r .state)
# Each read holds up to 85 s while the song is made.
while [ "$state" = queued ] || [ "$state" = running ]; do
job=$(curl -sS "https://api.albastov.com/v1/music/generations/$id?wait=85" \
-H "Authorization: Bearer $ALBASTAR_API_KEY")
state=$(echo "$job" | jq -r .state)
done
if [ "$state" = done ]; then
curl -sS -o song.mp3 "$(echo "$job" | jq -r '.results[0].url')" \
-H "Authorization: Bearer $ALBASTAR_API_KEY"
else
echo "$job" | jq .error
fiHistory
This tab keeps your songs until you close it.