v5

latestOpenAPI 3.0.3MITraw.githubusercontent.com2026-08-0112516159.5 KB

Generate audio using AI

post/collection/{collection_id}/generate/audio/

Path parameters

collection_idstring required
Example:default

Request body

promptstring

Prompt for music or sound effect generation.

textstring

Text to convert to speech when audio_type is voice.

audio_type'voice' | 'sound_effect' | 'music' required
voice_namestring

Voice name for hosted text-to-speech.

model_namestring

Model used for text-to-speech.

configobject

Voice configuration. For OmniVoice supports instructions, ref_audio, ref_text, response_format, speed, language, and max_new_tokens.

sandbox_idstring

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

voice_clone_idstring

Reusable VideoDB voice clone ID.

callback_urlstring

Example request

{
  "prompt": "Generate upbeat background music",
  "text": "Hello, welcome to VideoDB.",
  "audio_type": "voice",
  "voice_name": "Default",
  "model_name": "k2-fsa/OmniVoice",
  "sandbox_id": "bx-123abc",
  "voice_clone_id": "vc-123abc",
  "callback_url": "https://webhook.example.com/callback"
}

Response

Audio generation started

successboolean
status'processing' | 'done' | 'failed'

Example response

{
  "success": true,
  "status": "processing",
  "data": {
    "id": "job-123",
    "output_url": "https://api.videodb.io/async-response/job-123"
  }
}