跳至內容

Live Portrait · Image

整合

模型 id live-portrait/image
# 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/live-portrait/image?wait=20" \
  -H "Authorization: Bearer $DOITONG_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "image": "https://content.doitong.com/images/showcase/v3/gen_fox_cartoon.jpg"
  }'

# 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"

每次執行最多 $1.125 依實際用量收費,其餘金額會退款 在此頁面執行

取得 API 金鑰
Kuaishou 圖像編輯 #expression#animation

使用滑桿編輯單張肖像的表情與頭部姿勢,輸出靜態影像

Kuaishou · 圖像

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

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

建立請求

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

•必填 image_url
拖放檔案,或

用於動畫的圖像 URL。

進階 output_format · blink · eyebrow · wink · pupil_x · pupil_y · aaa · eee · woo · smile · rotate_pitch · rotate_yaw · rotate_roll · dsize · scale · vx_ratio · vy_ratio · flag_pasteback · flag_do_crop · flag_do_rot · flag_lip_zero · enable_safety_checker
output_format 預設 jpeg

輸出使用的格式。

預設 0
預設 0

眉毛抬起或降低的程度。

預設 0

眨單眼的程度。

預設 0

瞳孔水平移動量。

預設 0

瞳孔垂直移動量。

預設 0

嘴巴張成 'aaa' 形狀的程度。

預設 0

嘴巴塑形成 'eee' 位置的程度。

預設 0

嘴巴塑形成 'woo' 位置的程度。

預設 0

微笑程度。

預設 0

臉部沿俯仰軸的旋轉量。

預設 0

臉部沿偏航軸的旋轉量。

預設 0

臉部沿滾轉軸的旋轉量。

預設 512

結果圖像的尺寸。

預設 2.3

套用至臉部裁切圖的縮放倍數。

預設 0

控制臉部裁切水平偏移的比例。

預設 -0.125

臉部裁切垂直定位比例:正負號決定方向,正值向上、負值向下。

POST /run/live-portrait/image?wait=20 報價 → $1.125
# 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/live-portrait/image?wait=20" \
  -H "Authorization: Bearer $DOITONG_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "image": "https://content.doitong.com/images/showcase/v3/gen_fox_cartoon.jpg"
  }'

# 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 金鑰

關於 Live Portrait · Image

不需要驅動影片,即可調整單張肖像照片中的臉部。滑桿涵蓋眨眼、眉毛、眨單眼、瞳孔位置、嘴型(aaa、eee、woo)、微笑和頭部旋轉(pitch、yaw、roll)。`flag_do_crop` 和 `scale` 等裁切選項,以及 `dsize`(預設 512),控制臉部裁切。預設輸出為 jpeg,也可輸出 png。

參數

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

名稱類型 預設值允許值 說明
image_url必填 image
類型url · image
用於動畫的圖像 URL。
eyebrow選填
類型number
預設值0
-30 – 30
眉毛抬起或降低的程度。
wink選填
類型number
預設值0
0 – 25
眨單眼的程度。
pupil_x選填
類型number
預設值0
-45 – 45
瞳孔水平移動量。
pupil_y選填
類型number
預設值0
-45 – 45
瞳孔垂直移動量。
aaa選填
類型number
預設值0
-200 – 200
嘴巴張成 'aaa' 形狀的程度。
eee選填
類型number
預設值0
-40 – 40
嘴巴塑形成 'eee' 位置的程度。
woo選填
類型number
預設值0
-100 – 100
嘴巴塑形成 'woo' 位置的程度。
smile選填
類型number
預設值0
-2 – 2
微笑程度。
rotate_pitch選填
類型number
預設值0
-45 – 45
臉部沿俯仰軸的旋轉量。
rotate_yaw選填
類型number
預設值0
-45 – 45
臉部沿偏航軸的旋轉量。
rotate_roll選填
類型number
預設值0
-45 – 45
臉部沿滾轉軸的旋轉量。
flag_pasteback選填
類型boolean
預設值true
貼回/拼接選項,將動畫臉部裁切圖放回原始圖像,並將其從臉部裁切座標轉換出去。
flag_do_crop選填
類型boolean
預設值true
控制是否將來源肖像裁切至臉部裁切座標空間。
flag_do_rot選填
類型boolean
預設值true
控制 flag_do_crop 為 true 時是否執行旋轉。
flag_lip_zero選填
類型boolean
預設值true
動畫前閉唇;僅在 flag_eye_retargeting 和 flag_lip_retargeting 都設為 False 時適用。
dsize選填
類型integer
預設值512
結果圖像的尺寸。
scale選填
類型number
預設值2.3
套用至臉部裁切圖的縮放倍數。
vx_ratio選填
類型number
預設值0
控制臉部裁切水平偏移的比例。
vy_ratio選填
類型number
預設值-0.125
臉部裁切垂直定位比例:正負號決定方向,正值向上、負值向下。
enable_safety_checker選填
類型boolean
預設值false
控制是否啟用安全檢查。啟用時,檢查器會在模型處理前分析輸入圖像,確認其中是否包含臉部。
output_format選填
類型enum
預設值jpeg
jpegpng
輸出使用的格式。
必填 標準名稱,也可使用

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

輸出

GET /requests/req_8k2m4q7x1z9c3v5b6n0p2r4t
{
  "id": "req_8k2m4q7x1z9c3v5b6n0p2r4t",
  "object": "request",
  "model": "live-portrait/image",
  "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": 1125,
    "usd": "1.125",
    "charged": 1125,
    "refunded": 0
  },
  "input": {
    "image_url": "https://content.doitong.com/images/showcase/v3/gen_fox_cartoon.jpg"
  },
  "output": {
    "image": {
      "url": "https://content.doitong.com/dev-api/2026/10/20/req_8k2m4q7x1z9c3v5b6n0p2r4t/0-output.jpeg",
      "content_type": "image/jpeg",
      "file_name": "0-output.jpeg",
      "file_size": 1843200,
      "width": 1024,
      "height": 768
    }
  },
  "outputs": [
    {
      "type": "image",
      "url": "https://content.doitong.com/dev-api/2026/10/20/req_8k2m4q7x1z9c3v5b6n0p2r4t/0-output.jpeg",
      "content_type": "image/jpeg",
      "file_size": 1843200,
      "width": 1024,
      "height": 768,
      "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 是模型自己的結果物件。
輸出欄位
image
object {url, content_type, file_name, file_size, width, height}生成產生的圖像檔案。

更多模型:圖像編輯

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