すべてのプロダクト
Search
ドキュメントセンター

Alibaba Cloud Model Studio:動画生成モデルのファインチューニング API リファレンス

最終更新日:May 28, 2026

Model Studio API を使用して Wan image-to-video モデルをファインチューニングします。本リファレンスでは、データセットのアップロードからモデルデプロイまで、ファインチューニングワークフローの各 API オペレーションについて説明します。

ワークフローの概要

一般的なファインチューニングのワークフローは、次の手順で行います。

  1. データセットのアップロード:トレーニングデータ (.zip) をアップロードし、ファイル ID を取得します。

  2. ファインチューニングジョブの作成:ベースモデルとアップロードしたデータセットを使用して、トレーニングを開始します。

  3. ジョブステータスの照会:トレーニングが完了するまで (数時間) ポーリングします。

  4. モデルのデプロイ:ファインチューニング済みのモデルを API サービスとして公開します。

  5. デプロイメントステータスの照会:デプロイメントが完了するまで (5~10 分) ポーリングします。

  6. 動画の生成:デプロイしたモデルを呼び出します。

オプションの操作:

  • チェックポイントの管理:特定のトレーニングチェックポイントを一覧表示、プレビュー、およびエクスポートします。

  • ジョブの管理:ファインチューニングジョブを一覧表示、キャンセル、または削除します。

  • デプロイメントの削除:デプロイされたサービスを削除します。

始める前に

リージョン:国際デプロイメントモードでは、Singapore リージョンのみがサポートされています。このリージョンのAPI キーを使用してください。

API キー: API キーを作成し、環境変数として設定してください。

関連資料: ファインチューニングの概要を読み、サポートされているモデル、データフォーマット、ファインチューニングの手順、および課金について確認してください。

サンプルデータセット:

モード

トレーニングセット

検証データセット

画像から動画 (最初のフレーム)

ダウンロード

ダウンロード

画像から動画 (最初と最後のフレーム)

ダウンロード

ダウンロード

サポートされているベースモデル

モード

モデル ID

画像から動画 (最初のフレーム)

wan2.7-i2v, wan2.6-i2v, wan2.5-i2v-preview, wan2.2-i2v-flash

画像から動画 (最初と最後のフレーム)

wan2.2-kf2v-flash

データセットのアップロード

説明

API を使用する場合、ZIP パッケージのサイズは 1 GB 以下である必要があります。

.zip 形式のデータセットをアップロードし、ファイル ID を取得してファインチューニングジョブを作成します。

リクエスト

POST https://dashscope-intl.aliyuncs.com/compatible-mode/v1/files
Content-Type: multipart/form-data

パラメーター

場所

必須

説明

file

Body (form-data)

file

はい

ローカルの .zip データセット。file=@"<file_path>" として渡します。

@"./wan-i2v-training-dataset.zip"

purpose

Body (form-data)

文字列

はい

fine-tune に固定されます。

fine-tune

レスポンス

フィールド

説明

id

文字列

ファインチューニングジョブを作成するためのファイル ID。

file-ft-b2416bacc4d742xxxx

object

文字列

アップロードの型。

file

bytes

integer

ファイルサイズ (バイト単位)。

73310369

filename

文字列

ファイル名。

wan-i2v-training-dataset.zip

purpose

文字列

fine-tune に固定されます。

fine-tune

status

文字列

アップロードステータス。processed はアップロードが成功したことを意味します。

processed

created_at

integer

作成時刻 (UNIX タイムスタンプ)。

1766127125

リクエスト

curl --location --request POST 'https://dashscope-intl.aliyuncs.com/compatible-mode/v1/files' \
--header "Authorization: Bearer $DASHSCOPE_API_KEY" \
--form 'file=@"./wan-i2v-training-dataset.zip"' \
--form 'purpose="fine-tune"'

レスポンス

次のステップのために id の値をコピーしてください。

{
    "id": "file-ft-b2416bacc4d742xxxx",
    "object": "file",
    "bytes": 73310369,
    "filename": "wan-i2v-training-dataset.zip",
    "purpose": "fine-tune",
    "status": "processed",
    "created_at": 1766127125
}

次のステップ: ファイル ID を使用して ファインチューニングジョブを作成してください。

ファインチューニングジョブの作成

ベースモデルとアップロードされたデータセットを使用して、トレーニングを開始します。

リクエスト

POST https://dashscope-intl.aliyuncs.com/api/v1/fine-tunes
Content-Type: application/json

パラメーター

場所

必須

説明

model

Body

文字列

はい

ベースモデルの ID (「サポートされているベースモデル」をご参照ください)。

wan2.7-i2v

training_file_ids

Body

array[string]

はい

トレーニングセットのファイル ID。複数の ID を指定できます。

["file-ft-b2416bacc4d742xxxx"]

validation_file_ids

Body

array[string]

いいえ

検証セットのファイル ID (省略した場合、トレーニングセットが自動的に分割されます)。

-

training_type

Body

文字列

はい

ファインチューニングメソッド。efficient_sft (LoRA) のみがサポートされています。

efficient_sft

hyper_parameters

Body

オブジェクト

いいえ

ハイパーパラメーター設定。「ハイパーパラメーター」をご参照ください。

以下をご参照ください

ハイパーパラメーター

推奨値は、最初の実行に適しています。必要に応じて、n_epochs または learning_rate を調整してください。

クイックスタートの推奨事項

モデル

batch_size

n_epochs

learning_rate

max_pixels

eval_epochs

wan2.7-i2v

1

400

2e-5

147456

50

wan2.6-i2v

1

400

2e-5

36864

50

wan2.5-i2v-preview

2

400

2e-5

36864

50

wan2.2-i2v-flash

4

400

2e-5

262144

50

wan2.2-kf2v-flash

4

400

2e-5

262144

50

完全なパラメーターリファレンス

パラメーター

必須

説明

推奨

batch_size

整数

はい

バッチサイズ: トレーニングステップあたりのサンプル数。

  • wan2.7-i2v:推奨 1。

  • wan2.6-i2v:推奨 1。

  • wan2.5-i2v-preview:推奨 2。

  • wan2.2-i2v-flash:推奨 4。

  • wan2.2-kf2v-flash:推奨 4。

モデル固有

n_epochs

整数

はい

トレーニングエポック。総ステップ数 = n_epochs × ceil(dataset_size / batch_size) (最小 800 ステップが必要です)。5 つのサンプルで batch_size=2 の場合、エポックあたりのステップ数は ceil(5/2)=3 となり、最小 n_epochs = ceil(800/3) = 267 となります。

400

learning_rate

浮動小数点数

はい

重みの更新の大きさ (大きすぎるとモデルの性能が低下し、小さすぎると効果がほとんどありません)。

2e-5

eval_epochs

整数

はい

評価間のエポック数 (n_epochs / 10 以上である必要があります)。

50

max_pixels

整数

はい

最大トレーニング動画解像度: トレーニング動画のピクセル数制限 (幅 × 高さ) です。この値を超える動画のみが縮小され、その他は変更されません。

  • wan2.7-i2v:推奨 147456。範囲:36864 (192×192) ~ 147456 (384×384)

  • wan2.6-i2v:推奨 36864。範囲:16384 (128×128) ~ 36864 (192×192)

  • wan2.5-i2v-preview:推奨 36864。範囲:16384 (128×128) ~ 36864 (192×192)

  • wan2.2-i2v-flash:推奨 262144。範囲:65536 (256×256) ~ 262144 (512×512)

  • wan2.2-kf2v-flash:推奨 262144。範囲:65536 (256×256) ~ 262144 (512×512)

モデル固有

split

浮動小数点数

いいえ

トレーニング・検証の分割比率。 validation_file_ids が指定されていない場合にのみ有効になります。 0.9 は、トレーニングが 90%、検証が 10% であることを意味します。

0.9

max_split_val_dataset_sample

整数

いいえ

自動分割時の検証サンプルの最大数。 Validation size = min(total * (1 - split), max_split_val_dataset_sample)。 例えば、サンプル数が 100、split=0.9 で、この値が 5 に設定されている場合、計算される検証サンプル数は 10 となりますが、上限の 5 に制限されます。

5

save_total_limit

整数

いいえ

保持するチェックポイントの最大数。最後の N 個のチェックポイントのみが保持されます。

10

lora_rank

整数

いいえ

LoRA の低ランク行列の次元。値を大きくすると適合能力は向上しますが、トレーニングは遅くなります。2 のべき乗 (16、32、64) である必要があります。

32

lora_alpha

整数

いいえ

LoRA の重みスケーリング係数。ファインチューニングされたパラメーターがベースモデルの重みに与える影響を調整します。2 のべき乗 (16、32、64) である必要があります。

32

レスポンス

フィールド

説明

request_id

文字列

リクエスト ID。

0eb05b0c-02ba-414a-9d0c-xxxxxxxxx

output.job_id

文字列

ファインチューニングジョブの ID。ジョブステータスのクエリに必要です。

ft-202511111122-xxxx

output.job_name

文字列

ジョブ名。

ft-202511111122-xxxx

output.status

文字列

ジョブステータス。「ジョブステータス値」をご参照ください。

PENDING

output.finetuned_output

文字列

ファインチューニング済みモデル名。デプロイに必要です。

wan2.5-i2v-preview-ft-202511111122-xxxx

output.model

文字列

使用したベースモデル。

wan2.5-i2v-preview

output.base_model

文字列

使用したベースモデル。

wan2.5-i2v-preview

output.training_file_ids

配列

トレーニングセットのファイル ID。

["file-ft-b2416bacc4d742xxxx"]

output.validation_file_ids

配列

検証セットのファイル ID。アップロードされていない場合は空の配列になります。

[]

output.hyper_parameters

オブジェクト

このジョブに適用されたハイパーパラメーター。

{...}

output.training_type

文字列

efficient_sft に固定されます。

efficient_sft

output.create_time

文字列

ジョブ作成時刻。

2025-11-11 11:22:22

output.workspace_id

文字列

ワークスペース ID。「ワークスペース ID の取得」をご参照ください。

llm-xxxxxxxxx

output.user_identity

文字列

Alibaba Cloud アカウント ID。

12xxxxxxx

output.modifier

文字列

最終更新者のアカウント ID。

12xxxxxxx

output.creator

文字列

作成者のアカウント ID。

12xxxxxxx

output.group

文字列

ジョブグループ。

llm

output.max_output_cnt

整数

保存するチェックポイントの最大数。save_total_limit と同等です。

10

ジョブステータス値

ステータス

意味

PENDING

保留中。

QUEUING

キューイング中 (一度に 1 つのジョブ)。

RUNNING

進行中。

CANCELING

キャンセル中。

SUCCEEDED

完了。

FAILED

失敗。

CANCELED

キャンセル済み。

<training-dataset-file-id> を、「データセットのアップロード」のレスポンスで取得したファイル ID に置き換えてください。

wan2.7-i2v

curl --location 'https://dashscope-intl.aliyuncs.com/api/v1/fine-tunes' \
--header "Authorization: Bearer $DASHSCOPE_API_KEY" \
--header 'Content-Type: application/json' \
--data '{
    "model": "wan2.7-i2v",
    "training_file_ids": [
        "<training-dataset-file-id>"
    ],
    "training_type": "efficient_sft",
    "hyper_parameters": {
        "n_epochs": 400,
        "batch_size": 1,
        "learning_rate": 2e-5,
        "split": 0.9,
        "eval_epochs": 50,
        "max_pixels": 147456,
        "max_split_val_dataset_sample": 5,
        "save_total_limit": 10,
        "lora_rank": 32,
        "lora_alpha": 32
    }
}'

wan2.6-i2v

curl --location 'https://dashscope-intl.aliyuncs.com/api/v1/fine-tunes' \
--header "Authorization: Bearer $DASHSCOPE_API_KEY" \
--header 'Content-Type: application/json' \
--data '{
    "model": "wan2.6-i2v",
    "training_file_ids": [
        "<training-dataset-file-id>"
    ],
    "training_type": "efficient_sft",
    "hyper_parameters": {
        "n_epochs": 400,
        "batch_size": 1,
        "learning_rate": 2e-5,
        "split": 0.9,
        "eval_epochs": 50,
        "max_pixels": 36864,
        "max_split_val_dataset_sample": 5,
        "save_total_limit": 10,
        "lora_rank": 32,
        "lora_alpha": 32
    }
}'

wan2.5-i2v-preview

curl --location 'https://dashscope-intl.aliyuncs.com/api/v1/fine-tunes' \
--header "Authorization: Bearer $DASHSCOPE_API_KEY" \
--header 'Content-Type: application/json' \
--data '{
    "model": "wan2.5-i2v-preview",
    "training_file_ids": [
        "<training-dataset-file-id>"
    ],
    "training_type": "efficient_sft",
    "hyper_parameters": {
        "n_epochs": 400,
        "batch_size": 2,
        "learning_rate": 2e-5,
        "split": 0.9,
        "eval_epochs": 50,
        "max_pixels": 36864,
        "max_split_val_dataset_sample": 5,
        "save_total_limit": 10,
        "lora_rank": 32,
        "lora_alpha": 32
    }
}'

wan2.2-i2v-flash

curl --location 'https://dashscope-intl.aliyuncs.com/api/v1/fine-tunes' \
--header "Authorization: Bearer $DASHSCOPE_API_KEY" \
--header 'Content-Type: application/json' \
--data '{
    "model": "wan2.2-i2v-flash",
    "training_file_ids": [
        "<training-dataset-file-id>"
    ],
    "training_type": "efficient_sft",
    "hyper_parameters": {
        "n_epochs": 400,
        "batch_size": 4,
        "learning_rate": 2e-5,
        "split": 0.9,
        "eval_epochs": 50,
        "max_pixels": 262144,
        "max_split_val_dataset_sample": 5,
        "save_total_limit": 10,
        "lora_rank": 32,
        "lora_alpha": 32
    }
}'

wan2.2-kf2v-flash (最初と最後のフレーム)

curl --location 'https://dashscope-intl.aliyuncs.com/api/v1/fine-tunes' \
--header "Authorization: Bearer $DASHSCOPE_API_KEY" \
--header 'Content-Type: application/json' \
--data '{
    "model": "wan2.2-kf2v-flash",
    "training_file_ids": [
        "<training-dataset-file-id>"
    ],
    "training_type": "efficient_sft",
    "hyper_parameters": {
        "n_epochs": 400,
        "batch_size": 4,
        "learning_rate": 2e-5,
        "split": 0.9,
        "eval_epochs": 50,
        "max_pixels": 262144,
        "max_split_val_dataset_sample": 5,
        "save_total_limit": 10,
        "lora_rank": 32,
        "lora_alpha": 32
    }
}'

複数のトレーニングセットと検証セット

curl --location 'https://dashscope-intl.aliyuncs.com/api/v1/fine-tunes' \
--header "Authorization: Bearer $DASHSCOPE_API_KEY" \
--header 'Content-Type: application/json' \
--data '{
    "model": "wan2.5-i2v-preview",
    "training_file_ids": [
        "<training-set-file-id-1>",
        "<training-set-file-id-2>"
    ],
    "validation_file_ids": [
         "<validation-set-file-id-1>",
         "<validation-set-file-id-2>"
    ],
    "training_type": "efficient_sft",
    "hyper_parameters": {
        "n_epochs": 400,
        "batch_size": 2,
        "learning_rate": 2e-5,
        "split": 0.9,
        "eval_epochs": 50,
        "max_pixels": 36864,
        "max_split_val_dataset_sample": 5,
        "save_total_limit": 10,
        "lora_rank": 32,
        "lora_alpha": 32
    }
}'

レスポンス

output.job_id (ステータスのクエリ用) と output.finetuned_output (モデルのデプロイ用) をコピーします。

{
    "request_id": "0eb05b0c-02ba-414a-9d0c-xxxxxxxxx",
    "output": {
        "job_id": "ft-202511111122-xxxx",
        "job_name": "ft-202511111122-xxxx",
        "status": "PENDING",
        "finetuned_output": "wan2.5-i2v-preview-ft-202511111122-xxxx",
        "model": "wan2.5-i2v-preview",
        "base_model": "wan2.5-i2v-preview",
        "training_file_ids": [
            "xxxxxxxxxxxx"
        ],
        "validation_file_ids": [],
        "hyper_parameters": {
            "n_epochs": 400,
            "batch_size": 2,
            "learning_rate": 2.0E-5,
            "split": 0.9,
            "eval_epochs": 50
        },
        "training_type": "efficient_sft",
        "create_time": "2025-11-11 11:22:22",
        "workspace_id": "llm-xxxxxxxxx",
        "user_identity": "12xxxxxxx",
        "modifier": "12xxxxxxx",
        "creator": "12xxxxxxx",
        "group": "llm",
        "max_output_cnt": 10
    }
}

次のステップ: ジョブステータスをクエリし、トレーニングが完了するのを待ちます。

ジョブステータスのクエリ

ジョブの進捗を確認します。statusSUCCEEDED になるまでポーリングします。

トレーニングには数時間かかります (モデルとデータセットのサイズによって異なります)。

リクエスト

GET https://dashscope-intl.aliyuncs.com/api/v1/fine-tunes/{job_id}

パラメーター

場所

必須

説明

job_id

Path

string

はい

ジョブの作成」のレスポンスで返されたファインチューニングジョブ ID。

ft-202511111122-xxxx

レスポンス

ジョブの作成」のレスポンスで返されるすべてのフィールドに加え、以下のフィールドも返されます:

フィールド

説明

output.end_time

string

ジョブの完了時刻。

2025-11-11 16:49:01

output.output_cnt

integer

保存されたチェックポイントの実際の数。

8

output.usage

integer

トレーニングの合計トークン数 (課金用)。

432000

<fine-tuning-job-id> をジョブ作成レスポンスの job_id で置き換えます。

リクエスト

curl --location 'https://dashscope-intl.aliyuncs.com/api/v1/fine-tunes/<fine-tuning-job-id>' \
--header "Authorization: Bearer $DASHSCOPE_API_KEY" \
--header 'Content-Type: application/json'

レスポンス

statusSUCCEEDED の場合、トレーニングは完了です。 usage フィールドには、課金対象の合計消費トークン数が表示されます。

{
    "request_id": "9bbb953c-bef2-4b59-9fc5-xxxxxxxxx",
    "output": {
        "job_id": "ft-202511111122-xxxx",
        "job_name": "ft-202511111122-xxxx",
        "status": "SUCCEEDED",
        "finetuned_output": "wan2.5-i2v-preview-ft-202511111122-xxxx",
        "model": "wan2.5-i2v-preview",
        "base_model": "wan2.5-i2v-preview",
        "training_file_ids": [
            "xxxxxxxxxxxx"
        ],
        "validation_file_ids": [],
        "hyper_parameters": {
            "n_epochs": 400,
            "batch_size": 2,
            "learning_rate": 2.0E-5,
            "split": 0.9,
            "eval_epochs": 50
        },
        "training_type": "efficient_sft",
        "create_time": "2025-11-11 11:22:22",
        "workspace_id": "llm-xxxxxxxxx",
        "user_identity": "xxxxxxxxx",
        "modifier": "xxxxxxxxx",
        "creator": "xxxxxxxxx",
        "end_time": "2025-11-11 16:49:01",
        "group": "llm",
        "usage": 432000,
        "max_output_cnt": 8,
        "output_cnt": 8
    }
}

次のステップ: モデルをデプロイするか、チェックポイントを管理して特定のチェックポイントを選択してください。

モデルのデプロイメント

ジョブステータスが SUCCEEDED になった後、ファインチューニングされたモデルを API サービスとして公開できます。

リクエスト

POST https://dashscope-intl.aliyuncs.com/api/v1/deployments
Content-Type: application/json

パラメーター

場所

必須

説明

model_name

Body

文字列

はい

デプロイするモデル(ジョブのレスポンスの output.finetuned_output、またはチェックポイントの output[].model_name

wan2.5-i2v-preview-ft-202511111122-xxxx

capacity

Body

整数

はい

モデルインスタンス (1 に設定)

1

plan

Body

文字列

はい

lora に修正しました。

lora

aigc_config

Body

オブジェクト

はい

プロンプト設定。以下をご参照ください。

-

プロンプト設定 (aigc_config)

パラメーター

必須

説明

use_input_prompt

ブール値

はい

false (デフォルト): システムは API リクエストのプロンプトを無視し、画像と以下のテンプレートからプロンプトを自動生成します。 true: システムは API リクエストのプロンプトを直接使用し、テンプレートパラメーターを無視します。

prompt

文字列

はい

プリセットプロンプトテンプレート (use_input_prompt=false の場合に有効)。システムが入力画像を分析し、被写体/環境の説明を入力して、エフェクト指示を追加します。呼び出し API からのプロンプトを上書きします

lora_prompt_default

文字列

はい

フォールバックテンプレート (use_input_prompt=false であり、 prompt の生成に失敗した場合にアクティブ)。

プロンプトテンプレートの作成方法

use_input_prompt=false の場合、システムは入力画像から完全なプロンプトを自動生成します。prompt パラメーターを設定すると、呼び出し元は画像をアップロードするだけで済みます。

構造:指示 + 出力テンプレート + 例

Provide a video description based on the image content. The description must
include "Then the s86b5p money rain effect begins, and countless enormous US
dollar bills (beige with dark green patterns) pour down like a torrential rain,
densely hitting and surrounding her (him). The bills continue to fall as the
camera slowly zooms in. She (he) stretches her (his) arms upward, neck slightly
tilted back, with a surprised expression, completely immersed in this wild
money rain".

Output template:
The video begins by showing [subject description]. [Environment description].
Then the s86b5p money rain effect begins, and countless enormous US dollar bills
(beige with dark green patterns) pour down like a torrential rain, densely
hitting and surrounding her (him). The bills continue to fall as the camera
slowly zooms in. She (he) stretches her (his) arms upward, neck slightly tilted
back, with a surprised expression, completely immersed in this wild money rain.

Example:
The video begins by showing a young woman on a beach. Her hair is wet, dark
brown, curly, and slightly messy. She has a bright smile on her face. The
background shows rough waves and distant mountains. Then the s86b5p money rain
effect begins, and countless enormous US dollar bills (beige with dark green
patterns) pour down like a torrential rain, densely hitting and surrounding her.
The bills continue to fall as the camera slowly zooms in. She stretches her arms
upward, neck slightly tilted back, with a surprised expression, completely
immersed in this wild money rain.
ビデオプロンプトの作成に関する詳細については、「ビデオアノテーション:ビデオのプロンプト作成」をご参照ください。

レスポンス

フィールド

説明

request_id

文字列

リクエスト ID。

0eb05b0c-02ba-414a-9d0c-xxxxxxxxx

output.deployed_model

文字列

デプロイ済みモデル ID。デプロイメントステータスのクエリやモデルの呼び出しに必要です。

wan2.5-i2v-preview-ft-202511111122-xxxx

output.model_name

文字列

モデル ID。

wan2.5-i2v-preview-ft-202511111122-xxxx

output.status

文字列

デプロイメントステータス。「デプロイメントステータス値」をご参照ください。

PENDING

output.base_model

文字列

使用したベースモデル。

wan2.5-i2v-preview

output.gmt_create

文字列

タスク作成時刻。

2025-11-11T17:46:53.294

output.gmt_modified

文字列

タスク更新時刻。

2025-11-11T17:46:53.294

output.workspace_id

文字列

ワークスペース ID。「ワークスペース ID の取得」をご参照ください。

llm-xxxxxxxxx

output.charge_type

文字列

課金方法。 post_paid = 従量課金。

post_paid

output.creator

文字列

作成者のアカウント ID。

12xxxxxxx

output.modifier

文字列

更新者のアカウント ID。

12xxxxxxx

output.plan

文字列

デプロイ方法。

lora

<model-name> を create job レスポンスの finetuned_output 値 (またはエクスポートされたチェックポイントの model_name) で置き換えます。

画像から動画へ (最初のフレーム)

curl --location 'https://dashscope-intl.aliyuncs.com/api/v1/deployments' \
--header "Authorization: Bearer $DASHSCOPE_API_KEY" \
--header 'Content-Type: application/json' \
--data '{
    "model_name": "<model-name>",
    "aigc_config": {
        "use_input_prompt": false,
        "prompt": "Provide a video description based on the image content. The description must include the phrase \"Then the s86b5p money rain effect begins, countless huge-sized US dollar bills (beige background/dark green patterns) pour down like a torrential rain, densely hitting and surrounding her. The bills continue to fall, she/he stretches her/his arms upward, neck slightly tilted back, expression surprised, completely immersed in this wild money rain.\"\nOutput Template:\nThe video begins with a shot of [subject description]. [Environment description]. Then the s86b5p money rain effect begins, countless huge-sized US dollar bills (beige background/dark green patterns) pour down like a torrential rain, densely hitting and surrounding her. The bills continue to fall, she/he stretches her/his arms upward, neck slightly tilted back, expression surprised, completely immersed in this wild money rain.\nExample:\nThe video begins showing a young woman standing in front of a brick wall covered with ivy. She has long, smooth reddish-brown hair, wearing a white sleeveless dress, a shiny silver necklace, and a smile on her face. The brick wall in the background is covered with green vines, appearing rustic and natural. Then the s86b5p money rain effect begins, countless huge-sized US dollar bills (beige background/dark green patterns) pour down like a torrential rain, densely hitting and surrounding her. The bills continue to fall, she stretches her arms upward, neck slightly tilted back, expression surprised, completely immersed in this wild money rain.",
        "lora_prompt_default": "Then the s86b5p money rain effect begins, countless huge-sized US dollar bills (beige background/dark green patterns) pour down like a torrential rain, densely hitting and surrounding her. The bills continue to fall, she/he stretches her/his arms upward, neck slightly tilted back, expression surprised, completely immersed in this wild money rain."
    },
    "capacity": 1,
    "plan": "lora"
}'

画像から動画へ (最初と最後のフレーム)

curl --location 'https://dashscope-intl.aliyuncs.com/api/v1/deployments' \
--header "Authorization: Bearer $DASHSCOPE_API_KEY" \
--header 'Content-Type: application/json' \
--data '{
    "model_name": "<model-name>",
    "aigc_config": {
        "use_input_prompt": false,
        "prompt": "Provide a video description based on the image content. The description must include the phrase \"Then she/he begins the s86b5p transformation.\"\nOutput Template:\nThe video begins with a shot of [subject description]. [Environment description]. Then she/he begins the s86b5p transformation.\nExample:\nThe video begins with a young woman in an outdoor setting. She has short, curly dark brown hair and a friendly smile. She is wearing a black Polo shirt with colorful floral embroidery. The background features green vegetation and distant mountains. Then she begins the s86b5p transformation.",
        "lora_prompt_default": "Then she/he begins the s86b5p transformation."
    },
    "capacity": 1,
    "plan": "lora"
}'

レスポンス

output.statusPENDING であることは、デプロイが進行中であることを意味します。

{
    "request_id": "96020b2e-9072-4c8a-9981-xxxxxxxxx",
    "output": {
        "deployed_model": "wan2.5-i2v-preview-ft-202511111122-xxxx",
        "gmt_create": "2025-11-11T17:46:53.294",
        "gmt_modified": "2025-11-11T17:46:53.294",
        "status": "PENDING",
        "model_name": "wan2.5-i2v-preview-ft-202511111122-xxxx",
        "base_model": "wan2.5-i2v-preview",
        "workspace_id": "llm-xxxxxxxxx",
        "charge_type": "post_paid",
        "creator": "12xxxxxxx",
        "modifier": "12xxxxxxx",
        "plan": "lora"
    }
}

次のステップ: デプロイメントステータスをクエリし、 statusRUNNING になるのを待ちます。

デプロイメントステータスのクエリ

デプロイされたモデルが準備完了したか確認します。 statusRUNNING になるまでポーリングします。

デプロイメントには 5~10 分かかります。

リクエスト

GET https://dashscope-intl.aliyuncs.com/api/v1/deployments/{deployed_model}

パラメーター

場所

必須

説明

deployed_model

パス

文字列

はい

モデルのデプロイ」のレスポンスで返された、デプロイ済みモデルの ID。

wan2.5-i2v-preview-ft-202511111122-xxxx

レスポンス

モデルのデプロイ」のレスポンスと同じフィールドに加え、追加のステータス値が返されます。

デプロイメントステータス値

ステータス

意味

PENDING

デプロイ中。

RUNNING

リクエストを受け付ける準備ができています。

ARREARS_DOWN

支払い遅延のため停止中。

ARREARS_RECOVERING

支払い遅延からの再開中。

FAILED

デプロイメント失敗。

OFFLINING

サービスをオフラインにしています。

UPDATING

アップグレードまたはダウングレード中。

UPDATING_FAILED

アップグレードまたはダウングレード失敗。

<deployed-model> を、デプロイレスポンスからの output.deployed_model で置き換えます。

リクエスト

curl --location 'https://dashscope-intl.aliyuncs.com/api/v1/deployments/<deployed-model>' \
--header "Authorization: Bearer $DASHSCOPE_API_KEY" \
--header 'Content-Type: application/json'

レスポンス

statusRUNNING の場合、モデルはデプロイされ、リクエストを受け付ける準備ができています。

{
    "request_id": "66d15f35-0772-409f-bc70-xxxxxxxxx",
    "output": {
        "deployed_model": "wan2.5-i2v-preview-ft-202511111122-xxxx",
        "gmt_create": "2025-11-11T17:46:53",
        "gmt_modified": "2025-11-11T18:02:24",
        "status": "RUNNING",
        "model_name": "wan2.5-i2v-preview-ft-202511111122-xxxx",
        "base_model": "wan2.5-i2v-preview",
        "workspace_id": "llm-xxxxxxxxx",
        "charge_type": "post_paid",
        "creator": "12xxxxxxx",
        "modifier": "12xxxxxxxx",
        "plan": "lora"
    }
}

次のステップ: モデルを呼び出して動画を生成する

チェックポイントの管理

トレーニング後、チェックポイントを一覧表示し、検証結果をプレビューし、チェックポイントをエクスポートしてデプロイします。

チェックポイントの一覧表示

検証プレビューが成功したチェックポイントを返します (失敗したチェックポイントは除外されます)。

トレーニング完了後にのみ利用可能です。

リクエスト

GET https://dashscope-intl.aliyuncs.com/api/v1/fine-tunes/{job_id}/validation-results

パラメーター

場所

必須

説明

job_id

パス

文字列

はい

ファインチューニングジョブ ID。

ft-202511111122-xxxx

レスポンス

フィールド

説明

request_id

文字列

リクエスト ID。

0eb05b0c-02ba-414a-9d0c-xxxxxxxxx

output

配列[object]

チェックポイントのリスト。

-

output[].checkpoint

文字列

チェックポイント名。

checkpoint-160

リクエスト

curl --location 'https://dashscope-intl.aliyuncs.com/api/v1/fine-tunes/<fine-tuning-job-id>/validation-results' \
--header "Authorization: Bearer $DASHSCOPE_API_KEY" \
--header 'Content-Type: application/json'

レスポンス

{
    "request_id": "da1310f5-5a21-4e29-99d4-xxxxxx",
    "output": [
        {
            "checkpoint": "checkpoint-160"
        },
        {
            "checkpoint": "checkpoint-20"
        },
        {
            "checkpoint": "checkpoint-40"
        },
        {
            "checkpoint": "checkpoint-60"
        }
    ]
}

チェックポイント検証詳細の取得

特定のチェックポイントに関する検証詳細 (ビデオの URL など) を取得します。

リクエスト

GET https://dashscope-intl.aliyuncs.com/api/v1/fine-tunes/{job_id}/validation-details/{checkpoint}?page_no=1&page_size=10

パラメーター

場所

必須

説明

job_id

パス

文字列

はい

ファインチューニングジョブ ID。

ft-202511111122-xxxx

checkpoint

パス

文字列

はい

チェックポイント名。

checkpoint-160

page_no

Query

整数

いいえ

ページ番号。デフォルト: 1

1

page_size

Query

整数

いいえ

1 ページあたりの表示件数。デフォルト: 10

10

レスポンス

フィールド

説明

request_id

文字列

リクエスト ID。

375b3ad0-d3fa-451f-b629-xxxxxxx

output.page_no

整数

ページ番号。

1

output.page_size

整数

1 ページあたりの結果数。

10

output.total

整数

検証エントリの合計数。

1

output.list[].video_path

文字列

ビデオ URL (有効期間 24 時間。速やかにダウンロードしてください)。

https://finetune-swap-wulanchabu.oss-cn-wulanchabu.aliyuncs.com/xxx.mp4?Expires=xxxx

output.list[].prompt

文字列

data.jsonl アノテーションファイルからのプロンプト。

The video begins with a young man...

output.list[].first_frame_path

文字列

検証画像の URL。

https://finetune-swap-wulanchabu.oss-cn-wulanchabu.aliyuncs.com/xxx.jpeg

リクエスト

curl --location 'https://dashscope-intl.aliyuncs.com/api/v1/fine-tunes/<fine-tuning-job-id>/validation-details/<checkpoint>?page_no=1&page_size=10' \
--header "Authorization: Bearer $DASHSCOPE_API_KEY"

レスポンス

video_path の有効期限は 24 時間です。期限が切れる前にダウンロードしてください。
{
    "request_id": "375b3ad0-d3fa-451f-b629-xxxxxxx",
    "output": {
        "page_no": 1,
        "page_size": 10,
        "total": 1,
        "list": [
            {
                "video_path": "https://finetune-swap-wulanchabu.oss-cn-wulanchabu.aliyuncs.com/xxx.mp4?Expires=xxxx",
                "prompt": "The video begins with a young man sitting in a cafe. He is wearing a beige Polo shirt, looking focused and slightly contemplative, with his fingers gently touching his chin. In front of him is a cup of hot coffee. The background is a wall with wooden stripes and a decorative sign. Then the s86b5p money rain effect begins, and countless enormous US dollar bills (beige with dark green patterns) pour down like a torrential rain, densely hitting and surrounding him. The bills continue to fall as he stretches his arms upward, neck slightly tilted back, with a surprised expression, completely immersed in this wild money rain.",
                "first_frame_path": "https://finetune-swap-wulanchabu.oss-cn-wulanchabu.aliyuncs.com/xxx.jpeg"
            }
        ]
    }
}

チェックポイントのエクスポート

チェックポイントをデプロイ可能なモデルとしてエクスポートします。

リクエスト

GET https://dashscope-intl.aliyuncs.com/api/v1/fine-tunes/{job_id}/export/{checkpoint}?model_name={model_name}

パラメーター

場所

必須

説明

job_id

パス

文字列

はい

ファインチューニングジョブ ID。

ft-202511111122-xxxx

checkpoint

パス

文字列

はい

チェックポイント名。

checkpoint-160

model_name

Query

文字列

はい

コンソール表示名 (グローバルに一意である必要があります)。漢字、英字、数字、アンダースコア、またはハイフンを使用します。デプロイメントには、「エクスポート済みモデル詳細の取得」のレスポンスから output[].model_name を使用します。

my-checkpoint-160

レスポンス

フィールド

説明

request_id

文字列

リクエスト ID。

0eb05b0c-02ba-414a-9d0c-xxxxxxxxx

output

ブール値

true:リクエスト送信済み; false:失敗(再試行)

true

リクエスト

curl --location 'https://dashscope-intl.aliyuncs.com/api/v1/fine-tunes/<fine-tuning-job-id>/export/<checkpoint>?model_name=<console-display-name>' \
--header "Authorization: Bearer $DASHSCOPE_API_KEY"

レスポンス

{
    "request_id": "0817d1ed-b6b6-4383-9650-xxxxx",
    "output": true
}

次のステップ: エクスポートされたモデルの詳細を取得し、デプロイ用の model_name を取得します。

エクスポート済みモデル詳細の取得

デプロイ用にエクスポートステータスと model_name を返します。

リクエスト

GET https://dashscope-intl.aliyuncs.com/api/v1/fine-tunes/{job_id}/checkpoints

パラメーター

場所

必須

説明

job_id

パス

文字列

はい

ファインチューニングジョブ ID。

ft-202511111122-xxxx

レスポンス

フィールド

説明

request_id

文字列

リクエスト ID。

0eb05b0c-02ba-414a-9d0c-xxxxxxxxx

output

配列[object]

チェックポイントの詳細。

-

output[].create_time

文字列

作成時刻。

2025-11-11T13:27:29

output[].job_id

文字列

ファインチューニングジョブ ID。

ft-202511111122-xxxx

output[].checkpoint

文字列

チェックポイント名。

checkpoint-160

output[].full_name

文字列

完全なチェックポイント ID。

ft-202511111122-496e-checkpoint-160

output[].model_name

文字列

デプロイ用のモデル名(statusSUCCEEDED の場合に返される)。

wan2.5-i2v-preview-ft-202511111122-xxxx-c160

output[].model_display_name

文字列

表示名。

wan2.5-i2v-preview-ft-202511111122-xxxx

output[].status

文字列

エクスポートステータス。詳細は下記のとおりです。

SUCCEEDED

エクスポートステータス値

ステータス

意味

PENDING

エクスポート待機中。

PROCESSING

エクスポート中。

SUCCEEDED

エクスポートが完了しました。

FAILED

エクスポートに失敗しました。

UNSUPPORTED

エクスポートはサポートされていません。

リクエスト

curl --location 'https://dashscope-intl.aliyuncs.com/api/v1/fine-tunes/<fine-tuning-job-id>/checkpoints' \
--header "Authorization: Bearer $DASHSCOPE_API_KEY"

レスポンス

対象のチェックポイントの statusSUCCEEDED の場合、デプロイメント用にその model_name を保存してください。

{
    "request_id": "b0e33c6e-404b-4524-87ac-xxxxxx",
    "output": [
        {
            "create_time": "2025-11-11T13:42:31",
            "full_name": "ft-202511111122-496e-checkpoint-180",
            "job_id": "ft-202511111122-496e",
            "checkpoint": "checkpoint-180",
            "status": "PENDING"
        },
        {
            "create_time": "2025-11-11T13:27:29",
            "full_name": "ft-202511111122-496e-checkpoint-160",
            "job_id": "ft-202511111122-496e",
            "checkpoint": "checkpoint-160",
            "model_name": "wan2.5-i2v-preview-ft-202511111122-xxxx-c160",
            "model_display_name": "wan2.5-i2v-preview-ft-202511111122-xxxx",
            "status": "SUCCEEDED"
        }
    ]
}

エクスポート済みチェックポイントのデプロイと呼び出し

チェックポイントをエクスポートし、その model_name を取得した後:

  1. モデルのデプロイ:エクスポートされた model_namemodel_name パラメーターとして渡します。

  2. デプロイメントステータスのクエリ:ステータスが RUNNING になるまで待機します。

  3. モデルを呼び出してビデオを生成します

ファインチューニングジョブ管理

ジョブログの照会

GET https://dashscope-intl.aliyuncs.com/api/v1/fine-tunes/{job_id}/logs

リクエスト

curl --location 'https://dashscope-intl.aliyuncs.com/api/v1/fine-tunes/<fine-tuning-job-id>/logs' \
--header "Authorization: Bearer $DASHSCOPE_API_KEY"

レスポンス

{
    "request_id": "b7ecb456-6dd1-4f35-a581-xxxxxx",
    "output": {
        "total": 25,
        "logs": [
            "2025-11-11 11:23:37,315 - INFO - data process succeeded, start to fine-tune",
            " Actual number of consumed tokens is 215040 !",
            " Actual number of consumed tokens is 419840 !",
            " Actual number of consumed tokens is 624640 !",
            "2025-11-11 16:31:40,760 - INFO - fine-tuned output got, start to transfer it for inference",
            "2025-11-11 16:32:29,162 - INFO - transfer for inference succeeded, start to deliver it for inference",
            "2025-11-11 16:40:28,784 - INFO - start to save checkpoint",
            "2025-11-11 16:49:01,738 - INFO - finetune-job succeeded",
            "2025-11-11 16:49:02,234 - INFO - ##FT_COMPLETE##"
        ]
    }
}

ファインチューニングジョブの一覧

GET https://dashscope-intl.aliyuncs.com/api/v1/fine-tunes

リクエスト

curl --location 'https://dashscope-intl.aliyuncs.com/api/v1/fine-tunes' \
--header "Authorization: Bearer $DASHSCOPE_API_KEY"

レスポンス

{
    "request_id": "bf4d3475-f50c-42e2-a263-xxxxxxxxx",
    "output": {
        "page_no": 1,
        "page_size": 10,
        "total": 1,
        "jobs": [
            {
                "job_id": "ft-202511111122-xxxx",
                "job_name": "ft-202511111122-xxxx",
                "status": "SUCCEEDED",
                "finetuned_output": "wan2.5-i2v-preview-ft-202511111122-xxxx",
                "model": "wan2.5-i2v-preview",
                "base_model": "wan2.5-i2v-preview",
                "training_file_ids": [
                    "xxxxxxxxx"
                ],
                "validation_file_ids": [],
                "hyper_parameters": {
                    "n_epochs": 400,
                    "batch_size": 2,
                    "learning_rate": 2.0E-5,
                    "split": 0.9,
                    "eval_epochs": 50
                },
                "training_type": "efficient_sft",
                "create_time": "2025-11-11 11:22:22",
                "workspace_id": "llm-xxxxxxxxx",
                "user_identity": "xxxxxxxxx",
                "modifier": "xxxxxxxxx",
                "creator": "xxxxxxxxx",
                "end_time": "2025-11-11 16:49:01",
                "group": "llm",
                "usage": 432000,
                "max_output_cnt": 8,
                "output_cnt": 8
            }
        ]
    }
}

ファインチューニングジョブのキャンセル

POST https://dashscope-intl.aliyuncs.com/api/v1/fine-tunes/{job_id}/cancel

リクエスト

curl --location --request POST 'https://dashscope-intl.aliyuncs.com/api/v1/fine-tunes/<fine-tuning-job-id>/cancel' \
--header "Authorization: Bearer $DASHSCOPE_API_KEY" \
--header 'Content-Type: application/json'

レスポンス

{
    "request_id": "d8dab938-e32e-40bf-83ab-xxxxxx",
    "output": {
        "status": "success"
    }
}

ファインチューニングジョブの削除

DELETE https://dashscope-intl.aliyuncs.com/api/v1/fine-tunes/{job_id}

リクエスト

curl --location --request DELETE 'https://dashscope-intl.aliyuncs.com/api/v1/fine-tunes/<fine-tuning-job-id>' \
--header "Authorization: Bearer $DASHSCOPE_API_KEY" \
--header 'Content-Type: application/json'

レスポンス

{
    "request_id": "1301136c-12f2-4504-880a-xxxxxx",
    "output": {
        "status": "success"
    }
}

デプロイ済みモデル管理

デプロイ済みモデルの削除

DELETE https://dashscope-intl.aliyuncs.com/api/v1/deployments/{deployed_model}
重要

モデルを即座にオフラインにします (元に戻すことはできません)。 モデルは利用不可となり、課金が停止します。

リクエスト

curl --request DELETE 'https://dashscope-intl.aliyuncs.com/api/v1/deployments/<deployed-model>' \
    --header "Authorization: Bearer $DASHSCOPE_API_KEY" \
    --header 'Content-Type: application/json'

応答

status: DELETING は削除が受理されたことを意味します。

{
    "request_id": "c2ed2aa2-39b8-4a86-b79e-xxxxxx",
    "output": {
        "deployed_model": "wan2.5-i2v-preview-ft-202511111122-xxxx",
        "gmt_create": "2025-11-11T17:46:53",
        "gmt_modified": "2025-12-22T11:18:27.532",
        "status": "DELETING",
        "model_name": "wan2.5-i2v-preview-ft-202511111122-xxxx",
        "base_model": "wan2.5-i2v-preview",
        "workspace_id": "llm-xxxxxx",
        "charge_type": "post_paid",
        "creator": "xxxxxx",
        "modifier": "xxxxxx",
        "plan": "lora"
    }
}

ステータスの照会 により削除を確認します。 NotFound が削除完了を意味します:

{
    "request_id": "eb619064-0c4f-4d29-aa49-xxxxxx",
    "message": "Not found.",
    "code": "NotFound"
}