モーメント検索 API

April 1, 2026

モーメント検索 API

モーメント検索 API では、欲しいモーメントを自然言語で説明できます — "面白いリアクション""商品デモ" など。API はあらゆる長さの動画(数時間の長尺コンテンツを含む)から対応するクリップをタイムスタンプ・タイトル・説明・ハッシュタグ付きで抽出します。エクスポートを有効にすると、レンダリング済み動画のダウンロードリンクも取得できます。

対応動画ソース

YouTube、Vimeo、Dailymotion、Kick、Twitch、TikTok、Facebook、Zoom、Rumble など。

アップロードしたローカル動画ファイルも検索可能です — ローカルアップロードには Standard プラン以上が必要です。


モーメント検索タスクの送信

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

リクエストボディ

パラメータ必須デフォルト説明
video_urlstringはいソース動画の URL またはファイル識別子。
querystringはい""検索したいモーメントを説明する自然言語クエリ(例:"面白いリアクション""商品デモ"
project_namestringいいえ""タスクのカスタム名
source_langstringいいえnullソース言語。null の場合は自動検出。
target_langstringいいえnull出力コンテンツの目標言語。
limitnumberいいえnull返却するクリップの最大数。
enable_exportbooleanいいえfalsefalse:メタデータのみ;true:即時レンダリング。
resolutionstringいいえSD_480出力解像度:SD_480HD_720FHD_1080QHD_2KUHD_4K
enable_captionbooleanいいえfalseアニメーション字幕を追加。
caption_displaystringいいえoriginal字幕モード:bothoriginaltranslation
cc_style_tplstringいいえtemp-7字幕スタイルテンプレート ID。
enable_ai_hookbooleanいいえfalseAI 生成の注目テキストを追加。
ai_hook_script_stylestringいいえseriousフックテキストのスタイル:seriouscasualinformativeconversationalhumorousparodyinspirationaldramaticempatheticpersuasiveneutralexcitedcalm
ai_hook_positionstringいいえbeginning位置:beginningend
enable_ai_reframebooleanいいえfalseAI リフレームを有効化。
ratiostringenable_ai_reframetrue のとき必須アスペクト比:RATIO_9_16RATIO_1_1RATIO_4_5RATIO_16_9
reframe_layoutstringいいえAutoAI リフレームのレイアウト。
curl -X POST https://wayinvideo-api.wayin.ai/api/v2/clips/find-moments \
  -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", "query": "sample query", "enable_export": true, "resolution": "FHD_1080"}'
{"data": {"id": "proj_moment_789", "name": "sample project name", "status": "CREATED"}}
curl -X POST https://wayinvideo-api.wayin.ai/api/v2/clips/find-moments \
  -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", "query": "sample query"}'
{"data": {"id": "proj_moment_456", "name": "sample project name", "status": "CREATED"}}

使用例

代表的な Find Moments のシナリオです。YOUR_API_KEYAPI ダッシュボード で取得したキーに置き換えてください。

YouTube 動画から面白いモーメントを検索

curl -X POST https://wayinvideo-api.wayin.ai/api/v2/clips/find-moments \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "x-wayinvideo-api-version: v2" \
  -H "Content-Type: application/json" \
  -d '{
    "video_url": "https://www.youtube.com/watch?v=EXAMPLE",
    "query": "funny reactions"
  }'

長尺マーケティング動画から商品デモのセグメントを抽出

curl -X POST https://wayinvideo-api.wayin.ai/api/v2/clips/find-moments \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "x-wayinvideo-api-version: v2" \
  -H "Content-Type: application/json" \
  -d '{
    "video_url": "https://www.youtube.com/watch?v=EXAMPLE",
    "query": "product demos and feature walkthroughs",
    "limit": 10
  }'

スポーツのハイライトを検索し、字幕付き縦型クリップとしてエクスポート

curl -X POST https://wayinvideo-api.wayin.ai/api/v2/clips/find-moments \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "x-wayinvideo-api-version: v2" \
  -H "Content-Type: application/json" \
  -d '{
    "video_url": "https://www.youtube.com/watch?v=EXAMPLE",
    "query": "goal moments and key plays",
    "enable_export": true,
    "resolution": "FHD_1080",
    "enable_caption": true,
    "enable_ai_reframe": true,
    "ratio": "RATIO_9_16"
  }'

モーメント検索結果の取得

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

インクリメンタル結果: statusONGOING の間、各呼び出しはその時点で生成済みのクリップを返します。

{"data": {"id": "proj_moment_789", "status": "SUCCEEDED", "expire_at": 1775831883112, "cost_usage": 120.0,
          "clips": [{"idx": 0, "title": "sample title", "begin_ms": 120000, "end_ms": 185000,
                     "tags": ["product"], "desc": "sample description", "score": 81,
                     "export_link": "https://cdn.example.com/export/moment_001.mp4"}]}}
{"data": {"id": "proj_moment_456", "status": "SUCCEEDED", "expire_at": 1775831883112, "cost_usage": 120.0,
          "clips": [{"idx": 0, "title": "sample title", "begin_ms": 120000, "end_ms": 185000,
                     "tags": ["product"], "desc": "sample description", "score": 81}]}}

レスポンスフィールドとクリップオブジェクトは AI クリッピング API と同じ構造です。


既存クリップの再エクスポート

後からレンダリングしたり、別の設定で再エクスポートするには クリップエクスポート API をご利用ください。


FAQ

Find Moments と AI Clipping の違いは?

AI Clipping は、クエリなしでバイラルポテンシャル順にランク付けされたクリップを自動的に返します。Find Moments は、欲しい内容を自然言語で記述(例:"funny reactions""product demos""goal moments")し、それに一致するクリップだけを返します。

返却されるモーメントの件数を制限できますか?

はい。limit: N を指定すると関連性順の上位 N 件のみを返却します。長尺動画から強い一致のクリップだけを取り出したい場合に有効です。

Find Moments は部分結果をサポートしていますか?

はい — ポーリング時、status: ONGOING のセグメントにもその時点で生成済みのクリップが含まれているため、タスク完了を待たずに後続処理を開始できます。