cURL
curl --request POST \ --url https://api.videodb.io/video/{video_id}/thumbnail/ \ --header 'Content-Type: application/json' \ --header 'x-access-token: <api-key>' \ --data ' { "timestamp": 10.5, "width": 320, "height": 180 } '
{ "success": true, "status": "processing", "data": { "id": "job-123", "output_url": "https://api.videodb.io/async-response/job-123" } }
Generate a custom thumbnail from a specific video frame
import videodb conn = videodb.connect(api_key="your_api_key") coll = conn.get_collection() video = coll.get_videos()[0] # Generate thumbnail from specific timestamp (in seconds) thumbnail = video.generate_thumbnail(time=5.0) # thumbnail is an Image object print(f"Thumbnail URL: {thumbnail.url}") print(f"Thumbnail ID: {thumbnail.id}")
API key for authentication (sk-xxx format)
"m-12345"
10.5
320
180
Thumbnail generated
true
processing
done
failed
"processing"
Show child attributes