
Use workflows to add audio tracks over videos or replace existing audio. It's also possible to generate text-to-speech audio for this purpose.
Inputs
Create a Workflow and use the + Add Input button to declare your inputs. These are the parameters that you'll supply to the API when you run your workflow.

Each Inputs has:
name- used as references in your steps and API requeststype- the type of input you're supplyingtexturlnumberboolean(true/false)
required- determines whether a run must supply this input
Add or Replace Audio
If you already have an existing audio file you want to use, go with this option.
Add a Tool step and select Add or replace audio from the list. Use the + ref drop-menu to add your inputs to their corresponding fields.

Generate TTS Voiceover
If you'd like to generate a text-to-speech audio, go with this option
Add a Tool step and select Generate Voiceover from the list. Use the + ref drop-menu to add the appropriate inputs. Pick the voice you prefer from the Voice field.

API Workflow Run
Send a POST request to the /v5/workflow_runs endpoint, along with your workflow UID and your inputs. May also be sent as a bare top-level object instead of nested under input.
var data = {
"workflow": "VymBYa7gMjW6JQ2njM",
"inputs": {
"video_url": "https://cdn.bannerbear.com/sample_videos/clip.mp4",
"title_text": "New Arrival"
}
}
fetch('https://api.bannerbear.com/v5/workflow_runs', {
method: 'POST',
body: JSON.stringify(data),
headers: {
'Content-Type' : 'application/json',
'Authorization' : `Bearer ${API_KEY}`
}
})
Note: Workflows can be created via the API as well. See Create a Workflow for more.

