---
title: Trim Video Clip Job API
slug: trim-video-job
url: https://apyhub.com/apyhub/service/trim-video-job
provider: ApyHub
categories: [File Conversion, File Manipulation]
auth: api_key
version: 1.0
service_type: job
endpoints: 3
atoms: 5-400
mcp: true
alias: job-video-thumbnail
---

# Trim Video Clip Job API

Clip a video file or URL into a shorter output. Set start time, duration, and optional size, then poll the job_id for the finished output URL.

## Endpoints

| Method | URL | Description | Atoms |
| --- | --- | --- | --- |
| POST | `https://api.eu.apyhub.com/apyhub/trim-video-job/file-to-json` | What it does Submits a video file to start an asynchronous video clip job. The endpoint accepts a m… | 400 |
| GET | `https://api.eu.apyhub.com/apyhub/trim-video-job/jobs/:job_id` | What it does Checks the status of a submitted video clip job by job ID. It returns a JSON object co… | 5 |
| POST | `https://api.eu.apyhub.com/apyhub/trim-video-job/url-to-json` | What it does Submits an async job to trim a clip from a source video URL. The request body supplies… | 400 |

## Endpoint reference

### Submit video clip job (multipart file)

`POST https://api.eu.apyhub.com/apyhub/trim-video-job/file-to-json` · 400 atoms · accepts `multipart/form-data` · returns `application/json`

| Parameter | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `size` | body | string | no | Optional output scale WIDTHxHEIGHT (even integers, e.g. 640x360). Example: `640x360`. |
| `video` | body | string (binary) | yes | Source video file. |
| `duration` | body | string | no | Clip length in seconds; capped at 20. Default 2. Example: `8`. |
| `start_time` | body | string | no | Seek offset in seconds (non-negative integer). Default 0. Example: `2`. |
| `persistent` | query | boolean | no |  |

#### Quickstart

Upload a video file to start an async video clip job.

```bash
curl -X POST "https://api.eu.apyhub.com/apyhub/trim-video-job/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 — a UUID you can use to poll for the job status.

```json
{
  "job_id": "550e8400-e29b-41d4-a716-446655440000"
}
```

### Check video clip job status

`GET https://api.eu.apyhub.com/apyhub/trim-video-job/jobs/:job_id` · 5 atoms · accepts `application/json` · returns `application/json`

| Parameter | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `job_id` | path | string (uuid) | yes |  |

#### Quickstart

Check the status of a video clip job by its job ID.

```bash
curl -X GET "https://api.eu.apyhub.com/apyhub/trim-video-job/jobs/:job_id/jobs/123e4567-e89b-12d3-a456-426614174000" \
  -H "apy-token: $APY_TOKEN"
```

#### What you'll get back

Returns a JSON object with a top-level `data` object. The `data` object can include `url` when the job is successful, plus `job_id`, `status`, and `message` depending on the job state.

```json
{
  "data": {
    "job_id": "123e4567-e89b-12d3-a456-426614174000",
    "status": "successful",
    "url": "https://assets.apyhub.com/samples/sample.mp4"
  }
}
```

### Submit video clip job (source URL)

`POST https://api.eu.apyhub.com/apyhub/trim-video-job/url-to-json` · 400 atoms · accepts `application/json` · returns `application/json`

| Parameter | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `size` | body | string | no | Optional output scale WIDTHxHEIGHT (even integers). Example: `640x360`. |
| `duration` | body | string | no | Clip length in seconds; capped at 20. Default 2. Example: `8`. |
| `video_url` | body | string (uri) | yes | HTTP(S) URL of the source video to download and clip. Example: `https://assets.apyhub.com/samples/sample.mp4`. |
| `start_time` | body | string | no | Seek offset in seconds (non-negative integer). Default 0. Example: `2`. |
| `persistent` | query | boolean | no |  |

#### Quickstart

Start a video clip job by sending the source video URL.

```bash
curl -X POST "https://api.eu.apyhub.com/apyhub/trim-video-job/url-to-json" \
  -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 job identifier you can use to poll for status later.

```json
{
  "job_id": "550e8400-e29b-41d4-a716-446655440000"
}
```

## About

## What it does
Video Clip Job cuts a source video into a short output video and lets you set the starting point, clip length, and optional output size.

Send either a video file or a `video_url`, then choose `start_time` in seconds, `duration` in seconds, and an optional `size` in `WIDTHxHEIGHT` format. `duration` is capped at 20 seconds, and `start_time` defaults to 0. The file upload endpoint accepts a multipart `video` field; the URL endpoint downloads the video from an HTTP(S) source and processes it asynchronously.

When the job is accepted, you get back a `job_id` for polling. Use `GET /jobs/:job_id` to check status: `pending`, `successful`, or `failed`. On success, the job response includes a `url` to the clipped video output. If the job is still running or fails, the response includes the job status and a human-readable `message`.

The output is a video clip, not a still image. If you need a single frame, use the Generate Thumbnail from Video Job API instead.

Use Video Clip Job when you need short preview clips for media libraries, upload workflows, content moderation queues, or sharing a specific segment of a longer video.

## Usage

Base URL: `https://api.eu.apyhub.com` (default region — see
`GET https://apyhub.com/api/public/regions` for the rest).

Authenticate with an ApyHub API key in the `apy-token` header.
Full docs and a live playground: https://apyhub.com/apyhub/service/trim-video-job
