Skip to main content
POST
Generate audio using AI

Authorizations

x-access-token
string
header
required

API key for authentication (sk-xxx format)

Path Parameters

collection_id
string
required
Example:

"default"

Body

application/json
audio_type
enum<string>
required
Available options:
voice,
sound_effect,
music
Example:

"voice"

prompt
string

Prompt for music or sound effect generation.

Example:

"Generate upbeat background music"

duration
number

Duration in seconds for music or sound effect generation.

Example:

5

text
string

Text to convert to speech when audio_type is voice.

Example:

"Hello, welcome to VideoDB."

voice_name
string

Voice name for hosted text-to-speech.

Example:

"Default"

model_name
string

Model used for text-to-speech.

Example:

"k2-fsa/OmniVoice"

config
object

Additional generation configuration for sound effects or text-to-speech.

sandbox_id
string

Sandbox ID used for self-hosted text-to-speech.

Example:

"bx-123abc"

voice_clone_id
string

Reusable VideoDB voice clone ID.

Example:

"vc-123abc"

callback_url
string
Example:

"https://webhook.example.com/callback"

Response

200 - application/json

Audio generation started

success
boolean
Example:

true

status
enum<string>
Available options:
processing,
done,
failed
Example:

"processing"

data
object