Skip to content

tuning (training)-Video generation model fine-tuning API reference

Fine-tune Wan image-to-video models through the Model Studio API. This reference covers each API operation in the fine-tuning workflow -- from dataset upload through model deployment.

Workflow overview

A typical fine-tuning workflow follows this sequence:

  1. Upload a dataset -- Upload training data (.zip) and get a file ID.

  2. Create a fine-tuning job -- Start training with a base model and the uploaded dataset.

  3. Query job status -- Poll until training completes (several hours).

  4. Deploy the model -- Publish the fine-tuned model as an API service.

  5. Query deployment status -- Poll until deployment is ready (5--10 minutes).

  6. Generate videos -- Call the deployed model.

Optional operations:

  • Manage checkpoints -- List, preview, and export specific training checkpoints.

  • Manage jobs -- List, cancel, or delete fine-tuning jobs.

  • Delete deployments -- Take a deployed model offline.

Before you begin

Region: Only the Singapore region is supported under the international deployment mode. Use an API key from this region.

API key: Create an API key and set it as an environment variable.

Background reading: Read the fine-tuning overview to understand supported models, data format, fine-tuning steps, and billing.

Sample datasets:

ModeTraining setValidation set
Image-to-video (first frame)DownloadDownload
Image-to-video (first and last frames)DownloadDownload

Supported base models

ModeModel ID
Image-to-video (first frame)wan2.6-i2v, wan2.5-i2v-preview, wan2.2-i2v-flash
Image-to-video (first and last frames)wan2.2-kf2v-flash

Upload a dataset

Note

When using the API, the zip package size must be ≤ 1GB.

Upload a .zip dataset and get a file ID to create fine-tuning jobs.

Request

POST https://dashscope-intl.aliyuncs.com/compatible-mode/v1/files
Content-Type: multipart/form-data
ParameterLocationTypeRequiredDescriptionExample
fileBody (form-data)fileYesLocal .zip dataset. Pass as files=@" ".@"./wan-i2v-training-dataset.zip"
purposeBody (form-data)stringYesFixed to fine-tune.fine-tune

Response

FieldTypeDescriptionExample
idstringFile ID for creating fine-tuning jobs.file-ft-b2416bacc4d742xxxx
objectstringUpload type.file
bytesintegerFile size in bytes.73310369
filenamestringFile name.wan-i2v-training-dataset.zip
purposestringFixed to fine-tune.fine-tune
statusstringUpload status. processed means the upload succeeded.processed
created_atintegerCreation time as a UNIX timestamp.1766127125

Example

Request

HELPCODEESCAPE-bash
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"'

Response

Copy the id value for the next step.

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

Next step: Use the file ID to create a fine-tuning job.

Create a fine-tuning job

Start training with a base model and uploaded dataset.

Request

POST https://dashscope-intl.aliyuncs.com/api/v1/fine-tunes
Content-Type: application/json
ParameterLocationTypeRequiredDescriptionExample
modelBodystringYesBase model ID (see Supported base models ).wan2.5-i2v-preview
training_file_idsBodyarray[string]YesTraining set file IDs. Accepts multiple IDs.\["file-ft-b2416bacc4d742xxxx"\]
validation_file_idsBodyarray[string]NoValidation set file IDs (if omitted, training set is auto-split).-
training_typeBodystringYesFine-tuning method. Only efficient_sft (LoRA) is supported.efficient_sft
hyper_parametersBodyobjectNoHyperparameter settings. See Hyperparameters .See below

Hyperparameters

Defaults work well for first runs. Adjust n_epochs or learning_rate if needed.

Quick-start defaults

Modelbatch_sizen_epochslearning_ratemax_pixelseval_epochs
wan2.6-i2v24002e-53686450
wan2.5-i2v-preview24002e-53686450
wan2.2-i2v-flash44002e-526214450
wan2.2-kf2v-flash44002e-526214450

Full parameter reference

ParameterTypeRequiredDescriptionDefault
batch_sizeintYesSamples per training step (use model default above).2 or 4
n_epochsintYesTraining epochs. Total steps = n_epochs × ceil(dataset_size / batch_size) (minimum 800 steps required). For 5 samples with batch_size=2: ceil(5/2)=3 steps/epoch, so minimum n_epochs = ceil(800/3) = 267.400
learning_ratefloatYesWeight update magnitude (too high degrades model; too low has minimal effect).2e-5
eval_epochsintYesEpochs between evaluations (must be ≥ n_epochs / 10).50
max_pixelsintYesMaximum pixels (width × height). Videos exceeding this are downscaled. wan2.6/2.5: 16384--36864; wan2.2: 65536--262144.36864 or 262144
splitfloatNoTraining-validation split ratio. Takes effect only when validation_file_ids is not provided. 0.9 means 90% training, 10% validation.0.9
max_split_val_dataset_sampleintNoMaximum validation samples when auto-splitting. Validation size = min(total * (1 - split), max_split_val_dataset_sample). For example, 100 samples with split=0.9 and this value set to 5: calculated validation = 10, capped to 5.5
save_total_limitintNoMaximum number of checkpoints to keep. Only the last N checkpoints are retained.20
lora_rankintNoLoRA low-rank matrix dimension. Larger values increase fitting capacity but slow training. Must be a power of 2 (16, 32, 64).32
lora_alphaintNoLoRA weight scaling factor. Adjusts how much the fine-tuned parameters influence the base model weights. Must be a power of 2 (16, 32, 64).32

Response

FieldTypeDescriptionExample
request_idstringRequest ID.0eb05b0c-02ba-414a-9d0c-xxxxxxxxx
output.job_idstringFine-tuning job ID. Required to query job status.ft-202511111122-xxxx
output.job_namestringJob name.ft-202511111122-xxxx
output.statusstringJob status. See Job status values .PENDING
output.finetuned_outputstringFine-tuned model name. Required for deployment.wan2.5-i2v-preview-ft-202511111122-xxxx
output.modelstringBase model used.wan2.5-i2v-preview
output.base_modelstringBase model used.wan2.5-i2v-preview
output.training_file_idsarrayTraining set file IDs.\["file-ft-b2416bacc4d742xxxx"\]
output.validation_file_idsarrayValidation set file IDs. Empty if none were uploaded.\[\]
output.hyper_parametersobjectHyperparameters applied to this job.{...}
output.training_typestringFixed to efficient_sft.efficient_sft
output.create_timestringJob creation time.2025-11-11 11:22:22
output.workspace_idstringWorkspace ID. See Get a workspace ID.llm-xxxxxxxxx
output.user_identitystringAlibaba Cloud account ID.12xxxxxxx
output.modifierstringAccount ID of the last modifier.12xxxxxxx
output.creatorstringAccount ID of the creator.12xxxxxxx
output.groupstringJob group.llm
output.max_output_cntintegerMaximum checkpoints to save. Equals save_total_limit.20

Job status values

StatusMeaning
PENDINGPending.
QUEUINGQueued (one job at a time).
RUNNINGIn progress.
CANCELINGCanceling.
SUCCEEDEDCompleted.
FAILEDFailed.
CANCELEDCanceled.

Examples

Replace <training-dataset-file-id> with the file ID from the Upload a dataset response.

wan2.6-i2v

HELPCODEESCAPE-bash
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":2,
        "learning_rate":2e-5,
        "split":0.9,
        "eval_epochs": 50,
        "max_pixels": 36864
    }
}'

wan2.5-i2v-preview

HELPCODEESCAPE-bash
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
    }
}'

wan2.2-i2v-flash

HELPCODEESCAPE-bash
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
    }
}'

wan2.2-kf2v-flash (first and last frames)

HELPCODEESCAPE-bash
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
    }
}'

Multiple training and validation sets

HELPCODEESCAPE-bash
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
    }
}'

Response

Copy output.job_id (to query status) and output.finetuned_output (to deploy the model).

HELPCODEESCAPE-json
{
    "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": 20
    }
}

Next step: Query the job status and wait for training to complete.

Query job status

Check job progress. Poll until status is SUCCEEDED.

Training takes several hours (varies by model and dataset size).

Request

HELPCODEESCAPE-http
GET https://dashscope-intl.aliyuncs.com/api/v1/fine-tunes/{job_id}
ParameterLocationTypeRequiredDescriptionExample
job_idPathstringYesFine-tuning job ID from the create job response.ft-202511111122-xxxx

Response

All fields from the create job response are returned, plus:

FieldTypeDescriptionExample
output.end_timestringJob completion time.2025-11-11 16:49:01
output.output_cntintegerActual number of saved checkpoints.8
output.usageintegerTotal training tokens (for billing).432000

Example

Replace <fine-tuning-job-id> with the job_id from the create job response.

Request

HELPCODEESCAPE-bash
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'

Response

When status is SUCCEEDED, training is complete. The usage field shows total tokens consumed for billing.

HELPCODEESCAPE-json
{
    "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
    }
}

Next step: Deploy the model or manage checkpoints to select a specific checkpoint.

Deploy a model

Publish a fine-tuned model as an API service after job status is SUCCEEDED.

Request

HELPCODEESCAPE-http
POST https://dashscope-intl.aliyuncs.com/api/v1/deployments
Content-Type: application/json
ParameterLocationTypeRequiredDescriptionExample
model_nameBodystringYesModel to deploy (output.finetuned_output from job response or output\[\].model_name from checkpoint).wan2.5-i2v-preview-ft-202511111122-xxxx
capacityBodyintegerYesModel instances (set to 1).1
planBodystringYesFixed to lora.lora
aigc_configBodyobjectYesPrompt configuration. See below.-

Prompt configuration (aigc_config)

ParameterTypeRequiredDescription
use_input_promptbooleanYesfalse (default): The system ignores the prompt in API requests and auto-generates one from the image and the templates below. true: The system uses the prompt from the API request directly, and ignores the template parameters.
promptstringYesPreset prompt template (active when use_input_prompt=false). System analyzes input image, fills subject/environment descriptions, and appends effect instructions. Overrides prompts from invocation API.
lora_prompt_defaultstringYesFallback template (active when use_input_prompt=false and prompt generation fails).

How to write the prompt template When use_input_prompt=false, the system auto-generates a complete prompt from the input image. Configure the prompt parameter so callers only need to upload an image.

Structure: Instruction + Output template + Example

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.

For details on writing video prompts, see Video annotation: Write prompts for videos.

Response

FieldTypeDescriptionExample
request_idstringRequest ID.0eb05b0c-02ba-414a-9d0c-xxxxxxxxx
output.deployed_modelstringDeployed model ID. Required to query deployment status and call the model.wan2.5-i2v-preview-ft-202511111122-xxxx
output.model_namestringModel ID name.wan2.5-i2v-preview-ft-202511111122-xxxx
output.statusstringDeployment status. See Deployment status values .PENDING
output.base_modelstringBase model used.wan2.5-i2v-preview
output.gmt_createstringTask creation time.2025-11-11T17:46:53.294
output.gmt_modifiedstringTask update time.2025-11-11T17:46:53.294
output.workspace_idstringWorkspace ID. See Get a workspace ID.llm-xxxxxxxxx
output.charge_typestringBilling method. post_paid = pay-as-you-go.post_paid
output.creatorstringCreator's account ID.12xxxxxxx
output.modifierstringModifier's account ID.12xxxxxxx
output.planstringDeployment method.lora

Examples

Replace <model-name> with the finetuned_output value from the create job response (or the model_name from an exported checkpoint).

Image-to-video (first frame)

HELPCODEESCAPE-bash
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"
}'

Image-to-video (first and last frames)

HELPCODEESCAPE-bash
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"
}'

Response

output.status of PENDING means deployment is in progress.

HELPCODEESCAPE-json
{
    "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"
    }
}

Next step: Query deployment status and wait for status to become RUNNING.

Query deployment status

Check if a deployed model is ready. Poll until status is RUNNING.

Deployment takes 5--10 minutes.

Request

HELPCODEESCAPE-http
GET https://dashscope-intl.aliyuncs.com/api/v1/deployments/{deployed_model}
ParameterLocationTypeRequiredDescriptionExample
deployed_modelPathstringYesDeployed model ID from the deploy model response.wan2.5-i2v-preview-ft-202511111122-xxxx

Response

Same fields as the deploy model response, plus additional status values.

Deployment status values

StatusMeaning
PENDINGDeploying.
RUNNINGReady to accept requests.
ARREARS_DOWNStopped due to overdue payment.
ARREARS_RECOVERINGResuming after overdue payment.
FAILEDDeployment failed.
OFFLININGTaking service offline.
UPDATINGUpgrading or downgrading.
UPDATING_FAILEDUpgrade or downgrade failed.

Example

Replace <deployed-model> with output.deployed_model from the deploy response.

Request

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

Response

When status is RUNNING, the model is deployed and ready for requests.

HELPCODEESCAPE-json
{
    "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"
    }
}

Next step: Call the model to generate a video.

Checkpoint management

After training, list checkpoints, preview validation results, export checkpoints, and deploy them.

List checkpoints

Returns checkpoints with successful validation previews (failed checkpoints excluded).

Available only after training completes.

Request

HELPCODEESCAPE-http
GET https://dashscope-intl.aliyuncs.com/api/v1/fine-tunes/{job_id}/validation-results
ParameterLocationTypeRequiredDescriptionExample
job_idPathstringYesFine-tuning job ID.ft-202511111122-xxxx

Response

FieldTypeDescriptionExample
request_idstringRequest ID.0eb05b0c-02ba-414a-9d0c-xxxxxxxxx
outputarray[object]List of checkpoints.-
output\[\].checkpointstringCheckpoint name.checkpoint-160

Example

Request

HELPCODEESCAPE-bash
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'

Response

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

Get validation details for a checkpoint

Return validation video for a specific checkpoint.

Request

HELPCODEESCAPE-http
GET https://dashscope-intl.aliyuncs.com/api/v1/fine-tunes/{job_id}/validation-details/{checkpoint}?page_no=1&page_size=10
ParameterLocationTypeRequiredDescriptionExample
job_idPathstringYesFine-tuning job ID.ft-202511111122-xxxx
checkpointPathstringYesCheckpoint name.checkpoint-160
page_noQueryintegerNoPage number. Default: 1.1
page_sizeQueryintegerNoResults per page. Default: 10.10

Response

FieldTypeDescriptionExample
request_idstringRequest ID.375b3ad0-d3fa-451f-b629-xxxxxxx
output.page_nointegerPage number.1
output.page_sizeintegerResults per page.10
output.totalintegerTotal validation entries.1
output.list\[\].video_pathstringVideo URL (valid 24 hours---download promptly).https://finetune-swap-wulanchabu.oss-cn-wulanchabu.aliyuncs.com/xxx.mp4?Expires=xxxx
output.list\[\].promptstringPrompt from the data.jsonl annotation file.The video begins with a young man...
output.list\[\].first_frame_pathstringValidation image URL.https://finetune-swap-wulanchabu.oss-cn-wulanchabu.aliyuncs.com/xxx.jpeg

Example

Request

HELPCODEESCAPE-bash
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"

Response

Download within 24 hours before video_path expires.

HELPCODEESCAPE-json
{
    "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"
            }
        ]
    }
}

Export a checkpoint

Export a checkpoint as a deployable model.

Request

HELPCODEESCAPE-http
GET https://dashscope-intl.aliyuncs.com/api/v1/fine-tunes/{job_id}/export/{checkpoint}?model_name={model_name}
ParameterLocationTypeRequiredDescriptionExample
job_idPathstringYesFine-tuning job ID.ft-202511111122-xxxx
checkpointPathstringYesCheckpoint name.checkpoint-160
model_nameQuerystringYesConsole display name (must be globally unique). Use Chinese characters, letters, digits, underscores, or hyphens. For deployment, use output\[\].model_name from the exported model details response.my-checkpoint-160

Response

FieldTypeDescriptionExample
request_idstringRequest ID.0eb05b0c-02ba-414a-9d0c-xxxxxxxxx
outputbooleantrue: request submitted; false: failed (retry).true

Example

Request

HELPCODEESCAPE-bash
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"

Response

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

Next step: Get exported model details to retrieve the model_name for deployment.

Get exported model details

Return export status and model_name for deployment.

Request

HELPCODEESCAPE-http
GET https://dashscope-intl.aliyuncs.com/api/v1/fine-tunes/{job_id}/checkpoints
ParameterLocationTypeRequiredDescriptionExample
job_idPathstringYesFine-tuning job ID.ft-202511111122-xxxx

Response

FieldTypeDescriptionExample
request_idstringRequest ID.0eb05b0c-02ba-414a-9d0c-xxxxxxxxx
outputarray[object]Checkpoint details.-
output\[\].create_timestringCreation time.2025-11-11T13:27:29
output\[\].job_idstringFine-tuning job ID.ft-202511111122-xxxx
output\[\].checkpointstringCheckpoint name.checkpoint-160
output\[\].full_namestringFull checkpoint ID.ft-202511111122-496e-checkpoint-160
output\[\].model_namestringModel name for deployment (returned when status is SUCCEEDED).wan2.5-i2v-preview-ft-202511111122-xxxx-c160
output\[\].model_display_namestringDisplay name.wan2.5-i2v-preview-ft-202511111122-xxxx
output\[\].statusstringExport status. See below.SUCCEEDED

Export status values

StatusMeaning
PENDINGQueued for export.
PROCESSINGExporting.
SUCCEEDEDExport completed.
FAILEDExport failed.
UNSUPPORTEDExport not supported.

Example

Request

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

Response

When target checkpoint status is SUCCEEDED, save its model_name for deployment.

HELPCODEESCAPE-json
{
    "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"
        }
    ]
}

Deploy and call an exported checkpoint

After exporting a checkpoint and getting its model_name:

  1. Deploy the model -- pass the exported model_name as the model_name parameter.

  2. Query deployment status -- wait for RUNNING.

  3. Call the model to generate a video.

Fine-tuning job management

Query job logs

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

Request

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

Response

HELPCODEESCAPE-json
{
    "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##"
        ]
    }
}

List fine-tuning jobs

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

Request

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

Response

HELPCODEESCAPE-json
{
    "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
            }
        ]
    }
}

Cancel a fine-tuning job

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

Request

HELPCODEESCAPE-bash
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'

Response

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

Delete a fine-tuning job

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

Request

HELPCODEESCAPE-bash
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'

Response

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

Deployed model management

Delete a deployed model

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

Important

Immediately takes model offline (cannot be undone). Model becomes unavailable and billing stops.

Request

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

Response

status: DELETING confirms deletion accepted.

HELPCODEESCAPE-json
{
    "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"
    }
}

Verify deletion by querying status. NotFound confirms removal:

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

Mirror of Alibaba Cloud Model Studio docs for reference and RAG. Not affiliated with Alibaba Cloud.