Skip to main content
View as Markdown

thumbParams API (Thumbnail Templates) - Content Management

thumbParams API (Thumbnail Templates)​

The thumbParams service defines reusable thumbnail generation specifications that can be associated with conversion profiles for automatic thumbnail generation on upload.

Actions​

ActionDescription
thumbParams.addCreate a new thumbnail params definition
thumbParams.getGet by ID (includes system defaults)
thumbParams.updateUpdate params
thumbParams.deleteSoft-delete
thumbParams.listList all params (includes system defaults from partner 0)
thumbParams.getByConversionProfileIdList params for a specific conversion profile

KalturaThumbParams Fields​

FieldTypeRangeDescription
cropTypeint1-6Resize mode (1-5 same as URL API type, plus 6=CROP_AFTER_RESIZE)
qualityint20-100JPEG quality
widthint0-10000Target width
heightint0-10000Target height
cropXint0-10000Crop region X offset
cropYint0-10000Crop region Y offset
cropWidthint0-10000Crop region width
cropHeightint0-10000Crop region height
videoOffsetfloat≥ 0Seconds into video to capture
videoOffsetInPercentageint0-100Capture at percentage of video duration
scaleWidthfloat0-10Scale multiplier for width
scaleHeightfloat0-10Scale multiplier for height
backgroundColorstring1-6 hexBackground/padding color
formatstring—Output format: jpg, png, bmp
densityint≥ 0Image DPI
stripProfilesbool—Strip ICC profiles and comments
intervalint≥ 1Interval in seconds for periodic thumbnails
sourceParamsIdint—ID of source flavor/thumb params to capture from

Additional Resize Mode (thumbParams only)​

ValueNameBehavior
6CROP_AFTER_RESIZEForce-resize to dimensions, then crop. cropX/cropY control gravity: -1=NW/W/SW, 0=N/Center/S, 1=NE/E/SE
# Create a "social card" thumbnail template
curl -X POST "$KALTURA_SERVICE_URL/service/thumbParams/action/add" \
-d "ks=$KALTURA_KS" \
-d "format=1" \
-d "thumbParams[objectType]=KalturaThumbParams" \
-d "thumbParams[name]=Social Card 1200x630" \
-d "thumbParams[width]=1200" \
-d "thumbParams[height]=630" \
-d "thumbParams[cropType]=3" \
-d "thumbParams[quality]=90" \
-d "thumbParams[videoOffsetInPercentage]=25"

Business scenario — automatic thumbnail on upload: Associate a thumbParams definition with a conversion profile. When new videos are uploaded, Kaltura automatically generates thumbnails at the configured dimensions, quality, and video offset — no additional API calls needed.