apyhub
FILE CONVERSION · FILE MANIPULATION

Generate GIF from Video API

What it does

GIF Generator turns a video into a GIF. Send either an uploaded video file or a public video URL, and choose the clip start time, duration, playback speed, and output size.

Use the file upload endpoints when your source is local, or the URL endpoints when the video is already hosted elsewhere. The request schemas accept a video binary upload or a video_url, plus optional size, speed, duration, and start_time values. size controls the output dimensions, duration limits the clip to 20 seconds, and speed lets you make the clip faster or slower.

The response depends on the endpoint you call. The download variants stream the GIF back as a binary file. The link variants return a JSON object with a data field containing a time-limited signed URL for the generated GIF.

Use GIF Generator for product demos, short social previews, support snippets, or any workflow that needs a lightweight animated clip from a longer video.

▣ ENDPOINT 01 / 04
POST
Generate GIF from uploaded video and stream download
https://api.eu.apyverse.com/apyhub/generate-gif/multi-part/download

QUICKSTART

GUIDE

Quickstart

Convert a video file to a downloadable GIF by uploading the source video as multipart form data.

curl -X POST "https://api.eu.apyverse.com/apyhub/generate-gif/multi-part/download" \
  -H "apy-token: $APY_TOKEN" \
  -F "video=@/path/to/video.mp4"

What you'll get back

Returns a binary file (string with format: binary) containing the generated GIF.

TRY ITLIVE · 550 ATOMS
Loading your default key…
The full key is used to call the gateway and stays in this tab — never sent to orbit or saved.
Max 100MB total per request (all files combined). Larger? Use this API's URL-based endpoint instead, if it has one.
body*
Output dimensions WxH. Omit to keep original size.
Playback speed. 0 = normal; positive = faster (1/n PTS); negative = slower (abs(n) PTS).
Video file (.mp4 .mkv .avi .mov .flv .3gp .webm).
Clip length in seconds (capped at 20).
Seek offset in seconds.

About this endpoint

What it does

Converts an uploaded video file into a GIF and returns the generated file as a binary download stream. The request accepts the video plus optional controls for output size, playback speed, clip duration, and start time.

Request Body

ParameterTypeMandatoryDescription
videoStringYesVideo file upload (.mp4, .mkv, .avi, .mov, .flv, .3gp, .webm).
sizeStringNoOutput dimensions in WxH format. Omit to keep the original size.
speedIntegerNoPlayback speed. Default: 0. Range: -10 to 10. 0 = normal; positive values make playback faster (1/n PTS); negative values make playback slower (abs(n) PTS).
durationIntegerNoClip length in seconds. Default: 2. Range: 1 to 20 (capped at 20).
start_timeIntegerNoSeek offset in seconds. Default: 0. Minimum: 0.

Response

Returns a binary file stream containing the generated GIF.

ParameterTypeMandatoryDescription
binaryStringYesThe generated GIF file returned as binary data.

Body

Name
Type
Description
bodyREQUIRED
object

Max 100MB total per request (all files combined). Larger? Use this API's URL-based endpoint instead, if it has one.

▣ ENDPOINT 02 / 04
POST
Generate GIF from uploaded video and return signed link
https://api.eu.apyverse.com/apyhub/generate-gif/multi-part/link

QUICKSTART

GUIDE

Quickstart

Upload a video file to generate a GIF from it.

curl -X POST "https://api.eu.apyverse.com/apyhub/generate-gif/multi-part/link" \
  -H "apy-token: $APY_TOKEN" \
  -F "video=@/path/to/video.mp4"

What you'll get back

Returns a JSON object with a data string field containing a time-limited signed download URL.

{
  "data": "https://storage.example.com/gif/output.gif?sig=abc"
}
TRY ITLIVE · 550 ATOMS
Loading your default key…
The full key is used to call the gateway and stays in this tab — never sent to orbit or saved.
Max 100MB total per request (all files combined). Larger? Use this API's URL-based endpoint instead, if it has one.
body*
Output dimensions WxH. Omit to keep original size.
Playback speed. 0 = normal; positive = faster (1/n PTS); negative = slower (abs(n) PTS).
Video file (.mp4 .mkv .avi .mov .flv .3gp .webm).
Clip length in seconds (capped at 20).
Seek offset in seconds.

About this endpoint

What it does

Uploads a video file and generates a GIF from it, returning a time-limited signed download link in the response. You can optionally control the output size, playback speed, clip duration, and start time.

Request Body

ParameterTypeMandatoryDescription
videoStringYesVideo file upload (.mp4, .mkv, .avi, .mov, .flv, .3gp, .webm).
sizeStringNoOutput dimensions in WxH format. Omit to keep the original size.
speedIntegerNoPlayback speed. Default: 0.<br>0 = normal speed<br>Positive values = faster (1/n PTS)<br>Negative values = slower (abs(n) PTS)<br>Allowed range: -10 to 10.
durationIntegerNoClip length in seconds. Default: 2.<br>Allowed range: 1 to 20 (capped at 20).
start_timeIntegerNoSeek offset in seconds. Default: 0.<br>Minimum: 0.

Response

Returns a JSON object with a data string field containing a time-limited signed URL for downloading the generated GIF.

ParameterTypeMandatoryDescription
dataStringYesTime-limited signed URL for download.

Body

Name
Type
Description
bodyREQUIRED
object

Max 100MB total per request (all files combined). Larger? Use this API's URL-based endpoint instead, if it has one.

▣ ENDPOINT 03 / 04
POST
Generate GIF from remote video URL and stream download
https://api.eu.apyverse.com/apyhub/generate-gif/url/download

QUICKSTART

GUIDE

Quickstart

Download a GIF from a public video URL by sending the source video_url in the request body.

curl -X POST "https://api.eu.apyverse.com/apyhub/generate-gif/url/download" \
  -H "apy-token: $APY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"video_url":"https://assets.apyhub.com/samples/sample.mp4"}'

What you'll get back

Returns binary data (string with format: binary) — the generated GIF file itself.

<binary file>
TRY ITLIVE · 550 ATOMS
Loading your default key…
The full key is used to call the gateway and stays in this tab — never sent to orbit or saved.
body*
Output dimensions WxH. Omit to keep original size.
Playback speed. 0 = normal; positive = faster; negative = slower.
Clip length in seconds (capped at 20).
Publicly accessible URL of the source video.
Seek offset in seconds.

About this endpoint

What it does

Generates a GIF from a publicly accessible remote video URL and returns the result as a streamed binary download. The request body controls the source video and optional conversion settings such as output size, playback speed, duration, and start time.

Request Body

ParameterTypeMandatoryDescription
video_urlStringYesPublicly accessible URL of the source video. URI format.
sizeStringNoOutput dimensions in WxH format. Omit to keep original size.
speedStringNoPlayback speed. Default: 0.<br>0 = normal<br>Positive values = faster<br>Negative values = slower
durationStringNoClip length in seconds. Default: 2. Capped at 20 seconds.
start_timeStringNoSeek offset in seconds. Default: 0.

Response

Returns a binary stream (string with binary format) containing the generated GIF file.

ParameterTypeMandatoryDescription
bodyStringYesBinary GIF content returned as a streamed download.

Body

Name
Type
Description
bodyREQUIRED
object
▣ ENDPOINT 04 / 04
POST
Generate GIF from remote video URL and return signed link
https://api.eu.apyverse.com/apyhub/generate-gif/url/link

QUICKSTART

GUIDE

Quickstart

Generate a GIF from a publicly accessible video URL.

curl -X POST "https://api.eu.apyverse.com/apyhub/generate-gif/url/link" \
  -H "apy-token: $APY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "video_url": "https://assets.apyhub.com/samples/sample.mp4"
  }'

What you'll get back

Returns a JSON object with a data string field containing a time-limited signed download URL for the generated GIF.

{
  "data": "https://storage.example.com/gif/output.gif?sig=abc"
}
TRY ITLIVE · 550 ATOMS
Loading your default key…
The full key is used to call the gateway and stays in this tab — never sent to orbit or saved.
body*
Output dimensions WxH. Omit to keep original size.
Playback speed. 0 = normal; positive = faster; negative = slower.
Clip length in seconds (capped at 20).
Publicly accessible URL of the source video.
Seek offset in seconds.

About this endpoint

What it does

Generates a GIF from a publicly accessible remote video URL and returns a signed download link for the created file.

Request Body

ParameterTypeMandatoryDescription
video_urlStringYesPublicly accessible URL of the source video. Must be a URI.
sizeStringNoOutput dimensions in WxH format. Omit to keep the original size.
speedStringNoPlayback speed. Default: 0. 0 = normal, positive = faster, negative = slower.
durationStringNoClip length in seconds. Default: 2. Capped at 20 seconds.
start_timeStringNoSeek offset in seconds. Default: 0.

Response

Returns a JSON object with a data string field containing a time-limited signed URL for downloading the generated GIF.

ParameterTypeMandatoryDescription
dataStringYesTime-limited signed URL for download. Must be a URI.

Body

Name
Type
Description
bodyREQUIRED
object
▣ COMMON ERRORS

Errors any endpoint can return

400bad_request

Required parameter missing or malformed body.

401unauthorized

API key missing, revoked, or not authorized for this service.

429rate_limited

Your plan's per-second rate exceeded. Retry with exponential backoff.

503upstream_busy

Backend temporarily unavailable. Try again in a few seconds.