AI Clipping

March 10, 2026

AI Clipping

Submit a long video and receive all viral clips ranked by viral potential. Each clip includes auto-detected start/end timestamps, AI-generated titles, descriptions, and hashtags. If export is enabled, the response also includes rendered video download links for each clip.

Supported Video Sources

The API accepts URLs from the following platforms: YouTube, Vimeo, Dailymotion, Kick, Twitch, TikTok, Facebook, Instagram, Zoom, Rumble, Google Drive and more.

You can also use locally uploaded files. Local upload requires a Standard plan or above. See the Upload API for details.


Submit Clipping Task

Submit a new AI clipping task from a video URL.

POST https://wayinvideo-api.wayin.ai/open/v2/clips

Request Body

ParameterTypeRequiredDefaultDescription
video_urlstringYesThe source video URL or uploaded file identifier
project_namestringNo""A custom name for this task
source_langstringNoAuto-detectSource language of the video (see Supported Languages)
target_langstringNoTarget language for translated captions (see Supported Languages). When omitted, no translation is applied.
enable_exportbooleanNofalseSee below. When false, only clip time ranges, titles, and descriptions are returned (no rendering); when true, clips are rendered and each clip includes an export link.
ratiostringNoRATIO_ORIGINALAspect ratio: RATIO_ORIGINAL, RATIO_16_9, RATIO_1_1, RATIO_4_5, RATIO_9_16. Only used when enable_export is true.
resolutionstringNoSD_480Output resolution: SD_480, HD_720, FHD_1080. Only used when enable_export is true.
enable_captionbooleanNofalseWhether to add dynamic captions when rendering. Only used when enable_export is true. When true, caption_display and cc_style_tpl take effect.
caption_displaystringNooriginalCaption mode: both, original, translation. Only used when enable_export and enable_caption are both true.
cc_style_tplstringNoCaption style template ID (see Subtitle Styles). Only used when enable_export and enable_caption are both true. If not set, the front-end default style is applied.
enable_ai_reframebooleanNofalseEnable AI reframing. Only used when enable_export is true.

enable_export behavior

  • When enable_export is empty or false, the API only returns clip time ranges, titles, descriptions, and related metadata. No rendering is performed, and there are no export links in the result. The parameters ratio, resolution, caption_display, enable_caption, enable_ai_reframe, and cc_style_tpl have no effect.
  • When enable_export is true, those parameters take effect, each clip is rendered, and the result includes a download link for each clip. Because each clip is rendered, processing may take longer.

Example 1: Without export (clip metadata only)

Request body omits enable_export or sets it to false. Only clip time ranges, titles, descriptions, and tags are returned; no rendering, no export links.

Request

curl -X POST https://wayinvideo-api.wayin.ai/open/v2/clips \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "x-wayinvideo-api-version: v2" \
  -d '{
    "video_url": "https://www.youtube.com/watch?v=example",
    "project_name": "sample project name"
  }'

Submit response

{
  "code": "0",
  "data": {
    "id": "proj_abc123",
    "name": "sample project name",
    "status": "CREATED"
  },
  "message": "success"
}

Request body sets enable_export to true. Clips are rendered; each clip includes an export_link.

Request

curl -X POST https://wayinvideo-api.wayin.ai/open/v2/clips \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "x-wayinvideo-api-version: v2" \
  -d '{
    "video_url": "https://www.youtube.com/watch?v=example",
    "project_name": "sample project name",
    "enable_export": true,
    "ratio": "RATIO_9_16",
    "resolution": "HD_720",
    "enable_caption": true,
    "enable_ai_reframe": true
  }'

Submit response

{
  "code": "0",
  "data": {
    "id": "proj_xyz789",
    "name": "sample project name",
    "status": "CREATED"
  },
  "message": "success"
}
FieldTypeDescription
idstringUnique task identifier
namestringTask name
statusstringProcessing status: CREATED, QUEUED, ONGOING, SUCCEEDED, FAILED

Get Clipping Results

Retrieve task status and clips. Poll this endpoint until status is SUCCEEDED.

GET https://wayinvideo-api.wayin.ai/open/v2/clips/results/{id}

Path Parameters

ParameterTypeRequiredDescription
idstringYesThe task ID returned by the submit endpoint

Example Request

curl -X GET https://wayinvideo-api.wayin.ai/open/v2/clips/results/proj_abc123 \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "x-wayinvideo-api-version: v2"

Response example: without export

When the task was submitted without enable_export (or with enable_export: false), clips do not include export_link:

{
  "code": "0",
  "data": {
    "id": "proj_abc123",
    "name": "sample project name",
    "status": "SUCCEEDED",
    "expire_at": 1741824000000,
    "api_units_usage": 120,
    "clips": [
      {
        "idx": 0,
        "title": "sample title",
        "begin_ms": "15000",
        "end_ms": "75000",
        "thumbnail": "https://cdn.example.com/thumb/clip_001.jpg",
        "tags": ["insight", "analysis"],
        "desc": "sample description",
        "score": "81"
      },
      {
        "idx": 1,
        "title": "sample title 2",
        "begin_ms": "120000",
        "end_ms": "195000",
        "thumbnail": "https://cdn.example.com/thumb/clip_002.jpg",
        "tags": ["tips", "summary"],
        "desc": "sample description",
        "score": "76"
      }
    ]
  },
  "message": "success"
}

Response example: with export

When the task was submitted with enable_export: true, each clip includes an export_link for the rendered video:

{
  "code": "0",
  "data": {
    "id": "proj_xyz789",
    "name": "sample project name",
    "status": "SUCCEEDED",
    "expire_at": 1741824000000,
    "api_units_usage": 120,
    "clips": [
      {
        "idx": 0,
        "title": "sample title",
        "begin_ms": "15000",
        "end_ms": "75000",
        "thumbnail": "https://cdn.example.com/thumb/clip_001.jpg",
        "tags": ["insight", "analysis"],
        "desc": "sample description",
        "score": "81",
        "export_link": "https://cdn.example.com/export/clip_001.mp4"
      },
      {
        "idx": 1,
        "title": "sample title 2",
        "begin_ms": "120000",
        "end_ms": "195000",
        "thumbnail": "https://cdn.example.com/thumb/clip_002.jpg",
        "tags": ["tips", "summary"],
        "desc": "sample description",
        "score": "76",
        "export_link": "https://cdn.example.com/export/clip_002.mp4"
      }
    ]
  },
  "message": "success"
}

Clip Object

FieldTypeDescription
idxintegerClip index (0-based, ranked by viral potential)
titlestringAI-generated clip title
begin_msstringStart time in milliseconds
end_msstringEnd time in milliseconds
thumbnailstringThumbnail image URL
tagsstring[]AI-generated hashtags
descstringAI-generated description
scorestringViral potential score (0–100, higher is better)
export_linkstringRendered video download URL (when enable_export is true)