Skip to main content
POST
/
video
/
{video_id}
/
thumbnail
Generate custom thumbnail
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 image from a specific timestamp in the video.
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}")
  • Time parameter is in seconds, can be a float (e.g., 2.5 for 2.5 seconds into video)
  • Returns an Image object with URL and metadata
  • Generated thumbnails are stored and can be retrieved later
  • Time value should be within video duration (0 to video.length)
  • Multiple thumbnails can be generated at different timestamps

Authorizations

x-access-token
string
header
required

API key for authentication (sk-xxx format)

Path Parameters

video_id
string
required
Example:

"m-12345"

Body

application/json
timestamp
number
Example:

10.5

width
integer
Example:

320

height
integer
Example:

180

Response

200 - application/json

Thumbnail generated

success
boolean
Example:

true

status
enum<string>
Available options:
processing,
done,
failed
Example:

"processing"

data
object