apyhub
FILE CONVERSION · FILE MANIPULATION

Generate GIF from Video Job API

What it does

Video to GIF converts a video into an animated GIF from either an uploaded file or a public video URL. You submit a video with optional controls for output size, playback speed, clip length, and start time, then poll the job until the GIF is ready.

Use the /file-to-json endpoint when you have a local video file in multipart form, or /url-to-json when the source is a publicly accessible video_url. Both endpoints accept size in WIDTHxHEIGHT format, speed from -10 to 10, duration capped at 20 seconds, and start_time in seconds. The persistent query flag lets you control whether the job should be kept around after processing.

The submission response is simple: you get back a job_id immediately. Check /jobs/:job_id to read the job status, which will be pending, successful, or failed. When the job finishes successfully, the status response includes a url for the generated GIF. If the job is still pending or has failed, the response can include a human-readable message.

This is a good fit for turning product demos, clips, or social video snippets into lightweight GIFs for docs, chat, issue trackers, or marketing pages.

▣ ENDPOINT 01 / 03
POST
Submit video-to-GIF job (multipart file)
https://api.eu.apyverse.com/apyhub/video-to-gif/file-to-json

QUICKSTART

GUIDE

Quickstart

Upload a video file to start an async job that converts it to JSON.

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

What you'll get back

Returns a JSON object with a job_id string field containing the job identifier for status polling.

{
  "job_id": "550e8400-e29b-41d4-a716-446655440000"
}
TRY ITLIVE · 400 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 WIDTHxHEIGHT (even integers, e.g. 320x240).
Integer -10…10; negative = slow motion, positive = fast forward, 0 = normal.
The video file to convert. Mandatory.
Clip length in seconds; capped at 20. Default 2.
Seek offset in seconds. Default 0.

About this endpoint

What it does

Submits a video file for conversion to GIF as an asynchronous job. The request sends the source video plus optional conversion settings, and the response returns a job identifier for polling.

Query Parameter(s)

AttributeTypeMandatoryDescription
persistentBooleanNoWhen true, requests persistent job handling.

Request Body

ParameterTypeMandatoryDescription
videoStringYesThe video file to convert. Format: binary.
sizeStringNoOutput dimensions in WIDTHxHEIGHT format using even integers, for example 320x240.
speedStringNoInteger from -10 to 10; negative values slow the video down, positive values speed it up, and 0 is normal speed.
durationStringNoClip length in seconds. Maximum 20. Default is 2.
start_timeStringNoSeek offset in seconds. Default is 0.

Response

Returns a JSON object with a top-level job_id string field. The job_id is a UUID used for status polling.

ParameterTypeMandatoryDescription
job_idStringYesJob identifier for status polling. Format: UUID.

Notes

This endpoint kicks off an async job and returns immediately with a job identifier; the actual work runs in the background. Pair this call with the corresponding job_check endpoint — poll that until the status reaches a terminal state to retrieve the result. Extract the job id from job_id.

Query parameters

Name
Type
Description
persistentOPTIONAL
boolean

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 / 03
POST
Submit video-to-GIF job (source URL)
https://api.eu.apyverse.com/apyhub/video-to-gif/url-to-json

QUICKSTART

GUIDE

Quickstart

Submit a video URL to start an async video-to-GIF job and get back a job ID.

curl -X POST "https://api.eu.apyverse.com/apyhub/video-to-gif/url-to-json?persistent=true" \
  -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 top-level job_id string field containing the async job identifier for status polling.

{
  "job_id": "550e8400-e29b-41d4-a716-446655440000"
}
TRY ITLIVE · 400 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 WIDTHxHEIGHT (even integers, e.g. 320x240).
Integer -10…10; negative = slow motion, positive = fast forward, 0 = normal.
Clip length in seconds; capped at 20. Default 2.
Publicly accessible URL of the video to convert. Mandatory.
Seek offset in seconds. Default 0.

About this endpoint

What it does

Submits a video-to-GIF conversion job using a source video URL and returns a job identifier immediately. The conversion runs asynchronously; use the returned job_id to poll for completion with the corresponding job-check endpoint.

Query Parameter(s)

AttributeTypeMandatoryDescription
persistentBooleanNoIf set, controls whether the job result is persisted.

Request Body

ParameterTypeMandatoryDescription
video_urlStringYesPublicly accessible URL of the video to convert. Must be a valid URI.
sizeStringNoOutput dimensions in WIDTHxHEIGHT format. Dimensions must be even integers, for example 320x240.
speedStringNoInteger from -10 to 10; negative values slow motion, positive values fast forward, 0 is normal speed.
durationStringNoClip length in seconds. Capped at 20. Default is 2.
start_timeStringNoSeek offset in seconds. Default is 0.

Response

Returns a JSON object with a top-level job_id string field formatted as a UUID. This is the identifier to use when checking the status of the async job.

ParameterTypeMandatoryDescription
job_idStringYesJob identifier for status polling. Format: UUID.

Notes

This endpoint kicks off an async job and returns immediately with a job identifier; the actual work runs in the background. Pair this call with the corresponding job_check endpoint — poll that until the status reaches a terminal state to retrieve the result. Extract the job id from the top-level job_id field.

Query parameters

Name
Type
Description
persistentOPTIONAL
boolean

Body

Name
Type
Description
bodyREQUIRED
object
▣ ENDPOINT 03 / 03
GET
Check GIF conversion job status
https://api.eu.apyverse.com/apyhub/video-to-gif/jobs/:job_id

QUICKSTART

GUIDE

Quickstart

Check the status of a video-to-GIF conversion job by its job ID.

curl -X GET "https://api.eu.apyverse.com/apyhub/video-to-gif/jobs/:job_id" \
  -H "apy-token: $APY_TOKEN"

What you'll get back

Returns a JSON object with a data object. The data object can include job_id and status on every response, plus url when the job is successful and message when the job is pending or failed.

{
  "data": {
    "job_id": "550e8400-e29b-41d4-a716-446655440000",
    "status": "successful",
    "url": "https://assets.apyhub.com/samples/output.gif"
  }
}
TRY ITLIVE · 5 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.

About this endpoint

What it does

Checks the status of a GIF conversion job by job ID. Returns a JSON object containing a data object with the job’s current status and related fields such as job_id, url, and message when available.

Path Parameter(s)

AttributeTypeMandatoryDescription
job_idStringYesJob identifier in UUID format.

Response

Returns a JSON object with a required data object field. Inside data, job_id is a UUID string, status is a string enum, url is a URI string, and message is a string.

AttributeTypeMandatoryDescription
dataObjectYesWrapper object containing the job status details.
data.urlStringNoPresigned or CDN URL to the output GIF. Present when status is successful.
data.job_idStringNoJob identifier in UUID format.
data.statusENUMNoJob status. Allowed values: pending, successful, failed.<br>pending while submitted or processing.<br>successful when output is ready.<br>failed when the worker marked the job failed.
data.messageStringNoHuman-readable status detail. Present on pending or failed responses.

Notes

Poll this endpoint with the job_id returned by the submit call. The data.status field cycles through pending before reaching a terminal state (successful or failed). The result field to read on success is data.url; data.message is present on pending or failed responses.

Path parameters

Name
Type
Description
job_idREQUIRED
string
▣ 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.