Asynchronous Processing
Video generation is a computationally intensive process that can take several minutes to complete. The VibePeak API uses an asynchronous task-based architecture to handle this efficiently.How It Works
Submit Request
Send a POST request to create a slideshow. The API validates your request and returns immediately with a task ID.
Task Queued
Your video generation task is added to the processing queue. You receive a
202 Accepted response with the task details.Processing
The system processes your images, applies AI enhancements, generates narration, and creates the final video.
Task Lifecycle
Tasks progress through the following statuses:| Status | Description |
|---|---|
queued | Task is waiting in the processing queue |
processing | Video generation is in progress |
completed | Video is ready for download |
failed | An error occurred during processing |
Submitting a Task
When you create a slideshow, you’ll receive an immediate response:Polling for Status
Check the task status by polling the tasks endpoint:Response Headers
When creating a task, the API returns helpful headers for async workflows:| Header | Description |
|---|---|
Location | URL to poll for task status (e.g., /v1/tasks/task_abc123) |
Retry-After | Recommended polling interval in seconds (default: 30) |
Polling Best Practices
The API returns a
Retry-After: 30 header - we recommend polling every 30 seconds for video generation tasks.- Default: Poll every 30 seconds (matches
Retry-Afterheader) - Video generation typically completes in 4-10 minutes
- Maximum wait: 20 minutes before timing out
Using Webhooks Instead
For production applications, we recommend using webhooks instead of polling. Webhooks provide:- Real-time notifications - No delay between completion and notification
- Reduced API calls - No need for repeated polling requests
- Better scalability - Handle more concurrent tasks efficiently
Video URL Expiration
Video URLs expire after 7 days. Download or store the video before expiration.
expires_at field in the task result indicates when the video URL will become invalid. Make sure to:
- Download the video to your own storage, or
- Re-request the task status to get a fresh URL (if the video is still available)
Handling Failures
If a task fails, the response will include error details:- Invalid or inaccessible image URLs
- Unsupported image formats
- Images too small or corrupted
- Internal processing errors

