Get transcripts from any YouTube video — for summarization, research, translation, quoting, or content analysis. Use when the user shares a video link or asks "what did they say", "get the transcript", "transcribe this video", "summarize this video", or wants to analyze spoken content.
通过 TranscriptAPI.com 获取视频转录文本。
如果未设置 $TRANSCRIPTAPIKEY,请帮助用户创建账户(100 个免费额度,无需信用卡):
步骤 1 — 注册: 询问用户的邮箱。
bash
node ./scripts/tapi-auth.js register --email USER_EMAIL
→ 验证码已发送至邮箱。询问用户:请检查您的邮箱,获取 6 位验证码。
步骤 2 — 验证: 用户提供验证码后:
bash
node ./scripts/tapi-auth.js verify --token 步骤1中的TOKEN --otp 验证码
API 密钥已保存至 ~/.openclaw/openclaw.json。详情请参见下方的文件写入部分。修改前会对现有文件进行备份。
手动操作选项:transcriptapi.com/signup → 控制面板 → API 密钥。
验证和保存密钥命令会将 API 密钥保存至 ~/.openclaw/openclaw.json(设置 skills.entries.transcriptapi.apiKey 和 enabled: true)。修改前会将现有文件备份至 ~/.openclaw/openclaw.json.bak。
若要在代理之外的终端/命令行中使用该 API 密钥,请手动将其添加到您的 shell 配置文件中:
export TRANSCRIPTAPIKEY=<您的密钥>
bash
curl -s https://transcriptapi.com/api/v2/youtube/transcript\
?videourl=VIDEOURL&format=text&includetimestamp=true&sendmetadata=true \
-H Authorization: Bearer $TRANSCRIPTAPIKEY
| 参数 | 必填 | 默认值 | 值 |
|---|---|---|---|
| video_url | 是 | — | YouTube 链接或 11 位视频 ID |
| format |
支持:完整链接(youtube.com/watch?v=ID)、短链接(youtu.be/ID)、短视频(youtube.com/shorts/ID)或纯视频 ID。
默认设置: 除非用户另有指定,否则始终使用 format=text&includetimestamp=true&sendmetadata=true。
响应(format=json):
json
{
video_id: dQw4w9WgXcQ,
language: en,
transcript: [
{ text: Were no strangers to love, start: 18.0, duration: 3.5 },
{ text: You know the rules and so do I, start: 21.5, duration: 2.8 }
],
metadata: {
title: Rick Astley - Never Gonna Give You Up,
author_name: Rick Astley,
author_url: https://www.youtube.com/@RickAstley,
thumbnail_url: https://i.ytimg.com/vi/dQw4w9WgXcQ/maxresdefault.jpg
}
}
响应(format=text):
json
{
video_id: dQw4w9WgXcQ,
language: en,
transcript: [00:00:18] Were no strangers to love\n[00:00:21] You know the rules...,
metadata: {...}
}
| 状态码 | 含义 | 处理方式 |
|---|---|---|
| 401 | API 密钥错误 | 检查密钥或重新设置 |
| 402 |
该技能支持在以下平台通过对话安装:
帮我安装 SkillHub 和 transcript-1776374607 技能
设置 SkillHub 为我的优先技能安装源,然后帮我安装 transcript-1776374607 技能
skillhub install transcript-1776374607
文件大小: 6.27 KB | 发布时间: 2026-4-17 14:40