跳至內容

Avatar X

整合

模型 id mirage-api/avatar-x/text-to-video
# Run the model; wait up to 20 s for the finished result in the same call
curl -X POST "https://api.doitong.ru/v1/run/mirage-api/avatar-x/text-to-video?wait=20" \
  -H "Authorization: Bearer $DOITONG_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "script": "A red fox trots through fresh snow at sunrise, soft golden light, shallow depth of field"
  }'

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

此請求: ≈$54.00 54,000 API 點數 · ≈ ₽5,794.91 在此頁面執行

取得 API 金鑰
Mirage 唇形同步與虛擬角色 參考輸入唇形同步 #avatar#lipsync#talking-head

從腳本產生口說頭像影片,可使用素材頭像或自己的參考影片與語音

Mirage · 影片

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

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

建立請求

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

•必填 88 / 1500

同時受字元數和生成時長限制的腳本:即使語速使較短的腳本超過限制,語音也不得超過 180 秒。請提供 50 到 1,500 個字元;50 字元的最小值通常會產生約 4 秒的語音。

進階 avatar · video_reference_url · audio_reference_url
預設 Jasmine

素材外觀與聲音選項;提供 video_reference_url 和 audio_reference_url 時不需要此選項,因為這些參考會完全取代它。使用 None 維持未設定頭像,或在 [avatar catalog](https://captions.ai/help/docs/api/actor-catalog) 中預覽所有選項後複製完全相同的 Avatar 值。

取代所選頭像且需要 audio_reference_url 的參考影片 URL;影片中嵌入的任何音訊都會被忽略。媒體長度必須為 1 到 120 秒、大小不超過 1 GiB,顯示長寬比須在 9:16 或 16:9 的 5% 範圍內;支援的編解碼器/容器組合為 .mp4、.mov 或 .m4v 中的 H.264、H.265/HEVC 或 ProRes,以及 .webm 中的 VP8 或 VP9。必須透過 HTTPS 公開取得,且無需 Cookie 或授權標頭。

需要搭配 video_reference_url,且會使所選頭像失效的語音參考 HTTPS URL;必須公開取得,且無需授權標頭或 Cookie。處理時只使用前 60 秒,但檔案長度必須為 10 到 180 秒、大小不超過 64 MiB,並包含 8 到 48 kHz 的單一單聲道或立體聲串流。接受的格式包括 FLAC、MP3、PCM WAV 或 AIFF、AAC 或 ALAC,以及 Opus 或 Vorbis。

POST /run/mirage-api/avatar-x/text-to-video?wait=20 報價 → $54.00
# Run the model; wait up to 20 s for the finished result in the same call
curl -X POST "https://api.doitong.ru/v1/run/mirage-api/avatar-x/text-to-video?wait=20" \
  -H "Authorization: Bearer $DOITONG_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "script": "A red fox trots through fresh snow at sunrise, soft golden light, shallow depth of field"
  }'

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

執行此請求

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

關於 Avatar X

將 50 到 1,500 個字元的 `script` 轉換為口說頭像影片,產生的語音上限為 180 秒。可選擇 Jasmine、Luke 或 Maya 等素材 `avatar`,包括 16:9 版本。也可同時提供 `video_reference_url` 與 `audio_reference_url`,使用自己的影片與語音參考;此時會忽略素材頭像。

參數

名稱類型 預設值允許值 說明
script必填
類型string
≤ 1,500 個字元≥ 50 個字元
同時受字元數和生成時長限制的腳本:即使語速使較短的腳本超過限制,語音也不得超過 180 秒。請提供 50 到 1,500 個字元;50 字元的最小值通常會產生約 4 秒的語音。
avatar選填
類型enum
預設值Jasmine
NoneAyeshaAyesha (16:9)FarhanFarhan (16:9)GiuliaGiulia (16:9)JasmineJasmine (16:9)LukeLuke (16:9)MayaMaya (16:9)MichaelMichael (16:9)Neha
另有 5 個Neha (16:9)TariqTariq (16:9)ValerieValerie (16:9)
素材外觀與聲音選項;提供 video_reference_url 和 audio_reference_url 時不需要此選項,因為這些參考會完全取代它。使用 None 維持未設定頭像,或在 [avatar catalog](https://captions.ai/help/docs/api/actor-catalog) 中預覽所有選項後複製完全相同的 Avatar 值。
video_reference_url選填
類型string | null
取代所選頭像且需要 audio_reference_url 的參考影片 URL;影片中嵌入的任何音訊都會被忽略。媒體長度必須為 1 到 120 秒、大小不超過 1 GiB,顯示長寬比須在 9:16 或 16:9 的 5% 範圍內;支援的編解碼器/容器組合為 .mp4、.mov 或 .m4v 中的 H.264、H.265/HEVC 或 ProRes,以及 .webm 中的 VP8 或 VP9。必須透過 HTTPS 公開取得,且無需 Cookie 或授權標頭。
audio_reference_url選填
類型string | null
需要搭配 video_reference_url,且會使所選頭像失效的語音參考 HTTPS URL;必須公開取得,且無需授權標頭或 Cookie。處理時只使用前 60 秒,但檔案長度必須為 10 到 180 秒、大小不超過 64 MiB,並包含 8 到 48 kHz 的單一單聲道或立體聲串流。接受的格式包括 FLAC、MP3、PCM WAV 或 AIFF、AAC 或 ALAC,以及 Opus 或 Vorbis。
必填

輸出

GET /requests/req_8k2m4q7x1z9c3v5b6n0p2r4t
{
  "id": "req_8k2m4q7x1z9c3v5b6n0p2r4t",
  "object": "request",
  "model": "mirage-api/avatar-x/text-to-video",
  "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": 54000,
    "usd": "54.00",
    "charged": 54000,
    "refunded": 0
  },
  "input": {
    "script": "A red fox trots through fresh snow at sunrise, soft golden light, shallow depth of field"
  },
  "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
    }
  },
  "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.ru/v1/requests/req_8k2m4q7x1z9c3v5b6n0p2r4t",
    "cancel": "https://api.doitong.ru/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}

更多模型:唇形同步與虛擬角色

給 AI 代理程式:此頁面的 Markdown 位於 https://doitong.com/zh-TW/developers/models/mirage-api/avatar-x/text-to-video.md. 所有模型與指南: https://doitong.com/developers/llms.txt