Object formats

Objects Format

Video Object

When you create a video or query its status, the API returns a Video Object. Here's a breakdown of its properties:

  • id: A unique identifier for the video.
  • created_at: Timestamp of when the video was created.
  • status: Current processing status of the video, which can be "processing", "error", or a completed state.
  • error_code: Included if status is "error", indicating the type of error encountered.
  • youtube_vid: YouTube video ID if the source was a YouTube URL.
  • title: The title of the video, extracted from metadata.
  • description: A description of the video, extracted from metadata.
  • duration: Length of the video in seconds.
  • detected_language: The language detected in the video.
  • translate_to: Target language if the video is being translated.
  • src_url: URL of the source video.
  • src_frame_count: The total number of frames in the source video.
  • src_fps: Frames per second of the source video.
  • src_width: Width of the source video in pixels.
  • src_height: Height of the source video in pixels.
  • lowres_src_url: URL of the lower-resolution version of the source video.
  • lowres_src_fps, lowres_src_frame_count, lowres_src_width, lowres_src_height: Corresponding properties for the low-resolution version of the video.

Clip Object

When you request clips for a video, each clip is represented as a Clip Object. Its properties include:

  • id: Unique identifier for the clip.
  • created_at: Timestamp of when the clip was created.
  • name: Name of the clip.
  • video_id: ID of the video from which the clip is derived.
  • virality_score: A score indicating the potential virality of the clip.
  • virality_score_explanation: Explanation or basis for the calculated virality score.
  • preset_id: Identifier for the preset used for the clip.
  • dimensions_width: Width of the clip in pixels.
  • dimensions_height: Height of the clip in pixels.
  • duration_seconds: Duration of the clip, in seconds

Export Object

When you initiate an export request for a clip, the API returns an Export Object. This object includes:

  • id: Unique identifier for the export.
  • created_at: Timestamp of when the export was initiated.
  • status: Current status of the export, similar to the video object, indicating "processing", "error", or “ready” for a completed state.
  • error_code: Included if status is "error".
  • clip_id: ID of the clip being exported.
  • video_id: ID of the video from which the clip is derived.
  • author_id: Identifier of the author who initiated the export.
  • name: Name of the export.
  • src_url: URL where the exported clip can be accessed.
  • progress: Progress of the export process.
  • options: Options used for the export (e.g., face recognition, crop, subtitles).
  • preset_id: ID of the preset used for the export.

Export Option Object

When you initiate an export request for a clip, you can pass a Export Option Object in the options body field:

  • face_recognition: Whether to perform auto cropping on faces (default: true)
  • crop: Whether to perform auto-cropping (default: true)
  • subtitles: Whether to render subtitles (or “captions”) on the video (default: true)