API Endpoints
1. Create Video
- Endpoint:
/videos
- Method:
POST
- Input:
source_video_url
: URL of the source video (Youtube link or video file URL)language
: Language code (e.g., "en" for English)min_duration
: Minimum duration of the shorts in seconds (1 to 120. Default to 1)max_duration
: Maximum duration of the shorts in seconds (1 to 120. Default to 120)target_duration
: Target duration of the shorts in seconds (between min and max. Default to 60)
- Output: Video object (see below) with details like ID, creation date, status, etc.
2. Check Video Status
- Endpoint:
/videos/{video_id}
- Method:
GET
- Output: Updated video object (see below) showing current status.
3. Get Video Clips
- Endpoint:
/videos/{video_id}/clips
- Method:
GET
- Output: Array of clip objects (see below) each with an ID, creation date, name, video ID, and virality score.
4. Export Clip
- Endpoint:
/videos/{video_id}/clips/{clip_id}/exports
- Method:
POST
- Input:
**options**
: Export Options Object (see below)preset_id
: ID of the export preset (to find the ID of a preset, see Find a Preset ID (opens in a new tab)) Find a preset ID (opens in a new tab)
- Output: Export object (see below) with details like ID, creation date, clip ID, video ID, source URL, etc.
5. Check Export Status
- Endpoint:
/videos/{video_id}/clips/{clip_id}/exports/{export_id}
- Method:
GET
- Output: Updated export object (see below) showing current status.
6. Synchronous Mode for Video Creation and Export
- Adding
?sync=true
to the create video or export endpoints allows for synchronous processing, removing the need for polling the status.