Skip to main content

Animated GIF

API reference for creating an animated GIF. Can be used with Create Asset POST request.

To create an animated gif from a video asset, the following parameters embedded in animated_gif can be used.

ParameterDescription
start_offsetThe time (in seconds or HH:MM:SS format) of the video timeline where the animated gif should begin. Defaults to 0.
end_offsetThe time (in seconds or HH:MM:SS format) of the video timeline where the gif ends. Defaults to 10 seconds after the start_offset. Maximum duration of GIF is limited to 10 seconds.
widthThe width in pixels (or in percentage value of asset width) of the animated gif. Max width is 640px.
heightThe height in pixels (or in percentage value of asset height) of the animated gif. Max height is 640px.
fpsThe frame rate of the generated gif. Defaults to 15 fps. Max 30 fps.
curl -L -X POST 'https://api.gumlet.com/v1/video/assets' \-H 'Authorization: Bearer <YOUR API KEY>' \-H 'Content-Type: application/json' \-d '{    "input":"https://gumlet.sgp1.digitaloceanspaces.com/video/BigBuckBunny.mp4",    "source_id": "5f462c1561cf8a766464ffc4",    "format": "hls",    "resolution": ["240p", "360p", "720p", "1080p"],    "animated_gif": {        "start_offset": "50",        "end_offset": "55",        "width": "640",        "height": "360",        "fps": 10    }}'