Picsart Video AI icon

Picsart Video AI

Generate images and stickers with Picsart API: generate from prompt

Video → Clip a Video

AI-generated

Summary

Trims a video to a specified time range and returns a binary file of the clip.

Inputs

  • videoUrl (required) — Source video URL (WEBM, MP4 or MOV, max 100MB, max 1920x1080).
  • start (required) — Start time of the trim in milliseconds (≥ 0). Default is 0.
  • end (required) — End time of the trim in milliseconds (≥ 1, must be greater than Start). Default is 1.
  • mode — Processing mode. Default is 'simple'.
  • cropExportFormat — Output video format (MP4, MOV, WEBM). Only visible in Advanced mode.

Output shape

A single binary file item with a 'data' property containing the trimmed video (default filename 'trimmed-video.mp4') and metadata in JSON.

The API processes the request asynchronously; the node polls for completion (max 600 attempts). Returns a JSON object with the result URL, original video URL, start/end times, and transaction ID.

Examples

Example 1: Trim a 10-second video to the last 3 seconds

videoUrl: 'https://example.com/video.mp4', start: 7000, end: 10000

Example 2: Create a 1-second clip starting from the beginning

videoUrl: 'https://example.com/video.mp4', start: 0, end: 1000

Links

Discussion