apyhub
FILE CONVERSION · FILE MANIPULATION

Generate Video Thumbnail Job API

What it does

Video Thumbnail Generator creates a thumbnail clip from a source video and returns a job you can poll for completion. Send either a video file or a video_url, then optionally set size, duration, and start_time to control the output clip.

Use the multipart file endpoint when you already have the video in hand, or the URL endpoint when you need ApyHub to download the source first. In both cases, the request accepts an optional persistent flag and returns a job_id immediately after submission.

When the job finishes, check the job status with job_id. The status response includes status, job_id, and, when successful, a url for the clipped video output. Failed and pending jobs also include a human-readable message.

This is useful when you need a short preview asset for a media library, product page, upload flow, or content moderation pipeline without processing video locally.

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

QUICKSTART

GUIDE

Quickstart

Upload a video to start a thumbnail-generation job.

curl -X POST "https://api.eu.apyverse.com/apyhub/generate-video-thumbnail/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 — the UUID of the asynchronous job you can use 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*
Optional output scale WIDTHxHEIGHT (even integers, e.g. 640x360).
Source video file.
Clip length in seconds; capped at 20. Default 2.
Seek offset in seconds (non-negative integer). Default 0.

About this endpoint

What it does

Submits a video file to start an asynchronous video-thumbnail generation job. The request sends a multipart file plus optional job parameters, and the response returns a job identifier you can use to poll for completion.

Query Parameter(s)

AttributeTypeMandatoryDescription
persistentBooleanNoOptional query flag.

Request Body

ParameterTypeMandatoryDescription
videoStringYesSource video file.
sizeStringNoOptional output scale WIDTHxHEIGHT (even integers, e.g. 640x360).
durationStringNoClip length in seconds; capped at 20. Default 2.
start_timeStringNoSeek offset in seconds (non-negative integer). Default 0.

Response

Returns a JSON object with a required job_id string field. This is the job identifier for status polling.

ParameterTypeMandatoryDescription
job_idStringYesJob identifier for status polling.

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 generate video thumbnail job (source URL)
https://api.eu.apyverse.com/apyhub/generate-video-thumbnail/url-to-json

QUICKSTART

GUIDE

Quickstart

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

curl -X POST "https://api.eu.apyverse.com/apyhub/generate-video-thumbnail/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 job_id string field — the UUID for polling the job status.

{
  "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*
Optional output scale WIDTHxHEIGHT (even integers).
Clip length in seconds; capped at 20. Default 2.
HTTP(S) URL of the source video to download and clip.
Seek offset in seconds (non-negative integer). Default 0.

About this endpoint

What it does

Submits an asynchronous job to generate a video thumbnail from a source video URL. The request body provides the source video_url and optional clip/size settings, and the response returns a job identifier you can use to poll for completion.

Query Parameter(s)

AttributeTypeMandatoryDescription
persistentBooleanNoWhether the job should be persistent.

Request Body

ParameterTypeMandatoryDescription
video_urlStringYesHTTP(S) URL of the source video to download and clip. Format: URI.
sizeStringNoOptional output scale WIDTHxHEIGHT (even integers).
durationStringNoClip length in seconds; capped at 20. Default 2.
start_timeStringNoSeek offset in seconds (non-negative integer). Default 0.

Response

Returns a JSON object with a job_id string field — a UUID job identifier for status polling. The response is returned immediately after a successful async job submission.

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 field from the response.

Query parameters

Name
Type
Description
persistentOPTIONAL
boolean

Body

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

QUICKSTART

GUIDE

Quickstart

Check the status of a video thumbnail generation job by its job ID.

curl -X GET "https://api.eu.apyverse.com/apyhub/generate-video-thumbnail/jobs/:job_id"

What you'll get back

Returns a JSON object with a data object. The data object can include job_id (string), status (string: pending, successful, or failed), message (string), and url (string) when the job succeeds.

{
  "data": {
    "job_id": "550e8400-e29b-41d4-a716-446655440000",
    "status": "successful",
    "url": "https://assets.apyhub.com/samples/sample.mp4"
  }
}
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 generate video thumbnail job by job_id and returns the job metadata in a JSON object. When the job is successful, the response includes the output url.

Path Parameter(s)

AttributeTypeMandatoryDescription
job_idStringYesJob identifier, UUID format.

Response

Returns a JSON object with a required data object field. The data object may include job_id as a UUID string, status as a string enum, message as a human-readable string, and url as a URI string when the job is successful.

ParameterTypeMandatoryDescription
dataObjectYesWrapper object containing the job status payload.
data.urlStringNoPresigned or CDN URL to the clipped video output, present when status is successful. Format: URI.
data.job_idStringNoJob identifier. Format: UUID.
data.statusENUMNoJob status. Allowed values: pending, successful, failed. pending while submitted or processing; successful when output is ready; failed when the worker marked the job failed.
data.messageStringNoHuman-readable status message, used for 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 data.url is only populated once status is successful; treat it as absent otherwise.

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.