跳至內容

RIFE

整合

模型 id rife
# 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/rife?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",
    "end_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.ru/v1/requests/REQUEST_ID?wait=20" \
  -H "Authorization: Bearer $DOITONG_API_KEY"

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

取得 API 金鑰
Open model 圖像轉影片 #interpolation

在起始與結束影像之間插幀,以影像或影片回傳中間影格

Open model · 影片

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

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

建立請求

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

•必填 start_image_url
拖放檔案,或

插值的初始圖像,即成對圖像中的第一張,透過 URL 提供。

•必填 end_image_url
拖放檔案,或

插值的最終圖像,即成對圖像中的第二張,透過 URL 提供。

進階 output_type · output_format · num_frames · fps · include_start · include_end
output_type 預設 images

影片與個別圖像之間的輸出選擇。

output_format 預設 jpeg

僅在 output_type 為 'images' 時使用的圖像格式選擇。

預設 1

在提供的圖像之間生成的中間影格數量。

預設 8

影片影格率設定,以每秒影格數計算,僅在 output_type 為 'video' 時使用。

POST /run/rife?wait=20 報價 → $4.68
# 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/rife?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",
    "end_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.ru/v1/requests/REQUEST_ID?wait=20" \
  -H "Authorization: Bearer $DOITONG_API_KEY"

執行此請求

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

關於 RIFE

在 `start_image_url` 與 `end_image_url` 之間生成中間影格。將 `num_frames` 設定為 1 至 64,以指定要生成的影格數,並將 `output_type` 選為圖像或影片。影片輸出的 `fps` 為 1 至 60;圖像輸出可為 png 或 jpeg。可選擇將開始與結束圖像包含在結果中。

參數

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

名稱類型 預設值允許值 說明
start_image_url必填 image
類型url · image
插值的初始圖像,即成對圖像中的第一張,透過 URL 提供。
end_image_url必填 end_image
類型url · image
插值的最終圖像,即成對圖像中的第二張,透過 URL 提供。
output_type選填
類型enum
預設值images
imagesvideo
影片與個別圖像之間的輸出選擇。
output_format選填
類型enum
預設值jpeg
pngjpeg
僅在 output_type 為 'images' 時使用的圖像格式選擇。
num_frames選填
類型integer
預設值1
1 – 64
在提供的圖像之間生成的中間影格數量。
include_start選填
類型boolean
預設值false
控制輸出是否包含起始圖像。
include_end選填
類型boolean
預設值false
控制輸出是否包含結束圖像。
fps選填
類型integer
預設值8
1 – 60
影片影格率設定,以每秒影格數計算,僅在 output_type 為 'video' 時使用。
必填 標準名稱,也可使用

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

輸出

GET /requests/req_8k2m4q7x1z9c3v5b6n0p2r4t
{
  "id": "req_8k2m4q7x1z9c3v5b6n0p2r4t",
  "object": "request",
  "model": "rife",
  "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": 4680,
    "usd": "4.68",
    "charged": 4680,
    "refunded": 0
  },
  "input": {
    "start_image_url": "https://content.doitong.com/images/showcase/v3/gen_fox_cartoon.jpg",
    "end_image_url": "https://content.doitong.com/images/showcase/v3/gen_fox_cartoon.jpg"
  },
  "output": {
    "images": [
      {
        "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,
        "width": 1024,
        "height": 768
      }
    ],
    "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 是模型自己的結果物件。
輸出欄位
images
array of object {url, content_type, file_name, file_size, width, height}包含生成影格的個別圖像。
video
object {url, content_type, file_name, file_size} | null生成的影片檔案,當 output_type 設為 'video' 時傳回。

更多模型:圖像轉影片

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