# Video Notes API

> Generate structured AI notes from videos with custom prompts, timestamps, length controls, and optional video frames.

## Video Notes API

Submit a video URL or uploaded file to generate summary information and, optionally, a structured AI note. You can customize the note instructions, output language, preferred length, timestamps, and whether to include relevant frames from the source video.

Each response includes a structured overview, hashtags, and timeline highlights. When AI note generation is enabled, the response also includes the note in both Markdown and plain-text formats. When AI note generation is not enabled, the response contains only the summary-related information.

## Supported Video Sources

The API accepts video URLs from YouTube, Vimeo, Dailymotion, Kick, Twitch, TikTok, Facebook, Zoom, Rumble, and more.

You can also process [local video files you upload](https://wayin.ai/api-docs/upload/) — local upload requires a **Starter** plan or above.

### Workflow

1. **Submit** a Video Notes task using a video URL or uploaded file identifier
2. **Poll** the results endpoint until `status` is `SUCCEEDED`

---

## Submit Video Notes Task

Create a task with or without AI note generation. Include `note_params` to generate an AI note; omit it when you only need the summary, hashtags, and timeline highlights.

```http
POST https://wayinvideo-api.wayin.ai/api/v2/notes
```

### 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](https://wayin.ai/api-docs/supported-languages/)). When `null`, the system auto-detects the original language.                                        |
| `target_lang` | string | No       | `null`  | Target language for the generated summary and highlights (see [Supported Languages](https://wayin.ai/api-docs/supported-languages/)). When `null`, the output language follows the detected source language. |
| `note_params` | object | No       | `null`  | AI note generation settings. Omit this object to skip AI note generation.                                                                                                                    |

### Note Parameters

| Parameter         | Type    | Required                           | Default | Description                          |
| ----------------- | ------- | ---------------------------------- | ------- | ------------------------------------ |
| `enable_note`     | boolean | Yes when `note_params` is provided | —       | Set to `true` to generate an AI note |
| `generate_params` | object  | Yes when `note_params` is provided | —       | AI note generation settings          |

### Note Generation Parameters

| Parameter           | Type    | Required | Default | Description                                                                                                                                    |
| ------------------- | ------- | -------- | ------- | ---------------------------------------------------------------------------------------------------------------------------------------------- |
| `prompt`            | string  | Yes      | —       | Instructions describing the desired note structure, content, or focus                                                                          |
| `language`          | string  | No       | `null`  | Output language for the AI note only; it does not affect the summary or highlights (see [Supported Languages](https://wayin.ai/api-docs/supported-languages/)) |
| `length_option`     | string  | Yes      | —       | Preferred note length: `short`, `medium`, or `long`                                                                                            |
| `include_timestamp` | boolean | Yes      | —       | Whether to add source-video timestamps to relevant sections and key points, helping readers locate the corresponding moments in the video      |
| `image_visual`      | boolean | No       | `false` | Whether to include relevant frames extracted from the source video                                                                             |

### Example Request

```bash
curl -X POST https://wayinvideo-api.wayin.ai/api/v2/notes \
  -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",
    "source_lang": "en",
    "target_lang": "en",
    "note_params": {
      "enable_note": true,
      "generate_params": {
        "prompt": "Organize the main ideas and action items",
        "language": "en",
        "length_option": "medium",
        "include_timestamp": true,
        "image_visual": false
      }
    }
  }'
```

```python
import requests

requests.post(
    "https://wayinvideo-api.wayin.ai/api/v2/notes",
    headers={
        "Authorization": "Bearer YOUR_API_KEY",
        "x-wayinvideo-api-version": "v2",
    },
    json={
        "video_url": "https://www.youtube.com/watch?v=EXAMPLE",
        "target_lang": "en",
        "note_params": {
            "enable_note": True,
            "generate_params": {
                "prompt": "Organize the main ideas and action items",
                "language": "en",
                "length_option": "medium",
                "include_timestamp": True,
            },
        },
    },
)
```

```javascript
await fetch('https://wayinvideo-api.wayin.ai/api/v2/notes', {
  method: 'POST',
  headers: {
    Authorization: 'Bearer YOUR_API_KEY',
    'x-wayinvideo-api-version': 'v2',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    video_url: 'https://www.youtube.com/watch?v=EXAMPLE',
    target_lang: 'en',
    note_params: {
      enable_note: true,
      generate_params: {
        prompt: 'Organize the main ideas and action items',
        language: 'en',
        length_option: 'medium',
        include_timestamp: true,
      },
    },
  }),
});
```

### Submit Response

```json
{
  "data": {
    "id": "note_proj_001",
    "name": "sample project name",
    "status": "CREATED"
  }
}
```

| Field    | Type   | Description                                          |
| -------- | ------ | ---------------------------------------------------- |
| `id`     | string | Task identifier used to retrieve results             |
| `name`   | string | Task name derived from the source video              |
| `status` | string | Initial task status; accepted tasks return `CREATED` |

---

## Examples

The examples below show common Video Notes use cases. Replace `YOUR_API_KEY` with a key from the [API Dashboard](https://wayin.ai/wayinvideo/api-dashboard).

### Generate concise notes with timestamps

```bash
curl -X POST https://wayinvideo-api.wayin.ai/api/v2/notes \
  -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",
    "note_params": {
      "enable_note": true,
      "generate_params": {
        "prompt": "Create concise notes covering the main ideas",
        "length_option": "short",
        "include_timestamp": true
      }
    }
  }'
```

### Generate action-oriented meeting notes

```bash
curl -X POST https://wayinvideo-api.wayin.ai/api/v2/notes \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "x-wayinvideo-api-version: v2" \
  -H "Content-Type: application/json" \
  -d '{
    "video_url": "UPLOADED_FILE_ID",
    "note_params": {
      "enable_note": true,
      "generate_params": {
        "prompt": "Create meeting notes with decisions, owners, and action items",
        "length_option": "medium",
        "include_timestamp": true
      }
    }
  }'
```

### Process a video without an AI note

Omit `note_params` to return the summary, hashtags, and timeline highlights without note data.

```bash
curl -X POST https://wayinvideo-api.wayin.ai/api/v2/notes \
  -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",
    "target_lang": "en"
  }'
```

---

## Get Video Notes Results

After submitting a task, poll this endpoint until `status` is `SUCCEEDED`. The successful response contains summary information and, when requested, the generated AI note.

```http
GET https://wayinvideo-api.wayin.ai/api/v2/notes/results/{id}
```

### Path Parameters

| Parameter | Type   | Required | Description                                 |
| --------- | ------ | -------- | ------------------------------------------- |
| `id`      | string | Yes      | The task ID returned by the submit endpoint |

### Results Request

```bash
curl -X GET https://wayinvideo-api.wayin.ai/api/v2/notes/results/note_proj_001 \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "x-wayinvideo-api-version: v2"
```

```python
import requests

requests.get(
    "https://wayinvideo-api.wayin.ai/api/v2/notes/results/note_proj_001",
    headers={
        "Authorization": "Bearer YOUR_API_KEY",
        "x-wayinvideo-api-version": "v2",
    },
)
```

```javascript
await fetch(
  'https://wayinvideo-api.wayin.ai/api/v2/notes/results/note_proj_001',
  {
    method: 'GET',
    headers: {
      Authorization: 'Bearer YOUR_API_KEY',
      'x-wayinvideo-api-version': 'v2',
    },
  }
);
```

### Example Successful Response

```json
{
  "data": {
    "summary_id": "vdsmr_001",
    "status": "SUCCEEDED",
    "title": "sample title",
    "video_thumbnail": "https://cdn.example.com/thumb/video_001.jpg",
    "summary": "sample summary text",
    "note_data": "# Main Ideas\n\n- **00:45** First key point\n- **03:20** Second key point",
    "note_text": "Main Ideas\n\n00:45 First key point\n03:20 Second key point",
    "tags": ["#topic1", "#topic2"],
    "highlights": [
      {
        "start": 0,
        "end": 196000,
        "desc": "sample section title",
        "events": [
          {
            "timestamp": 45000,
            "desc": "sample event description"
          }
        ]
      }
    ],
    "cost_usage": 54.0
  }
}
```

### Response Fields

| Field             | Type     | Description                                                                                          |
| ----------------- | -------- | ---------------------------------------------------------------------------------------------------- |
| `summary_id`      | string   | Identifier of the generated summary                                                                  |
| `status`          | string   | Task status: `CREATED`, `QUEUED`, `ONGOING`, `SUCCEEDED`, or `FAILED`                                |
| `error_message`   | string   | Error reason; only present when `status` is `FAILED`                                                 |
| `title`           | string   | AI-generated title                                                                                   |
| `video_thumbnail` | string   | Source video thumbnail URL                                                                           |
| `summary`         | string   | Structured overview of the video                                                                     |
| `note_data`       | string   | AI note with Markdown structure preserved, suitable for Markdown rendering; omitted if not requested |
| `note_text`       | string   | Plain-text version of the AI note with Markdown syntax removed; omitted if not requested             |
| `tags`            | string[] | AI-generated hashtags                                                                                |
| `highlights`      | array    | Timeline sections with timestamps and key events                                                     |
| `cost_usage`      | number   | API units consumed by the task                                                                       |

### Highlight Object

| Field    | Type   | Description                     |
| -------- | ------ | ------------------------------- |
| `start`  | number | Start time in milliseconds      |
| `end`    | number | End time in milliseconds        |
| `desc`   | string | Section title or description    |
| `events` | array  | Key events within the highlight |

### Event Object

| Field       | Type   | Description                |
| ----------- | ------ | -------------------------- |
| `timestamp` | number | Event time in milliseconds |
| `desc`      | string | Event description          |

---

## FAQ

### What is the difference between Video Notes and Video Summarization?

The [Video Summarization API](https://wayin.ai/api-docs/video-summarization/) generates an overview, hashtags, and timeline highlights. The Video Notes API returns the same summary information and can additionally generate a customizable note in Markdown and plain text.

### Is AI note generation required?

No. Omit `note_params` to return summary information without an AI note. To generate a note, provide `note_params`, set `enable_note` to `true`, and include `generate_params.prompt`.

### What is the difference between `note_data` and `note_text`?

`note_data` preserves the generated Markdown structure for rendering headings, lists, emphasis, and other formatting. `note_text` contains the same note with Markdown syntax removed, making it suitable for search indexing, embeddings, previews, or plain-text storage.

### Can I control the note format?

Yes. Use `generate_params.prompt` for instructions, `language` for the note language, `length_option` for the preferred length, `include_timestamp` for timestamps, and `image_visual` to include relevant video frames.

### Which video sources are supported?

URLs from YouTube, Vimeo, Dailymotion, Kick, Twitch, TikTok, Facebook, Zoom, Rumble and more, plus local file uploads via the [Upload API](https://wayin.ai/api-docs/upload/).
