Treblo
App · 7 actions
Generate songs, check generation progress and retrieve finished audio.
Actions
| Action | What it does |
|---|---|
| Extend a song | Continue a song from the end of its source audio. |
| Generate a song | Start a song from a prompt and return the task ID. |
| Generate from reference audio | Start a cover, match the source style, or use a voice recording as the reference. |
| Get a song generation | Read generation details and the audio URLs when the song is finished. |
| Get credit balance | Check how many credits are available to generate songs. |
| Get generation status | Read the current status of a song generation. |
| Upload an audio file | Upload source audio for a song edit. |
Extend a song
Continue a song from the end of its source audio.
Inputs
- Audio URL
audio_urltext - Public URL of the audio or a finished Treblo song.
- Audio upload ID
audio_upload_idtext - ID returned by Upload an audio file.
- Prompt
prompttext - Describe the music you want.
- Instrumental
instrumentaltrue/false - Generate music without vocals.
- Crop duration
crop_durationnumber - Seconds to remove from the end before continuing.At least 0.
- Context seconds
context_secondsnumber - Seconds of the source ending to listen to.From 0.01 to 284.
Outputs
dataobject- The response from Treblo.
Example output
{
"data": {
"task_id": "example"
}
}Generate a song
Start a song from a prompt and return the task ID. Each successful song uses credits.
Inputs
- Prompt
prompttextRequired - Describe the music you want.
- Instrumental
instrumentaltrue/false - Generate music without vocals.
- Enable streaming
enable_streamingtrue/false - Make audio available for early streaming.
- Idempotency key
idempotency_keytext - Reuse this value when retrying the same generation.
Outputs
dataobject- The response from Treblo.
Example output
{
"data": {
"task_id": "example"
}
}Generate from reference audio
Start a cover, match the source style, or use a voice recording as the reference.
Inputs
- Audio URL
audio_urltext - Public URL of the audio or a finished Treblo song.
- Audio upload ID
audio_upload_idtext - ID returned by Upload an audio file.
- Reference mode
reference_modetextRequired - Which part of the source to preserve.One of:
cover,style,voice. - Prompt
prompttext - Describe the music you want.
- Instrumental
instrumentaltrue/false - Generate music without vocals.
- Reference scale
reference_scalenumber - How closely to follow the reference. Voice mode supports up to 7.From 1 to 7.
Outputs
dataobject- The response from Treblo.
Example output
{
"data": {
"task_id": "example"
}
}Get a song generation
Read generation details and the audio URLs when the song is finished.
Inputs
- Task ID
task_idtextRequired - Task id.
Outputs
dataobject- The response from Treblo.
Example output
{
"data": {
"error_message": "example",
"song_paths": [
"example"
],
"status": "example",
"task_id": "example"
}
}Get credit balance
Check how many credits are available to generate songs.
Inputs
None.
Outputs
dataobject- The response from Treblo.
Example output
{
"data": {}
}Get generation status
Read the current status of a song generation.
Inputs
- Task ID
task_idtextRequired - Task id.
Outputs
dataobject- The response from Treblo.
Example output
{
"data": {
"status": "example",
"task_id": "example"
}
}Upload an audio file
Upload source audio for a song edit. The upload ID lasts about a day.
Inputs
- File
filetextRequired - Audio recording to upload.
Outputs
dataobject- The response from Treblo.
Example output
{
"data": {
"audio_upload_id": "example"
}
}