# AI Viral Clip Cutter — Long Video to Shorts (`dami_studio/ai-viral-clip-cutter`) Actor

Turn a long video (podcast, interview, stream, talk) into ranked short clips automatically. Transcribes, finds the most viral moments with AI scoring, cuts them to 9:16 with a blurred background, and burns word-synced captions. For TikTok, Reels, and Shorts repurposing.

- **URL**: https://apify.com/dami\_studio/ai-viral-clip-cutter.md
- **Developed by:** [Dami's Studio](https://apify.com/dami_studio) (community)
- **Categories:** Videos, For creators, AI
- **Stats:** 1 total users, 0 monthly users, 0.0% runs succeeded, NaN bookmarks
- **User rating**: 5.00 out of 5 stars

## Pricing

from $200.00 / 1,000 clip generateds

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

Learn more: https://docs.apify.com/platform/actors/running/actors-in-store#pay-per-event

## What's an Apify Actor?

Actors are a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.
Actors are written with capital "A".

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.
The best way to integrate Actors is as follows.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp.md).

If your project is in a different language, use the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).


# README

## AI Viral Clip Cutter

Takes one long video (a podcast, interview, stream, or talk) and returns a handful of short clips ranked by how likely they are to do well on social. It transcribes the audio, has an LLM score every candidate moment for virality, then cuts the top ones to vertical 9:16 with a blurred background and burns word-synced captions on top. Made for people who already publish shorts and don't want to scrub through two hours of footage to find the three usable minutes.

### How it works

Download, extract audio, transcribe with word-level timestamps, ask a chat model to find and score self-contained moments, then for each kept moment ffmpeg cuts the segment, reframes to the target aspect ratio (blurred fill, no hard crop), and libass burns the captions. Runs CPU-only, no GPU.

### Input

| Field | Required | Notes |
|---|---|---|
| `videoUrl` | yes | Public direct URL to the source video (`.mp4`/`.mov`/`.webm`). Pair it with a YouTube downloader actor to feed YouTube links. |
| `maxClips` | no | How many clips to produce, highest-scoring first. Default 5. |
| `minScore` | no | Virality threshold, 0-100. Moments below this are dropped. Default 60. Lower it if you get back fewer clips than you wanted. |
| `aspectRatio` | no | `9:16`, `1:1`, `16:9`, or `original`. The two portrait options use a blurred background instead of cropping. Default `9:16`. |
| `burnCaptions` | no | Burn word-synced captions into each clip. Default true. |
| `captionPreset` | no | Caption look: `karaoke`, `hormozi`, `beast`, `tiktok`, or `clean`. |
| `language` | no | Spoken-language ISO code (`en`, `es`, ...) or `auto`. |
| `openaiApiKey` | no | Your OpenAI key, used for both transcription and moment scoring. Bring your own and you only pay the per-clip result fee. |

### Output

One dataset record per clip, ordered by `rank`, plus the rendered MP4 in the run's key-value store. Each record carries the `score` (0-100), a short `title` and `reason` for why it was picked, suggested `hashtags`, the source `start`/`end` and `durationSeconds`, and `clipKey` / `clipUrl` for downloading the finished video. Failed clips come back with `ok: false` and an `error` so you can see what dropped.

### Example

```json
{
  "videoUrl": "https://your-cdn.com/podcast-ep-42.mp4",
  "maxClips": 5,
  "minScore": 60,
  "aspectRatio": "9:16",
  "openaiApiKey": "sk-..."
}
````

### Pricing

$0.35 per clip, pay per result, no subscription. You bring your own OpenAI key for the steps that use a model.

### Notes

Scoring quality depends on the transcript, so clean speech does noticeably better than noisy or heavily overlapping audio. Without an OpenAI key the transcription and scoring steps can't run, so the key is effectively required even though the field is optional. You're responsible for having the rights to whatever video URL you submit.

# Actor input Schema

## `videoUrl` (type: `string`):

Public direct URL to the long-form source video (.mp4/.mov/.webm). Pair with the YouTube Downloader to feed it YouTube videos.

## `maxClips` (type: `integer`):

Maximum number of clips to produce (highest-scoring first).

## `minScore` (type: `integer`):

Only keep moments scoring at least this (0-100). Lower it if you get too few clips.

## `aspectRatio` (type: `string`):

Output shape. 9:16 / 1:1 use a blurred background (no crop); 16:9 keeps the source.

## `burnCaptions` (type: `boolean`):

Burn word-synced captions into each clip.

## `captionPreset` (type: `string`):

Caption look (when captions are on).

## `language` (type: `string`):

Spoken language ISO code, or 'auto'.

## `openaiApiKey` (type: `string`):

Your OpenAI key — transcription + viral-moment detection. Kept private.

## `detectModel` (type: `string`):

Chat model for moment detection. Default gpt-4o-mini.

## `baseUrl` (type: `string`):

OpenAI-compatible base URL. Default https://api.openai.com/v1.

## Actor input object example

```json
{
  "maxClips": 5,
  "minScore": 60,
  "aspectRatio": "9:16",
  "burnCaptions": true,
  "captionPreset": "karaoke",
  "language": "auto",
  "detectModel": "gpt-4o-mini"
}
```

# Actor output Schema

## `results` (type: `string`):

Result rows / metadata are stored in the default dataset (one row per item).

## `files` (type: `string`):

Generated media/files (video, audio, images, captions) are stored in the default key-value store.

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {};

// Run the Actor and wait for it to finish
const run = await client.actor("dami_studio/ai-viral-clip-cutter").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {}

# Run the Actor and wait for it to finish
run = client.actor("dami_studio/ai-viral-clip-cutter").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{}' |
apify call dami_studio/ai-viral-clip-cutter --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=dami_studio/ai-viral-clip-cutter",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "AI Viral Clip Cutter — Long Video to Shorts",
        "description": "Turn a long video (podcast, interview, stream, talk) into ranked short clips automatically. Transcribes, finds the most viral moments with AI scoring, cuts them to 9:16 with a blurred background, and burns word-synced captions. For TikTok, Reels, and Shorts repurposing.",
        "version": "0.1",
        "x-build-id": "aLoaJPi1NH03Uddyi"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/dami_studio~ai-viral-clip-cutter/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-dami_studio-ai-viral-clip-cutter",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/acts/dami_studio~ai-viral-clip-cutter/runs": {
            "post": {
                "operationId": "runs-sync-dami_studio-ai-viral-clip-cutter",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor and returns information about the initiated run in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/runsResponseSchema"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/acts/dami_studio~ai-viral-clip-cutter/run-sync": {
            "post": {
                "operationId": "run-sync-dami_studio-ai-viral-clip-cutter",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "inputSchema": {
                "type": "object",
                "required": [
                    "videoUrl"
                ],
                "properties": {
                    "videoUrl": {
                        "title": "Video URL",
                        "type": "string",
                        "description": "Public direct URL to the long-form source video (.mp4/.mov/.webm). Pair with the YouTube Downloader to feed it YouTube videos."
                    },
                    "maxClips": {
                        "title": "Max clips",
                        "minimum": 1,
                        "maximum": 20,
                        "type": "integer",
                        "description": "Maximum number of clips to produce (highest-scoring first).",
                        "default": 5
                    },
                    "minScore": {
                        "title": "Minimum viral score",
                        "type": "integer",
                        "description": "Only keep moments scoring at least this (0-100). Lower it if you get too few clips.",
                        "default": 60
                    },
                    "aspectRatio": {
                        "title": "Aspect ratio",
                        "enum": [
                            "9:16",
                            "1:1",
                            "16:9",
                            "original"
                        ],
                        "type": "string",
                        "description": "Output shape. 9:16 / 1:1 use a blurred background (no crop); 16:9 keeps the source.",
                        "default": "9:16"
                    },
                    "burnCaptions": {
                        "title": "Burn captions",
                        "type": "boolean",
                        "description": "Burn word-synced captions into each clip.",
                        "default": true
                    },
                    "captionPreset": {
                        "title": "Caption style",
                        "enum": [
                            "karaoke",
                            "hormozi",
                            "beast",
                            "tiktok",
                            "clean"
                        ],
                        "type": "string",
                        "description": "Caption look (when captions are on).",
                        "default": "karaoke"
                    },
                    "language": {
                        "title": "Language",
                        "type": "string",
                        "description": "Spoken language ISO code, or 'auto'.",
                        "default": "auto"
                    },
                    "openaiApiKey": {
                        "title": "OpenAI API key (BYO)",
                        "type": "string",
                        "description": "Your OpenAI key — transcription + viral-moment detection. Kept private."
                    },
                    "detectModel": {
                        "title": "Detection model (advanced)",
                        "type": "string",
                        "description": "Chat model for moment detection. Default gpt-4o-mini.",
                        "default": "gpt-4o-mini"
                    },
                    "baseUrl": {
                        "title": "API base URL (advanced)",
                        "type": "string",
                        "description": "OpenAI-compatible base URL. Default https://api.openai.com/v1."
                    }
                }
            },
            "runsResponseSchema": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "actId": {
                                "type": "string"
                            },
                            "userId": {
                                "type": "string"
                            },
                            "startedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "finishedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "status": {
                                "type": "string",
                                "example": "READY"
                            },
                            "meta": {
                                "type": "object",
                                "properties": {
                                    "origin": {
                                        "type": "string",
                                        "example": "API"
                                    },
                                    "userAgent": {
                                        "type": "string"
                                    }
                                }
                            },
                            "stats": {
                                "type": "object",
                                "properties": {
                                    "inputBodyLen": {
                                        "type": "integer",
                                        "example": 2000
                                    },
                                    "rebootCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "restartCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "resurrectCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "computeUnits": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "options": {
                                "type": "object",
                                "properties": {
                                    "build": {
                                        "type": "string",
                                        "example": "latest"
                                    },
                                    "timeoutSecs": {
                                        "type": "integer",
                                        "example": 300
                                    },
                                    "memoryMbytes": {
                                        "type": "integer",
                                        "example": 1024
                                    },
                                    "diskMbytes": {
                                        "type": "integer",
                                        "example": 2048
                                    }
                                }
                            },
                            "buildId": {
                                "type": "string"
                            },
                            "defaultKeyValueStoreId": {
                                "type": "string"
                            },
                            "defaultDatasetId": {
                                "type": "string"
                            },
                            "defaultRequestQueueId": {
                                "type": "string"
                            },
                            "buildNumber": {
                                "type": "string",
                                "example": "1.0.0"
                            },
                            "containerUrl": {
                                "type": "string"
                            },
                            "usage": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "usageTotalUsd": {
                                "type": "number",
                                "example": 0.00005
                            },
                            "usageUsd": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "number",
                                        "example": 0.00005
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
