ABM ALL-IN-ONE EXTRACT API

API 使用说明

一个请求提取文案、字幕、SRT 与去水印下载链接。所有提取接口都需要 API Key。

返回测试台

请求地址与鉴权

提取接口为 POST https://xpro.work/abmapi/v1/extract。请求头必须包含 API Key,测试台填写的也是同一把 Key。

Authorization: Bearer YOUR_API_KEY
Content-Type: application/json

单条全能提取

同步模式默认开启文案、字幕和去水印;也可显式传入参数。

curl --request POST 'https://xpro.work/abmapi/v1/extract' \
  --header 'Authorization: Bearer YOUR_API_KEY' \
  --header 'Content-Type: application/json' \
  --data '{
    "link": "https://www.douyin.com/video/VIDEO_ID",
    "rm": 1,
    "subtitle": 1
  }'

批量提取与间隔

links 可传 1–100 条链接或口令,也可传按换行分隔的字符串。多条输入默认每 3 秒向上游提交一条。

curl --request POST 'https://xpro.work/abmapi/v1/extract' \
  --header 'Authorization: Bearer YOUR_API_KEY' \
  --header 'Content-Type: application/json' \
  --data '{
    "links": [
      "https://www.douyin.com/video/FIRST_VIDEO_ID",
      "平台分享口令也可以放在这里"
    ],
    "rm": 1,
    "subtitle": 1,
    "intervalSeconds": 3
  }'

intervalSeconds(兼容别名 interval)范围为 0–60 秒。

异步纯文案任务

异步模式必须关闭去水印和字幕。单条返回 batchId,多条还会返回 batchIds

curl --request POST 'https://xpro.work/abmapi/v1/extract' \
  --header 'Authorization: Bearer YOUR_API_KEY' \
  --header 'Content-Type: application/json' \
  --data '{
    "links": ["https://www.douyin.com/video/VIDEO_ID"],
    "rm": 0,
    "subtitle": 0,
    "wait": false
  }'

curl 'https://xpro.work/abmapi/v1/extractions/BATCH_ID?includeDownloadLinks=true' \
  --header 'Authorization: Bearer YOUR_API_KEY'

成功响应

content 是文案,downloadLinks.video 是去水印视频;subtitles 包含分段字幕、纯文本、SRT 和字幕成片链接。

{
  "completed": true,
  "rm": true,
  "subtitle": true,
  "intervalSeconds": 0,
  "total": 1,
  "succeeded": 1,
  "failed": 0,
  "results": [
    {
      "id": 28469384,
      "index": 0,
      "link": "https://www.douyin.com/video/VIDEO_ID",
      "content": "提取出的完整文案",
      "status": "success",
      "platform": "douyin",
      "title": "视频标题",
      "downloadLinks": {
        "video": "https://cdn.example/no-watermark.mp4",
        "cover": "https://cdn.example/cover.jpg"
      },
      "subtitles": {
        "status": "success",
        "text": "第一句字幕",
        "srt": "1\n00:00:01,200 --> 00:00:02,500\n第一句字幕",
        "segments": [
          { "startTime": "0:00:01.20", "endTime": "0:00:02.50", "text": "第一句字幕" }
        ],
        "videoUrl": "https://cdn.example/captioned.mp4"
      }
    }
  ]
}

某个附加能力失败时,主请求仍返回已成功的内容,并在对应的 watermarksubtitles 中返回错误状态、错误码和说明。

参数与限制

  • rm:1 开启、0 关闭去水印;同步模式默认开启。
  • subtitle / includeSubtitles:控制字幕识别;同步模式默认开启。
  • intervalSeconds / interval:0–60 秒,多条输入默认 3 秒。
  • timeoutMs:单项上游任务等待上限,范围为 5000 到服务端配置值。
  • wait:默认 true;false 仅支持异步纯文案。
  • includeDownloadLinks:旧版兼容参数;新调用建议使用 rm
  • 去水印、字幕与字幕成片会使用轻抖账号相应权益;直链可能过期,应及时使用。
  • 401 表示 API Key 错误;400 表示参数错误;502/504 表示上游失败或超时。