Skip to main content
View as Markdown

Audio Preview - Avatar Videos

Audio Preview​

Preview the text-to-speech narration for a specific scene before generating the full video:

# Returns audio/mpeg binary
curl -s -X POST "$AVATAR_API/video/previewAudio" \
-H "Authorization: Bearer $KS" \
-H "Content-Type: application/json" \
-d "{ \"id\": \"$VIDEO_ID\", \"sceneId\": 0 }" \
--output scene_preview.mp3

Request fields:

FieldTypeRequiredDescription
idstringyesVideo project ID
sceneIdnumberyesScene index (0-based)

The scene requires narration text to be populated — returns SCENE_EMPTY_NARRATION if the text is missing.

Use previewAudioStream for streaming playback instead of downloading the full file:

curl -s -X POST "$AVATAR_API/video/previewAudioStream" \
-H "Authorization: Bearer $KS" \
-H "Content-Type: application/json" \
-d "{ \"id\": \"$VIDEO_ID\", \"sceneId\": 0 }" \
--output scene_stream.mp3