Upload Asset
Assets
Upload Asset
Upload a video, image, or audio file to use in your video projects
POST
Upload Asset
Overview
Upload assets (videos, images, audio files) to Babou’s cloud storage. Uploaded assets can be referenced in your video projects and used across multiple chapters.Maximum file size: 100MB per upload
Request
Headers
Bearer token with your API key:
Bearer sk-bab-your-api-keyThe MIME type of the file being uploaded (e.g.,
video/mp4, image/png, audio/mpeg)Body
Send the raw binary file data as the request body.The raw file content
Supported File Types
Video:video/mp4video/quicktime(.mov)video/x-msvideo(.avi)video/webm
image/pngimage/jpegimage/gifimage/webpimage/svg+xml
audio/mpeg(.mp3)audio/wavaudio/oggaudio/aac
Response
Unique identifier for the uploaded asset
Asset filename
S3 URL to access the asset (null until upload completes)
MIME type of the uploaded file
File size in bytes
Upload state:
uploading, processing, ready, or errorDuration in seconds (for video/audio files, null for images)
Width in pixels (for image/video files)
Height in pixels (for image/video files)
ISO 8601 timestamp of upload
Examples
Response Example
Error Responses
File exceeds 100MB limit
S3 upload failed
Invalid or missing Content-Type header
Best Practices
Check file size before uploading
Check file size before uploading
Validate that your file is under 100MB before making the request to avoid errors:
Store asset IDs and URLs
Store asset IDs and URLs
Save the returned
id and url in your database to reference the asset later in your video projects.Use appropriate content types
Use appropriate content types
Always set the correct
Content-Type header matching your file format. This ensures proper processing and display.Handle upload errors gracefully
Handle upload errors gracefully
Implement retry logic for failed uploads, especially for large files that may fail due to network issues.
Next Steps
Get Asset
Retrieve asset details by ID
List Assets
View all your uploaded assets
Asset Management Guide
Learn how to use assets in your videos