Turn a short clip of the video into an animated GIF

Converts a clip of the video into an animated GIF.

Request

POSThttps://video-tools.p.apihiver.com/v1/to-gif

Upload the video in the file field (max 50 MB). Instead of a file you can send JSON: {"url": "https://…"} for a public video URL, or {"base64": "…"} — the options below then go in the same JSON object.

*
No file chosen
File. The video file (MP4, MOV, WebM, MKV, AVI…).
Number. Start time in seconds.
Number. Clip length, 0.5–10 seconds.
Integer. Width in px, 80–640.
Integer. Frames per second, 5–20.

Parameters and body structure are inherited from this endpoint's definition. Changes here only apply to this test run.

Language
Client
1curl --request POST \
2  --url https://video-tools.p.apihiver.com/v1/to-gif \
3  --header 'Accept: application/json' \
4  --header 'X-API-Key: YOUR_API_KEY' \
5  --header 'content-type: multipart/form-data' \
6  --form file=@file.bin \
7  --form start=0 \
8  --form duration=3 \
9  --form width=320 \
10  --form fps=10

Turn a short clip of the video into an animated GIF: Video Tools API reference

Converts a clip of the video into an animated GIF. This endpoint is part of the Video Tools API: Get video info, grab thumbnails, make storyboard contact sheets, extract audio (MP3/WAV/M4A) and convert clips to GIF.

Example response (200, image/gif)

The animated GIF.

Errors

  • 400 — A required parameter is missing or a value has the wrong format.
    1{
    2  "error": {
    3    "code": "INVALID_INPUT",
    4    "message": "Provide a file upload, 'url', or 'base64'."
    5  }
    6}

Gateway errors (missing key, no subscription, rate limits) are listed in Error codes.