---
title: "Trim Video"
method: POST
path: "/trim"
tags: ["Edit"]
---

# Trim Video

`POST /trim`

## Request

- Base URL: `https://video-api.picsart.io/v1`
- URL: `https://video-api.picsart.io/v1/trim`
- Auth: API key in header `X-Picsart-API-Key`

Trim the input video clip: pull a specific segment or trim to your desired video clip duration.

## Request body

- object
  - `video_url` string, uri: Source video URL.
  - `start` integer, required: This is the point in time of the video from where the trimming begins in milliseconds.
  - `end` integer, required: This is the point in time of the video where the trimming ends in milliseconds. It must be greater than `start`.
  - `export` object
    - `format` 'MOV' | 'MP4' | 'WEBM' | 'GIF': Optionally select one of the output video formats (MP4 is chosen if left blank). Container options are as follows * MOV * MP4 * WEBM * GIF
    - `frame_rate` integer: The output video frame rate.
    - `bitrate` integer: The output video bitrate in kb/s. Leave empty to set automatically and optimize accordingly.

## Response `202`

Request successfully accepted for an asynchronous transformation.

- object
  - `transaction_id` string, nullable
  - `status` 'success' | 'error' | 'processing' | 'queued'

## Other responses

- `400`: Bad Request
- `401`: Unauthorized
- `402`: Payment Required
- `403`: Forbidden
- `404`: Not Found
- `405`: Method Not Allowed
- `413`: Request Entity Too Large
- `415`: Unsupported Media Type
- `429`: Too Many Requests
- `431`: Request Header Fields Too Large
- `500`: Internal Server Error
- `503`: Service Unavailable
- `529`: Overloaded. The model provider is overloaded and could not complete this request. Please retry shortly, or switch to a different model.

---

[API](https://skmtc.dev/picsart/apis/picsart-programmable-video-apis.md) - [All operations](https://skmtc.dev/picsart/apis/picsart-programmable-video-apis/llms.txt) - [OpenAPI document](https://skmtc.dev/picsart/apis/picsart-programmable-video-apis/revisions/e3f1d0bea43b?raw)
