Video Summarization API
Submit a video of any length and receive an AI-generated structured overview, hashtags, and timeline highlights. The API supports everything from short clips to hours-long videos across major platforms and locally uploaded files, along with language settings.
Supported Video Sources
The API accepts URLs from the following platforms: YouTube, Vimeo, Dailymotion, Kick, Twitch, TikTok, Facebook, Zoom, Rumble and more.
You can also use locally uploaded files. Local upload requires a Standard plan or above. See the Upload API for details.
Workflow
- Submit a summarization task from a video URL
- Poll the results until status is
SUCCEEDED
Submit Summarization Task
Submit a new summarization task. This is the entry point for all summarization features.
POST https://wayinvideo-api.wayin.ai/api/v2/summaries
Request Body
| Parameter | Type | Required | Default | Description |
|---|
video_url | string | Yes | — | The source video URL or uploaded file identifier |
source_lang | string | No | null | Source language of the video (see Supported Languages). When null, the system auto-detects the original language. |
target_lang | string | No | null | Target language for output content including summary, descriptions, and highlights (see Supported Languages). When null, the output language matches source_lang. |
Example Request
curl -X POST https://wayinvideo-api.wayin.ai/api/v2/summaries \
-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",
"target_lang": "en"
}'
Response
{
"data": {
"id": "sum_proj_001",
"name": "sample project name",
"status": "CREATED"
}
}
| Field | Type | Description |
|---|
id | string | Task identifier (used in subsequent requests) |
name | string | Task name |
status | string | CREATED, QUEUED, ONGOING, SUCCEEDED, FAILED |
Get Summary Results
Retrieve the summary, highlights, and tags. Poll until status is SUCCEEDED.
GET https://wayinvideo-api.wayin.ai/api/v2/summaries/results/{id}
Path Parameters
| Parameter | Type | Required | Description |
|---|
id | string | Yes | The task ID returned by the submit endpoint |
Example Request
curl -X GET https://wayinvideo-api.wayin.ai/api/v2/summaries/results/sum_proj_001 \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "x-wayinvideo-api-version: v2"
Response
{
"data": {
"status": "SUCCEEDED",
"title": "sample title",
"video_thumbnail": "https://cdn.example.com/thumb/video_001.jpg",
"summary": "sample summary text",
"tags": ["#topic1", "#topic2", "#topic3"],
"highlights": [
{
"start": 0,
"end": 196000,
"desc": "sample section title",
"events": [
{
"timestamp": 160,
"desc": "sample event description"
},
{
"timestamp": 17920,
"desc": "sample event description"
}
]
}
],
"cost_usage": 54.0
}
}
Summary Response Fields
| Field | Type | Description |
|---|
status | string | CREATED, QUEUED, ONGOING, SUCCEEDED, FAILED |
error_message | string | Error reason (only present when status is FAILED) |
title | string | AI-generated title |
video_thumbnail | string | Video thumbnail URL |
summary | string | Full text overview |
tags | string[] | AI-generated hashtags |
highlights | array | Timeline highlight segments (see below) |
cost_usage | number | API units consumed for this request |
Highlight Object
| Field | Type | Description |
|---|
start | number | Start time in milliseconds |
end | number | End time in milliseconds |
desc | string | Section title / description |
events | array | Key events within the highlight |
Event Object
| Field | Type | Description |
|---|
timestamp | number | Event time in milliseconds |
desc | string | Event description |