On this page
An AI summary of a video reads well whether or not it's right, and you can't tell which without watching. The fix is a summary where each point carries the words it rests on, so you can check the one that matters in seconds.
Three ways to get one, from least to most work.
1. A cited summary in one call #
In the playground, paste a link and choose the summary preset. Or call the API:
curl https://api.cleanscript.ai/v1/extract \
-H "Authorization: Bearer $CLEANSCRIPT_API_KEY" \
-H "Content-Type: application/json" \
-d '{"url": "https://www.youtube.com/watch?v=UF8uR6Z6KLc", "preset": "summary"}'You get summary, key_points, quotes and people. For Steve Jobs' Stanford Commencement Address, one key point reads:
He says people cannot connect the dots looking forward, but can only connect them looking backward, and encourages graduates to trust that their experiences may connect in the future.
Its citation is the sentence it rests on, with a link to the moment:
{
"quote": "Again, you can't connect the dots looking forward; you can only connect them looking backwards. So you have to trust that the dots will somehow connect in your future.",
"source": "speech",
"start": 307.13,
"end": 316.44,
"url": "https://youtu.be/UF8uR6Z6KLc?t=307"
}Click, listen for ten seconds, and you know. A value no quote supports is dropped and listed in removed.
2. Ask one question #
Often you don't need everything. Send a prompt instead of a preset:
# pip install cleanscript-ai
from cleanscript_ai import CleanScript
client = CleanScript()
result = client.extract(
"https://www.instagram.com/reel/C-TCp_KhMr4/",
prompt="Which country jumps to the top once medals are adjusted for GDP, and why?",
)
print(result.data["answer"])For The Economist's Olympic medals reel, the answer is "Jamaica jumps to the top because it earns 69 medals for every $100 billion of GDP when medal totals are adjusted for economic size." It cites "For every 100 billion dollars of GDP, Jamaica nets 69 medals." at 47 seconds.
When the post doesn't address the question, answer is null.
3. A clean transcript for your own model #
If you already have a model and a prompt, give it good input. The transcript has punctuation, paragraphs and sections:
from cleanscript_ai import transcript_text
text = transcript_text(client.transcript("https://www.youtube.com/watch?v=UF8uR6Z6KLc"))
# send `text` to your modelYou lose the checked quotes this way, unless you ask your model to quote and then look for each quote in text.
Cost and languages #
A summary or question costs 3 credits per started 10 minutes of video, the transcript included, so a one-hour lecture is 18 credits. A transcript alone is 1 (1 per started minute for a post without captions). See pricing.
Pass language to get the summary in another language. Quotes stay in the words that were spoken, so you can still check them:
client.extract("https://www.youtube.com/watch?v=UF8uR6Z6KLc", preset="summary", language="en")From a chat #
To ask Claude or ChatGPT directly, connect CleanScript once and paste a link. See YouTube video in ChatGPT or Claude.
Spot something wrong? Tell us.