Treblo

App · 7 actions

Generate songs, check generation progress and retrieve finished audio.

Actions

ActionWhat it does
Extend a songContinue a song from the end of its source audio.
Generate a songStart a song from a prompt and return the task ID.
Generate from reference audioStart a cover, match the source style, or use a voice recording as the reference.
Get a song generationRead generation details and the audio URLs when the song is finished.
Get credit balanceCheck how many credits are available to generate songs.
Get generation statusRead the current status of a song generation.
Upload an audio fileUpload source audio for a song edit.

Extend a song

Continue a song from the end of its source audio.

Inputs

Audio URLaudio_urltext
Public URL of the audio or a finished Treblo song.
Audio upload IDaudio_upload_idtext
ID returned by Upload an audio file.
Promptprompttext
Describe the music you want.
Instrumentalinstrumentaltrue/false
Generate music without vocals.
Crop durationcrop_durationnumber
Seconds to remove from the end before continuing.At least 0.
Context secondscontext_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

PromptprompttextRequired
Describe the music you want.
Instrumentalinstrumentaltrue/false
Generate music without vocals.
Enable streamingenable_streamingtrue/false
Make audio available for early streaming.
Idempotency keyidempotency_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 URLaudio_urltext
Public URL of the audio or a finished Treblo song.
Audio upload IDaudio_upload_idtext
ID returned by Upload an audio file.
Reference modereference_modetextRequired
Which part of the source to preserve.One of: cover, style, voice.
Promptprompttext
Describe the music you want.
Instrumentalinstrumentaltrue/false
Generate music without vocals.
Reference scalereference_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 IDtask_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 IDtask_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

FilefiletextRequired
Audio recording to upload.

Outputs

dataobject
The response from Treblo.
Example output
{
  "data": {
    "audio_upload_id": "example"
  }
}

On this page