apyhub
FILE CONVERSION · FILE MANIPULATION

Generate Video Thumbnail API

Hosted on ApyHub

What it does

Video Thumbnail Generator trims a short clip from a video file or a remote video URL and returns the clip as either a streamed download or a signed link. Send a source video, choose a start time and duration, and optionally set the output size to control the clip dimensions.

Use the file-based endpoints when you already have the video in hand, or the URL-based endpoints when the source lives elsewhere. For uploaded videos, the service accepts a binary video file in .mp4, .mkv, .avi, .mov, .flv, .3gp, or .webm format up to 500 MiB. For remote sources, provide a video_url. In both cases, you can set start_time, duration, and size.

The response depends on the endpoint you choose: stream the clip back as binary data, or receive a JSON object with a data field containing a signed URI. That makes it useful for generating previews in content workflows, embedding short samples in product pages, or extracting a specific segment from longer footage without handling video processing yourself.

If you need a compact video snippet from an upload or a hosted asset, Video Thumbnail Generator keeps the interface simple and the output predictable.

▣ ENDPOINT 01 / 04
POST
Trim video clip from upload and stream download
http://localhost:8080/apyhub/generate-video-thumbnail/file/download
QUICKSTARTGUIDE

Quickstart

Upload a video and get back the generated thumbnail as a binary file.

curl -X POST "http://localhost:8080/apyhub/generate-video-thumbnail/file/download" \
  -H "apy-token: $APY_TOKEN" \
  -F "video=@/path/to/video.mp4"

What you'll get back

Returns a binary file response (string with format: binary), not JSON.

(binary thumbnail 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.
Max 100MB total per request (all files combined). Larger? Use this API's URL-based endpoint instead, if it has one.
body*
Output scale WxH with even width and height. Omit to keep source dimensions.
Video file (.mp4 .mkv .avi .mov .flv .3gp .webm). Max 500 MiB.

About this endpoint

What it does

Trims a segment from an uploaded video file and streams the resulting download back as a binary response. You can optionally set the clip start time, clip duration, and output scale.

Request Body

ParameterTypeMandatoryDescription
videoStringYesVideo file upload. Accepted formats: .mp4, .mkv, .avi, .mov, .flv, .3gp, .webm. Maximum size: 500 MiB.
durationIntegerNoClip length in seconds. Default: 2. Minimum: 1, maximum: 20.
start_timeIntegerNoStart time in seconds from the beginning of the source video. Default: 0. Minimum: 0.
sizeStringNoOutput scale in WxH format. Width and height must be even numbers. Omit to keep the source dimensions. Example: 640x360.

Response

Returns a binary file stream, represented in the schema as a string with format: binary.

AttributeTypeMandatoryDescription
binary responseStringYesThe generated trimmed video is returned as a binary 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 02 / 04
POST
Trim video clip from upload and return signed link
http://localhost:8080/apyhub/generate-video-thumbnail/file/link
QUICKSTARTGUIDE

Quickstart

Upload a video file to generate a thumbnail clip link.

curl -X POST "http://localhost:8080/apyhub/generate-video-thumbnail/file/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 URI to the generated video clip.

{
  "data": "https://storage.example.com/video-clips/clip.mp4?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*

About this endpoint

What it does

Trims a short clip from an uploaded video and returns a signed URL to the generated file. The request accepts the source video plus optional trim settings, and the response contains a JSON object with a data URI string pointing to the resulting clip.

Request Body

ParameterTypeMandatoryDescription
videoStringYesVideo file to trim from; binary upload.
sizeStringNoOutput size, for example 480x270.
durationIntegerNoClip length in seconds. Default: 2; minimum: 1; maximum: 20.
start_timeIntegerNoStart time in seconds from which trimming begins. Default: 0; minimum: 0.

Response

Returns a JSON object with a data string field containing a URI to the generated video clip. The schema defines this as the success response payload for the endpoint.

AttributeTypeMandatoryDescription
dataStringYesSigned URL of the generated clip; format: URI.

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
Trim video clip from remote URL and stream download
http://localhost:8080/apyhub/generate-video-thumbnail/url/download
QUICKSTARTGUIDE

Quickstart

Send a video URL to generate a thumbnail from the video.

curl -X POST "http://localhost:8080/apyhub/generate-video-thumbnail/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 the generated thumbnail as a binary file response.

(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*

About this endpoint

What it does

Trims a video clip from a remote URL and streams the resulting file as a binary download. The request body supplies the source video URL and optional clipping/output parameters.

Request Body

ParameterTypeMandatoryDescription
video_urlStringYesRemote video URL to process. Must be a URI.
sizeStringNoOutput size in WIDTHxHEIGHT format, for example 640x360.
durationStringNoClip duration. Default: 2.
start_timeStringNoStart position for the clip. Default: 0.

Response

Returns a binary file stream, not a JSON object. The success response body is string with binary format, so the endpoint delivers the generated video clip directly for download.

ParameterTypeMandatoryDescription
bodyStringYesBinary response content containing the generated file.

Body

Name
Type
Description
bodyREQUIRED
object
▣ ENDPOINT 04 / 04
POST
Trim video clip from remote URL and return signed link
http://localhost:8080/apyhub/generate-video-thumbnail/url/link
QUICKSTARTGUIDE

Quickstart

Generate a thumbnail from a video URL by sending the video link in the request body.

curl -X POST "http://localhost:8080/apyhub/generate-video-thumbnail/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 URI for the generated video thumbnail.

{
  "data": "https://storage.example.com/video-clips/clip.mp4?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*

About this endpoint

What it does

Creates a trimmed video clip from a remote video URL and returns a signed URI for the generated output. The request body must include the source video_url, and you can optionally provide start_time, duration, and size.

Request Body

ParameterTypeMandatoryDescription
video_urlStringYesRemote video URL to trim from. Must be a URI.
sizeStringNoOutput size, such as 640x360.
durationStringNoClip duration. Default: 2.
start_timeStringNoStart offset for the clip. Default: 0.

Response

Returns a JSON object with a data string field containing a URI to the generated signed video clip link.

ParameterTypeMandatoryDescription
dataStringYesSigned URI for the generated trimmed video clip.

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.