Event Structure
All webhook events follow a consistent structure with two main fields:Event Naming Convention
Events use dot notation:{resource}.{action}
- Resource:
video,image,audio - Action:
started,completed,errored
Payload Format
Thepayload field contains the same data structure as the corresponding API endpoint:
- Video events: Match
GET /v1/video-projects/:id - Image events: Match
GET /v1/image-projects/:id - Audio events: Match
GET /v1/audio-projects/:id
Consistent Data: Webhook payloads use the exact same format as API responses, making it easy
to reuse your existing data handling code.
Video Events
Video events are triggered during the lifecycle of video processing jobs. All payloads match theGET /v1/video-projects/:id response format.
video.started
When triggered: Video processing begins (job moves from pending to rendering)
Use cases:
- Update UI to show “processing” status
- Log job start time for analytics
- Send user notification that processing began
Processing Time: Video processing can take 30 seconds to several minutes depending on length
and complexity.
video.completed
When triggered: Video processing finishes successfully
Use cases:
- Download the completed video
- Update database with completion status
- Send user notification with download link
- Trigger downstream workflows
video.errored
When triggered: Video processing fails due to an error
Use cases:
- Log error details for debugging
- Retry processing if appropriate
- Notify user of failure
- Update job status in database
invalid_video_file- Corrupted or unsupported video formatfile_too_large- Video file exceeds size limitsinsufficient_credits- Not enough credits to processinvalid_parameters- Invalid width, height, or other parametersprocessing_timeout- Processing took too long and was terminated
No Charges: You’re never charged credits when processing fails with an error.
Image Events
Image events track the lifecycle of image processing jobs. All payloads match theGET /v1/image-projects/:id response format.
image.started
When triggered: Image processing begins (job moves from pending to rendering)
Use cases:
- Show processing indicator in UI
- Track processing start time
- Update job status in database
image.completed
When triggered: Image processing finishes successfully
Use cases:
- Download the generated image
- Display result to user
- Update completion status
- Trigger post-processing workflows
Fast Processing: Most image operations complete within 5-30 seconds, much faster than video
processing.
image.errored
When triggered: Image processing fails due to an error
Use cases:
- Display error message to user
- Log error for debugging
- Retry with different parameters
- Update job status
no_source_face- Face required but not detected in imageinvalid_file_format- Unsupported image formatfile_too_large- Image file exceeds size limitsinsufficient_credits- Not enough credits for operationinvalid_parameters- Invalid dimensions or other parameterscontent_policy_violation- Image violates content guidelines
No Charges: Failed image processing never consumes credits.
Audio Events
Audio events track the lifecycle of audio processing jobs. All payloads match theGET /v1/audio-projects/:id response format.
audio.started
When triggered: Audio processing begins
Key payload fields:
audio.completed
When triggered: Audio processing finishes successfully
Key payload fields:
audio.errored
When triggered: Audio processing fails
Common error codes:
text_too_long- Input text exceeds maximum lengthinvalid_voice- Requested voice not availableinsufficient_credits- Not enough creditsprocessing_timeout- Audio generation took too long
Event Handling Patterns
Basic Event Router
Database Update Pattern
Error Handling Pattern
Next Steps
Webhook Quickstart
Set up your first webhook with end-to-end testing
Secure Your Handler
Add signature verification for production security
Production Deployment
Deploy robust webhook handlers to production
API Reference
Complete webhook API documentation