Video Thumbnails
Generate thumbnails from your processed videos
Generate a thumbnail image from your video by setting enableThumbnail to true. After the video is processed, retrieve the thumbnail URL using the GET video endpoint.
Basic Usage
// Step 1: Create video with thumbnail enabled
const response = await fetch('https://api.videocascade.com/v1/videos', {
method: 'POST',
headers: {
'Authorization': 'Bearer vca_your_api_key',
'Content-Type': 'application/json',
},
body: JSON.stringify({
fileUrl: 'https://example.com/video.mp4',
enableThumbnail: true
}),
});
const { videoId } = await response.json();
// Step 2: Get video status and thumbnail URL
const videoResponse = await fetch(`https://api.videocascade.com/v1/videos/${videoId}`, {
headers: {
'Authorization': 'Bearer vca_your_api_key',
},
});
const data = await videoResponse.json();
console.log(`Thumbnail URL: ${data.thumbnailUrl}`);import requests
# Step 1: Create video with thumbnail enabled
response = requests.post(
'https://api.videocascade.com/v1/videos',
headers={
'Authorization': 'Bearer vca_your_api_key',
'Content-Type': 'application/json',
},
json={
'fileUrl': 'https://example.com/video.mp4',
'enableThumbnail': True
}
)
video_id = response.json()['videoId']
# Step 2: Get video status and thumbnail URL
video_response = requests.get(
f'https://api.videocascade.com/v1/videos/{video_id}',
headers={
'Authorization': 'Bearer vca_your_api_key',
}
)
data = video_response.json()
print(f"Thumbnail URL: {data['thumbnailUrl']}")interface VideoRequest {
fileUrl: string;
enableThumbnail: boolean;
}
// Step 1: Create video with thumbnail enabled
const request: VideoRequest = {
fileUrl: 'https://example.com/video.mp4',
enableThumbnail: true
};
const response = await fetch('https://api.videocascade.com/v1/videos', {
method: 'POST',
headers: {
'Authorization': 'Bearer vca_your_api_key',
'Content-Type': 'application/json',
},
body: JSON.stringify(request),
});
const { videoId } = await response.json();
// Step 2: Get video status and thumbnail URL
const videoResponse = await fetch(`https://api.videocascade.com/v1/videos/${videoId}`, {
headers: {
'Authorization': 'Bearer vca_your_api_key',
},
});
const data = await videoResponse.json();
console.log(`Thumbnail URL: ${data.thumbnailUrl}`);Response Format
When you retrieve the video details, the response includes the thumbnailUrl:
{
"videoId": "vid_abc123",
"status": "completed",
"outputUrl": "https://storage.videocascade.com/videos/vid_abc123.mp4",
"thumbnailUrl": "https://storage.videocascade.com/thumbnails/vid_abc123.jpg"
}Processing Time: The thumbnail is generated during video processing. Wait for the video status to be completed before accessing the thumbnailUrl.