apyhub
FILE CONVERSION · FILE MANIPULATION

Generate Thumbnail from Video API

Hosted on ApyHub

What it does

Video Thumbnail Generator extracts a PNG frame from a video at a specific timestamp. Send a video file or a remote video URL, choose the seek time in seconds, and optionally set an output size like 320x180 or 640x360.

Use the upload-based endpoints when you already have the media in hand, or the URL-based endpoints when the file is hosted elsewhere. You can choose between a streamed binary image response or a signed URL response, depending on how you want to handle the thumbnail in your app.

Video Thumbnail Generator accepts common video formats including .mp4, .mkv, .avi, .mov, .flv, .3gp, and .webm. The file-based download endpoint supports uploads up to 500 MiB. The response is a PNG frame, either returned directly as binary data or provided as a signed link in a data field.

This is useful for generating preview images for video galleries, media upload flows, asset management systems, and content moderation dashboards where a stable frame capture is needed for display or indexing.

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

Quickstart

Upload a video file to generate a thumbnail from it.

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

What you'll get back

Returns the generated thumbnail as a binary file response.

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*
Optional output scale WxH.
Frame seek position in seconds.
Video file (.mp4 .mkv .avi .mov .flv .3gp .webm). Max 500 MiB.

About this endpoint

What it does

Extracts a single PNG frame from an uploaded video and streams the generated file back as a binary response. The request body accepts the source video plus optional frame-seek and output-size settings.

Request Body

ParameterTypeMandatoryDescription
videoStringYesVideo file upload. Supported formats: .mp4, .mkv, .avi, .mov, .flv, .3gp, .webm. Maximum size: 500 MiB.
sizeStringNoOptional output scale in WxH format, for example 320x180.
timeIntegerNoFrame seek position in seconds. Default: 1. Minimum: 1.

Response

Returns a binary file stream, representing the generated PNG frame extracted from the uploaded video.

ParameterTypeMandatoryDescription
binary responseStringYesThe endpoint returns the generated PNG 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
Extract PNG frame from upload and return signed link (VIT-02)
http://localhost:8080/apyhub/generate-thumbnail-from-video/file/link
QUICKSTARTGUIDE

Quickstart

Upload a video file to generate a thumbnail from it.

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

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

Uploads a video file and returns a signed link to a generated PNG frame extracted from that video.

Request Body

ParameterTypeMandatoryDescription
videoStringYesVideo file to process. Binary upload.
sizeStringNoOutput frame size in WIDTHxHEIGHT format, for example 640x360.
timeIntegerNoExtraction timestamp in seconds. Minimum: 1. Default: 1.

Response

Returns a JSON object with a data string field containing a URI to the generated PNG frame. The data field is required.

ParameterTypeMandatoryDescription
dataStringYesSigned link to the generated PNG image. URI format.

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
Extract PNG frame from remote URL and stream download (VIT-03)
http://localhost:8080/apyhub/generate-thumbnail-from-video/url/download
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-thumbnail-from-video/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 a binary file containing the generated thumbnail image.

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

Extracts a PNG frame from a remote video URL and returns it as a streamed binary response. The request body accepts the source video URL and optional frame extraction parameters.

Request Body

ParameterTypeMandatoryDescription
video_urlStringYesRemote video URL to extract the frame from. Must be a valid URI.
sizeStringNoOutput frame size in WIDTHxHEIGHT format. Example: 320x180.
timeStringNoVideo timestamp to extract the frame from. Defaults to 1 if not provided. Example: 3.

Response

Returns a binary response body containing the extracted PNG image. The output schema declares a single string with binary format, so the success response is a streamed file rather than a JSON object.

Body

Name
Type
Description
bodyREQUIRED
object
▣ ENDPOINT 04 / 04
POST
Extract PNG frame from remote URL and return signed link (VIT-04)
http://localhost:8080/apyhub/generate-thumbnail-from-video/url/link
QUICKSTARTGUIDE

Quickstart

Generate a thumbnail from a video URL by sending the video link and the target thumbnail size.

curl -X POST "http://localhost:8080/apyhub/generate-thumbnail-from-video/url/link" \
  -H "apy-token: $APY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "video_url": "https://assets.apyhub.com/samples/sample.mp4",
    "size": "320x180"
  }'

What you'll get back

Returns a JSON object with a data string field containing the thumbnail image URL.

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

Extracts a PNG frame from a remote video URL and returns a signed link to the generated thumbnail. You provide the source video URL and can optionally set the capture time and output size.

Request Body

ParameterTypeMandatoryDescription
video_urlStringYesRemote video URL to extract the frame from. Must be a URI.
sizeStringNoOutput thumbnail size, such as 320x180.
timeStringNoFrame capture time in seconds. Defaults to 1.

Response

Returns a JSON object with a data string field containing a signed URI to the generated PNG thumbnail.

ParameterTypeMandatoryDescription
dataStringYesSigned URI for the generated PNG thumbnail.

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.