Music Webhook Callbacks
Instead of polling the Query Music Detail endpoint, you can provide acallback_url when submitting music generation tasks to receive automatic notifications when generation completes.
How It Works
- Submit with callback URL: Include a
callback_urlparameter in your music generation request - Task processing: Vidgo API processes your music generation task
- Receive notification: When the task status becomes
finishedorfailed, Vidgo API sends a POST request to your callback URL - Process result: Your server receives the complete task data including generated files
Callback Request
When a task completes, Vidgo API will send a POST request to your callback URL:Request Headers
Request Body Structure
The
files array content varies depending on which model created the task. See Response Fields below for details.Response Fields (files data)
Thefiles array content varies depending on which model created the task.
| Model | Field | Type | Description |
|---|---|---|---|
generate-music, extend-music, upload-and-cover-audio, upload-and-extend-audio, add-instrumental, add-vocals, replace-section | audio_id | string | Unique identifier for the audio file |
| 閳? | audio_url | string | Direct download URL for the audio file |
| 閳? | image_url | string | Cover image URL |
| 閳? | title | string | Track title |
| 閳? | tags | string | Style tags |
| 閳? | duration | number | Audio duration in seconds |
| 閳? | prompt | string | Generation prompt used |
get-timestamped-lyrics | timestampe_lyrics | string | Lyrics with timestamps |
generate-lyrics | title | string | Lyrics title |
| 閳? | text | string | Complete lyrics content |
boost-music-style | style | string | Enhanced music style |
convert-to-wav | wav_url | string | URL to converted WAV file |
separate-vocals | separate_vocals | string (JSON) | JSON string containing separated audio URLs. See details |
upload-and-separate-vocals | vocal_removal | string (JSON) | JSON string containing separated stem URLs. See details |
stem-split | stem_split | string (JSON) | JSON string containing full stem separation URLs. See details |
generate-music-cover | generate_cover | string (JSON) | JSON string containing generated cover images. See details |
generate-persona | persona_id | string | Generated persona identifier |
create-music-video | video_url | string | Generated video URL |
JSON Field Details
separate-vocals
separate_vocals fields:
vocal_url- URL to the extracted vocal trackinstrumental_url- URL to the instrumental track
upload-and-separate-vocals
vocal_removal fields:
bass- URL to the bass trackdrums- URL to the drums trackpiano- URL to the piano trackguitar- URL to the guitar trackvocals- URL to the vocals trackother- URL to other audio elements
stem-split
stem_split fields:
backing_vocals_url- URL to backing vocalsbass_url- URL to bass trackbrass_url- URL to brass instrumentsdrums_url- URL to drums trackfx_url- URL to sound effectsguitar_url- URL to guitar trackkeyboard_url- URL to keyboard trackpercussion_url- URL to percussion trackstrings_url- URL to strings tracksynth_url- URL to synthesizer trackvocal_url- URL to main vocalswoodwinds_url- URL to woodwinds track
generate-music-cover
generate_cover is a JSON array containing cover image objects:
file_url- URL to the generated cover imagefile_type- File type (e.g., “image”)
Callback Examples
Music Generation (generate-music, extend-music, etc.)
Timestamped Lyrics (get-timestamped-lyrics)
Generated Lyrics (generate-lyrics)
Music Style Enhancement (boost-music-style)
WAV Conversion (convert-to-wav)
Vocal Separation (separate-vocals)
Upload & Separate Vocals (upload-and-separate-vocals)
Stem Split (stem-split)
Music Cover Image (generate-music-cover)
Generated Persona (generate-persona)
Music Video (create-music-video)
Failed Task
Requirements
Your callback endpoint must meet the following requirements:- HTTPS only: Must use HTTPS protocol (HTTP not supported)
- Maximum URL length: 2048 characters
- Response timeout: Must respond within 10 seconds
- Success response: Should return HTTP 200-299 status code
- No internal IPs: Cannot use private/internal IP addresses (e.g., 192.168.x.x, 10.x.x.x)
- Public accessibility: Must be publicly accessible from the internet
Retry Policy
If your callback endpoint fails to respond or returns an error:- Retry attempts: 3 automatic retries
- Retry delays: After 1 second, 2 seconds, and 4 seconds
- Final failure: After 3 failed attempts, no further retries are made