Picsart Video AI icon

Picsart Video AI

Generate images and stickers with Picsart API: generate from prompt

Video → Crop Video

AI-generated

Summary

Crops a source video to a specified width, height, and starting position, returning a binary video file.

Inputs

  • videoUrl (required) — Source video URL (WEBM, MP4, or MOV, max 100MB, max 1920x1080).
  • width (required) — Width of the output video in pixels (minimum 16).
  • height (required) — Height of the output video in pixels (minimum 16).
  • startX — Starting x position of the crop in pixels from the left edge (minimum 0, default 0).
  • startY — Starting y position of the crop in pixels from the bottom edge (minimum 0, default 0).
  • mode — Operation mode. Default is 'simple'. 'advanced' exposes 'cropExportFormat' for explicit output format selection (MP4, MOV, WEBM).
  • cropExportFormat — Output video format (MP4, MOV, WEBM). Only visible in 'advanced' mode.

Output shape

A binary video file ('cropped-video.mp4') and metadata including the resulting video URL, transaction ID, and original crop parameters.

The operation returns a binary attachment of the processed video. If the API returns a transaction ID, the node polls for completion up to 600 attempts (approximately 10 minutes).

Examples

Example 1: Standard 16:9 crop

Set width 1920, height 1080, startX 0, startY 0 to crop the entire video to 16:9.

Example 2: Center crop

Set width and height to the desired center dimensions (e.g., 640x640) to center-crop the video.

Example 3: Advanced export

Set mode to 'advanced' and cropExportFormat to 'MOV' to output the cropped video in MOV format.

Links

Discussion