跳至內容

Workflow Utilities Auto Subtitle

整合

模型 id workflow-utilities/auto-subtitle
# Run the model; wait up to 20 s for the finished result in the same call
curl -X POST "https://api.doitong.com/v1/run/workflow-utilities/auto-subtitle?wait=20" \
  -H "Authorization: Bearer $DOITONG_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "video": "https://content.doitong.com/video/showcase/v3/gen_fox_cartoon.mp4"
  }'

# Still "queued" or "running"? Poll with the id from the response:
curl "https://api.doitong.com/v1/requests/REQUEST_ID?wait=20" \
  -H "Authorization: Bearer $DOITONG_API_KEY"

像範例一樣的檔案: $0.005 5 API 點數 您的檔案會在執行前計量 在此頁面執行

取得 API 金鑰
Utility · 影片

您的第一個結果會顯示在這裡

在下方建立請求,並使用您的 API 金鑰執行。輸出會複製到我們的儲存空間,可永久保留或免費保留 7 天。

建立請求

控制項是根據模型結構描述生成的。變更設定時,程式碼和價格會同步更新。

•必填 video_url
拖放檔案,或

用於自動添加字幕的影片 URL。

進階 font_weight · position · language · font_name · font_color · highlight_color · stroke_color · background_color · font_size · stroke_width · background_opacity · y_offset · words_per_subtitle · enable_animation
font_weight 預設 bold

文字粗細;典型的 TikTok 風格使用 bold 或 black。

position 預設 bottom

字幕在垂直軸上的位置。

預設 en

轉錄語言識別碼,例如 'en'、'es'、'fr'、'de'、'it'、'pt'、'nl'、'ja'、'zh' 或 'ko'。也接受 3 個字母的 ISO 識別碼,如 'eng'、'spa' 或 'fra'。

預設 Montserrat

從 fonts.google.com 選擇的字體名稱;接受任何 Google 字體,包括 'Montserrat'、'Poppins' 和 'BBH Sans Hegarty'。

預設 white

非當前播放字幕單詞的顏色。

預設 purple

套用於正在說出的單詞的卡拉 OK 風格高亮顏色。

預設 black

套用於文字輪廓或描邊的顏色。

預設 none

文字背後的背景顏色;'none' 和 'transparent' 都會停用背景。

預設 100

字幕字體大小;TikTok 風格使用較大的文字。

預設 3

文字輪廓或描邊的寬度(像素);0 表示停用。

預設 0

背景不透明度,0.0 表示完全透明,1.0 表示完全不透明。

預設 75

垂直位移(像素);正值向下移動,負值向上移動。

預設 3

字幕單詞數量上限,設定為 1 可顯示單個單詞,2–3 可顯示短語,8–12 則可顯示完整句子。

POST /run/workflow-utilities/auto-subtitle?wait=20 報價 → $0.005
# Run the model; wait up to 20 s for the finished result in the same call
curl -X POST "https://api.doitong.com/v1/run/workflow-utilities/auto-subtitle?wait=20" \
  -H "Authorization: Bearer $DOITONG_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "video": "https://content.doitong.com/video/showcase/v3/gen_fox_cartoon.mp4"
  }'

# Still "queued" or "running"? Poll with the id from the response:
curl "https://api.doitong.com/v1/requests/REQUEST_ID?wait=20" \
  -H "Authorization: Bearer $DOITONG_API_KEY"

執行此請求

您的金鑰會保留在此瀏覽器中:只會傳送至 Doitong API,且只有在勾選「記住」時才會儲存至 localStorage。 取得 API 金鑰

關於 Workflow Utilities Auto Subtitle

轉錄影片中的語音,並燒錄字幕,同時高亮目前說出的單字。樣式選項包括任意 Google Font 名稱、大小 20-150、粗細、文字與高亮色彩、描邊、背景色與不透明度,以及頂部、中央或底部位置和垂直偏移。`words_per_subtitle` 範圍為 1 到 12,並可開關彈跳動畫。另會傳回轉錄文字與單字時間軸。

參數

請傳送標準名稱或原生名稱其中之一,不要同時傳送兩者。 標準名稱

名稱類型 預設值允許值 說明
video_url必填 video
類型url · video
用於自動添加字幕的影片 URL。
language選填
類型string
預設值en
轉錄語言識別碼,例如 'en'、'es'、'fr'、'de'、'it'、'pt'、'nl'、'ja'、'zh' 或 'ko'。也接受 3 個字母的 ISO 識別碼,如 'eng'、'spa' 或 'fra'。
font_name選填
類型string
預設值Montserrat
從 fonts.google.com 選擇的字體名稱;接受任何 Google 字體,包括 'Montserrat'、'Poppins' 和 'BBH Sans Hegarty'。
font_size選填
類型integer
預設值100
20 – 150
字幕字體大小;TikTok 風格使用較大的文字。
font_weight選填
類型enum
預設值bold
normalboldblack
文字粗細;典型的 TikTok 風格使用 bold 或 black。
font_color選填
類型enum
預設值white
whiteblackredgreenblueyelloworangepurplepinkbrowngraycyanmagenta
非當前播放字幕單詞的顏色。
highlight_color選填
類型enum
預設值purple
whiteblackredgreenblueyelloworangepurplepinkbrowngraycyanmagenta
套用於正在說出的單詞的卡拉 OK 風格高亮顏色。
stroke_width選填
類型integer
預設值3
0 – 10
文字輪廓或描邊的寬度(像素);0 表示停用。
stroke_color選填
類型enum
預設值black
blackwhiteredgreenblueyelloworangepurplepinkbrowngraycyanmagenta
套用於文字輪廓或描邊的顏色。
background_color選填
類型enum
預設值none
blackwhiteredgreenblueyelloworangepurplepinkbrowngraycyanmagentanonetransparent
文字背後的背景顏色;'none' 和 'transparent' 都會停用背景。
background_opacity選填
類型number
預設值0
0 – 1
背景不透明度,0.0 表示完全透明,1.0 表示完全不透明。
position選填
類型enum
預設值bottom
topcenterbottom
字幕在垂直軸上的位置。
y_offset選填
類型integer
預設值75
-200 – 200
垂直位移(像素);正值向下移動,負值向上移動。
words_per_subtitle選填
類型integer
預設值3
1 – 12
字幕單詞數量上限,設定為 1 可顯示單個單詞,2–3 可顯示短語,8–12 則可顯示完整句子。
enable_animation選填
類型boolean
預設值true
啟用帶有彈跳入場效果的字幕動畫。
必填 標準名稱,也可使用

檔案參數接受公開的 https:// URL、最大 10 MB 的 data: URI,或上傳檔案的 file_url。 檔案

輸出

GET /requests/req_8k2m4q7x1z9c3v5b6n0p2r4t
{
  "id": "req_8k2m4q7x1z9c3v5b6n0p2r4t",
  "object": "request",
  "model": "workflow-utilities/auto-subtitle",
  "status": "succeeded",
  "created_at": "2026-10-20T12:00:00Z",
  "started_at": "2026-10-20T12:00:02Z",
  "completed_at": "2026-10-20T12:00:09Z",
  "queue_position": null,
  "cost": {
    "credits": 5,
    "usd": "0.005",
    "charged": 5,
    "refunded": 0
  },
  "input": {
    "video_url": "https://content.doitong.com/video/showcase/v3/gen_fox_cartoon.mp4"
  },
  "output": {
    "video": {
      "url": "https://content.doitong.com/dev-api/2026/10/20/req_8k2m4q7x1z9c3v5b6n0p2r4t/0-output.mp4",
      "content_type": "video/mp4",
      "file_name": "0-output.mp4",
      "file_size": 1843200
    },
    "transcription": "string",
    "subtitle_count": 1,
    "words": [
      {}
    ],
    "transcription_metadata": {}
  },
  "outputs": [
    {
      "type": "video",
      "url": "https://content.doitong.com/dev-api/2026/10/20/req_8k2m4q7x1z9c3v5b6n0p2r4t/0-output.mp4",
      "content_type": "video/mp4",
      "file_size": 1843200,
      "width": 1280,
      "height": 720,
      "duration": 5,
      "stored": true
    }
  ],
  "error": null,
  "metrics": {
    "inference_seconds": 6.8
  },
  "urls": {
    "self": "https://api.doitong.com/v1/requests/req_8k2m4q7x1z9c3v5b6n0p2r4t",
    "cancel": "https://api.doitong.com/v1/requests/req_8k2m4q7x1z9c3v5b6n0p2r4t/cancel"
  }
}
您的檔案,由您選擇每個 outputs[].url 都是儲存空間中的副本:可永久保留(按 GB-月計費),或免費保留 7 天;可透過帳戶設定或 ?storage= 設定。
所有模型使用相同結構圖片、影片和音訊皆包含 type、url、content_type、width、height 和 duration。output 是模型自己的結果物件。
輸出欄位
video
object {url, content_type, file_name, file_size}包含自動生成字幕的影片。
transcription
string轉錄的完整文字。
subtitle_count
integer生成的字幕段落數量。
words
array of object | null由轉錄服務提供的個別單詞時間數據。
transcription_metadata
object | null由 ElevenLabs 提供的轉錄額外中繼資料,包括語言、段落和其他細節。

更多模型:影片轉影片

給 AI 代理程式:此頁面的 Markdown 位於 https://doitong.com/zh-TW/developers/models/workflow-utilities/auto-subtitle.md. 所有模型與指南: https://doitong.com/developers/llms.txt