Create Voiceover
POST
/v1/audio/voiceover/create
This endpoint is for creating voiceovers. Although it supports many parameters, in its simplest form, you just need to send a prompt and the system will use the defaults for the rest.
Request Example
Below is the simplest example of creating a voiceover. You just send a prompt and the system will use the defaults for the rest.
curl -X POST 'https://api.stablecog.com/v1/audio/voiceover/create' \
-H 'Authorization: Bearer <YOUR_STABLECOG_API_KEY>' \
-H 'Content-Type: application/json' \
-d '{"prompt": "Technology is a bridge between imagination and reality."}'
const API_KEY = process.env.STABLECOG_API_KEY;
const API_HOST = 'https://api.stablecog.com';
const API_ENDPOINT = '/v1/audio/voiceover/create';
const API_URL = `${API_HOST}${ENDPOINT}`;
const req = {
prompt: 'Technology is a bridge between imagination and reality.'
};
const res = await fetch(API_URL, {
method: 'POST',
body: JSON.stringify(req),
headers: {
Authorization: `Bearer ${API_KEY}`,
'Content-Type': 'application/json'
}
});
const resJSON = await res.json();
console.log(resJSON);
import os
import requests
import json
API_KEY = os.environ.get("STABLECOG_API_KEY")
API_HOST = "https://api.stablecog.com"
API_ENDPOINT = "/v1/audio/voiceover/create"
API_URL = f"{API_HOST}{API_ENDPOINT}"
req = {
"prompt": "Technology is a bridge between imagination and reality."
}
headers = {
"Authorization": f"Bearer {API_KEY}",
"Content-Type": "application/json"
}
res = requests.post(API_URL, data=json.dumps(req), headers=headers)
res_json = res.json()
print(json.dumps(res_json, indent=2))
Response
{
"outputs": [
{
"id": "bc54cad2-1e40-49c1-a890-b3c06a9240ac",
"url": "https://bvoi.stablecog.com/acfc6546-a1b5-417a-b58c-3f063a0a2799.mp3",
"audio_duration": 5.3976874
}
],
"remaining_credits": 1485,
"settings": {
"model_id": "0f442a3e-cf53-490b-b4a9-b0dda63e9523",
"speaker_id": "39f7fc5d-9031-4932-a4d5-b196bb06e203",
"temperature": 0.7,
"seed": 12447287,
"denoise_audio": true,
"remove_silence": true
}
}
Request Headers
Authorization required
string
Authorization: Bearer <YOUR_STABLECOG_API_KEY>
.Request Body
prompt required
string
model_id
(enum) TVoiceoverModelID
speaker_id
(enum) TVoiceoverSpeakerID
temperature
min0 max1 | float
denoise_audio
boolean
remove_silence
boolean
Response Body
outputs
array of TOutput
remaining_credits
float
settings
(object) TVoiceoverSettings