开发者文档以英文发布,侧边栏导航跟随你选择的语言。
指南与教程
每一条接入路径的分步配置。
Quick Start
三步拿到第一条字幕:
- 注册 subdownload.com/account,获得 1,000 免费积分。
- 复制 API Key(以
sk_live_开头)。 - 调用 API,把 Key 放进
Authorization头。
curl -H "Authorization: Bearer sk_live_xxx" \
"https://api.subdownload.com/v1/youtube/transcript?video_id=dQw4w9WgXcQ"
import requests
API_KEY = "sk_live_xxx"
BASE = "https://api.subdownload.com/v1"
r = requests.get(
f"{BASE}/youtube/transcript",
params={"video_id": "dQw4w9WgXcQ"},
headers={"Authorization": f"Bearer {API_KEY}"},
)
r.raise_for_status()
data = r.json()
print(data["data"]["text"][:200])
const API_KEY = "sk_live_xxx";
const res = await fetch(
"https://api.subdownload.com/v1/youtube/transcript?video_id=dQw4w9WgXcQ",
{ headers: { Authorization: "Bearer " + API_KEY } }
);
if (!res.ok) throw new Error("HTTP " + res.status);
const data = await res.json();
console.log(data.data.text.slice(0, 200));
// 不要把 API Key 硬编码进客户端代码。
// 让你的后端做代理转发。
const res = await fetch("/api/my-proxy/transcript?video_id=dQw4w9WgXcQ");
const data = await res.json();
console.log(data);
鉴权
所有 API 请求都需要在 Authorization 头里带 Bearer token:
Authorization: Bearer sk_live_xxxxx
- • API Key 以
sk_live_开头。 - • Key 永不过期,除非手动撤销或重新生成。
- • 把 Key 存在环境变量里,不要写进前端代码或公开仓库。
- • 在 subdownload.com/account 管理 Key。
验证 Key 是否可用:GET /v1/verify(免费,不扣积分)。
Claude(Desktop / Code)接入
Claude 支持 OAuth + 动态客户端注册(DCR)—— 不需要预先创建凭证。
{
"mcpServers": {
"subdownload": {
"url": "https://api.subdownload.com/mcp"
}
}
}
Claude 会打开浏览器完成授权,Token 自动刷新。
或者用静态 API Key(跳过 OAuth):
{
"mcpServers": {
"subdownload": {
"url": "https://api.subdownload.com/mcp",
"headers": { "Authorization": "Bearer sk_live_xxx" }
}
}
}
ChatGPT(GPT Actions / Custom Connectors)
ChatGPT 使用 静态 OAuth 客户端。步骤:
- 进入 你的账户 → MCP / OAuth 标签页。
- 复制
Client ID和Client Secret。 - 在 ChatGPT 里添加新的 Connector / Action:
- MCP URL:
https://api.subdownload.com/mcp - 认证:OAuth,填你的 Client ID 和 Secret
- MCP URL:
OpenAI Agent Builder
直接把 API Key 贴进鉴权栏(Bearer token),服务器地址填 https://api.subdownload.com/mcp。