集成文档
快速接入指南
OpenClaw Skill 一键安装,或使用 dytext-cli 直接提取抖音视频文案/字幕
认证方式
Authentication
所有方式都需要 API Key。最快方式:npx dytext-cli setup 自动注册或登录获取。
export DY_CAPTION_API_KEY="dy_your_api_key"在控制台中获取您的 API Key:dytext.cn/dashboard
OpenClaw Skill(推荐)
一行命令安装,AI Agent 自然语言调用
通过自然语言指令直接调用,无需编写代码。安装后首次使用会自动引导注册。
安装命令
clawhub install douyin-to-text
手动安装(备选)
cd ~/.openclaw/workspace git clone https://github.com/xwchris/douyin-to-text.git skills/douyin-to-text
使用示例
-
提取这个抖音链接的文案:https://v.douyin.com/xxxxx/-
把这段抖音分享内容转成文字,语言用 zh-CN-
查看我的 douyin-to-text 余额使用流程
- 1安装 Skill:
clawhub install douyin-to-text - 2对 AI 说「帮我提取抖音文案」- 首次使用自动引导注册,注册即获免费时长
- 3后续直接发送抖音链接或分享文案即可,无需再次配置
CLI 工具
跨平台 CLI,npx 一键使用
独立的命令行工具,适用于非 OpenClaw 场景。支持 macOS、Linux、Windows,需 Node.js >= 18。
首次使用
# 注册账号或登录,并自动保存 API Key npx dytext-cli setup
使用
# 提取文案(支持抖音分享链接或包含链接的整段文案) npx dytext-cli transcribe "https://v.douyin.com/xxxxx/" # 指定语言 npx dytext-cli transcribe "6.44 复制打开抖音,看看【xxx】 https://v.douyin.com/xxxxx/" zh-CN # 查询任务状态 npx dytext-cli status <taskId> # 查询余额 npx dytext-cli balance # 查看历史 npx dytext-cli history
REST API 接口
如果您需要直接调用 REST API,以下是可用的端点
提交转写任务
Create Transcription Task
https://api.dytext.cn/api/v1/transcribe请求参数
{
"input": "https://v.douyin.com/xxxxx/",
"language": "zh-CN" // 可选,默认 zh-CN
}响应示例
{
"success": true,
"taskId": "uuid",
"status": "processing",
"estimatedCost": 1.2
}cURL 示例
curl -X POST https://api.dytext.cn/api/v1/transcribe \
-H "X-API-Key: dy_your_api_key" \
-H "Content-Type: application/json" \
-d '{"input": "https://v.douyin.com/xxxxx/", "language": "zh-CN"}'查询任务状态
Get Transcription Result
https://api.dytext.cn/api/v1/transcribe/:taskId响应示例
{
"taskId": "uuid",
"status": "completed",
"resultText": "大家好,欢迎来到我的频道...",
"author": "作者昵称",
"videoDesc": "视频原始文案",
"duration": 1.2,
"creditCost": 1.2,
"errorMessage": null
}查询余额与历史
Credits And History
GET
https://api.dytext.cn/api/v1/creditsGET
https://api.dytext.cn/api/v1/history余额响应示例
{
"balance": 10,
"reservedBalance": 0,
"availableBalance": 10,
"totalPurchased": 0,
"totalUsed": 0
}支持语言
Supported Languages
zh-CN
en-US
ja-JP
ko-KR
错误码
Error Codes
| 状态码 | 说明 |
|---|---|
401 | API Key 无效或未提供 |
402 | 余额不足 |
400 | 请求参数错误 |
404 | 任务或视频不存在 |
429 | 请求过于频繁 |
500 | 服务器错误 |