All Products
Search
Document Center

Alibaba Cloud Model Studio:Video generation model fine-tuning API reference

Last Updated:Dec 22, 2025

This document provides the API reference for fine-tuning the Wan image-to-video model.

Availability

Upload a dataset

API description: This API uploads a local dataset in .zip format to Alibaba Cloud Model Studio and returns a unique file ID (id).

Request endpoint

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

Request parameters

Field

Parameter passing

Type

Required

Description

Example

file

Body (form-data)

file

Yes

The local dataset file in .zip format.

When you pass the parameter, use the format files=@"<file_path>". The path can be relative or absolute.

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

purpose

Body (form-data)

string

Yes

The value is fixed to fine-tune for fine-tuning jobs.

fine-tune

Response parameters

Field

Type

Description

Example

id

string

The file ID. The unique identifier of the file on the platform. This is used to create a fine-tuning job.

file-ft-b2416bacc4d742xxxx

object

string

The upload type.

file

bytes

integer

The number of bytes in the uploaded file.

73310369

filename

string

The filename.

wan-i2v-training-dataset.zip

purpose

string

The task purpose. The value is fixed to fine-tune for fine-tuning jobs.

fine-tune

status

string

The status of the uploaded file.

processed indicates that the file was uploaded successfully.

processed

created_at

integer

The creation time. The format is a UNIX timestamp.

1766127125

Request example

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 example

Copy and save the id. This is the unique identifier for the uploaded dataset.

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

Create a fine-tuning job

API description: This API starts a model fine-tuning job based on a specified base model and an uploaded dataset.

Request endpoint

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

Request parameters

Field

Parameter passing

Type

Required

Description

Example

model

Body

string

Yes

The base model to use for fine-tuning.

The following image-to-video models are supported:

  • wan2.5-i2v-preview

wan2.5-i2v-preview

training_file_ids

Body

array[string]

Yes

An array of file IDs for the training dataset. You can pass multiple IDs.

["file-ft-b2416bacc4d742xxxx"]

validation_file_ids

Body

array[string]

No

An array of file IDs for the validation set. You can pass multiple IDs.

If you do not provide this parameter, the system automatically splits the training dataset.

-

training_type

Body

string

Yes

The fine-tuning type. Currently, only efficient_sft (LoRA efficient fine-tuning) is supported.

efficient_sft

hyper_parameters

Body

object

No

Hyperparameter settings.

See the table below

Hyperparameters (hyper_parameters)

For the first training run, use the default hyperparameters. If the model performance is poor or the training does not converge, adjust parameters such as n_epochs or learning_rate.

Field

Type

Required

Description

Default

batch_size

int

No

Batch size.

The number of data entries sent to the model for training at one time.

  • wan2.5-i2v-preview: The recommended value is fixed at 2.

wan2.5: 2

n_epochs

int

No

Number of training epochs.

The total number of training steps (steps) is determined by the number of epochs (n_epochs), dataset size, and batch size (batch_size). The formula is: steps = n_epochs × ceiling(dataset size / batch_size).

To ensure the model is fully trained, the total number of training steps should be at least 800. The recommended minimum number of epochs can be estimated with this formula: n_epochs = 800 / ceiling(dataset size / batch_size).

For example: If the dataset has 5 entries and batch_size is 2, the number of steps per epoch is ceiling(5/2) = 3. The minimum recommended number of epochs is n_epochs = 800 / 3 ≈ 267. This is a minimum value. You can increase it as needed.

400

learning_rate

float

No

Learning rate. Controls the magnitude of model weight updates.

A rate that is too high may degrade the model. A rate that is too low may result in insignificant changes. Use the default value.

2e-5

split

float

No

Training set split ratio. The value must be in the range (0, 1].

This parameter takes effect only when validation_file_ids is not specified.

This parameter automatically splits the training set into a training set and a validation set. For example, a value of 0.9 means 90% for training and 10% for validation. The final size of the validation set is also limited by max_split_val_dataset_sample.

0.9

max_split_val_dataset_sample

int

No

Maximum number of samples for the auto-split validation set. The value must be ≥1.

This parameter takes effect only when validation_file_ids is not specified.

This parameter sets an upper limit on the size of the validation set. The formula is:

Validation set size = min(Total dataset size × (1 − split), max_split_val_dataset_sample)

For example: If a dataset has 100 entries, split is 0.9 (meaning 10% for validation), and max_split_val_dataset_sample is 5, the calculated validation set size is 10 (100 × 0.1). However, because the upper limit is 5, only 5 entries are used for the validation set.

5

eval_epochs

int

No

Validation interval. The value must be ≥10.

During training, a validation evaluation is performed every specified number of epochs to assess the model's performance at different stages.

20

max_pixels

int

No

Maximum resolution for training videos.

Sets a limit on the total number of pixels (width × height) for input videos in the training set. The system only scales videos that exceed this value. Videos within the limit remain unchanged.

  • wan2.5-i2v-preview: Default is 36864. Value range: 16384 (128×128) to 36864 (192×192).

wan2.5: 36864

save_total_limit

int

No

Checkpoint save limit.

Limits the maximum number of checkpoints to save. The system saves only the last N checkpoints generated during training, where N is the value of this parameter.

20

lora_rank

int

No

Dimension of the LoRA low-rank matrix. Use the default value.

This value determines the number of fine-tuning parameters. A larger value improves the model's fitting ability but slows down training.

The value must be a power of 2 (such as 16, 32, or 64).

32

lora_alpha

int

No

Scaling factor for LoRA weights. Use the default value.

This parameter adjusts the influence of the fine-tuned parameters on the original model weights. It is typically used with lora_rank.

The value must be a power of 2 (such as 16, 32, or 64).

32

Response parameters

Field

Type

Description

Example

request_id

string

The unique identifier of the request.

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

output

object

Job details.

-

output.job_id

string

The unique identifier of the model fine-tuning job. This is used to query the job status later.

ft-202511111122-xxxx

output.job_name

string

The name of the model fine-tuning job.

ft-202511111122-xxxx

output.status

string

The status of the fine-tuning job:

  • PENDING: The job is waiting to start.

  • QUEUING: The job is in the queue. Only one training job can run at a time.

  • RUNNING: The job is in progress.

  • CANCELING: The job is being canceled.

  • SUCCEEDED: The job succeeded.

  • FAILED: The job failed.

  • CANCELED: The job was canceled.

PENDING

output.finetuned_output

string

The name of the new model produced after fine-tuning. This is required for deployment and calling.

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

output.model

string

The base model used.

wan2.5-i2v-preview

output.base_model

string

The base model used.

wan2.5-i2v-preview

output.training_file_ids

array

A list of file IDs for the training dataset used.

["file-ft-b2416bacc4d742xxxx"]

output.validation_file_ids

array

A list of file IDs for the validation set used. If no validation set was uploaded, this is an empty list.

[]

output.hyper_parameters

object

The hyperparameters actually used.

{...}

output.training_type

string

The training method for model fine-tuning. The value is fixed to efficient_sft.

efficient_sft

output.create_time

string

The time the task was created.

2025-11-11 11:22:22

output.workspace_id

string

The ID of the workspace to which the Model Studio API key belongs.

For more information, see Get a Workspace ID.

llm-xxxxxxxxx

output.user_identity

string

The user identity, which is the Alibaba Cloud account ID.

12xxxxxxx

output.modifier

string

The Alibaba Cloud account ID of the user who made the modification.

12xxxxxxx

output.creator

string

The Alibaba Cloud account ID of the creator.

12xxxxxxx

output.group

string

The group of the model fine-tuning job.

llm

output.max_output_cnt

integer

The maximum number of checkpoints to save during training.

This is equivalent to the value of the hyperparameter save_total_limit.

20

Request example

Replace <file_id_of_your_training_set> with the file ID that you retrieved when you uploaded the dataset.

Wan2.5 model

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":[
        "<file_id_of_your_training_set>"
    ],
    "training_type":"efficient_sft",
    "hyper_parameters":{
        "n_epochs":400,
        "batch_size":2,
        "learning_rate":2e-5,
        "split":0.9,
        "eval_epochs": 20,
        "max_pixels": 36864
    }
}'

Upload multiple training and validation sets

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":[
        "<file_id_of_training_set_1>",
        "<file_id_of_training_set_2>"
    ],
    "validation_file_ids":[
         "<file_id_of_validation_set_1>",
         "<file_id_of_validation_set_2>"
    ],
    "training_type":"efficient_sft",
    "hyper_parameters":{
        "n_epochs":400,
        "batch_size":2,
        "learning_rate":2e-5,
        "split":0.9,
        "eval_epochs": 20,
        "max_pixels": 36864
    }
}'

Response example

Take note of the following two parameters: output.job_id, which is the job ID, and output.finetuned_output, which is the name of the new model created by the fine-tuning process.

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

Query the status of a fine-tuning job

API description: This API queries the progress of a fine-tuning job using its job_id. You can poll this endpoint until the job status changes to SUCCEEDED, which indicates that the model training is complete.

Note

The fine-tuning job in this example takes several hours to complete. The exact duration depends on the base model.

Request endpoint

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

Request parameters

Field

Parameter passing

Type

Required

Description

Example

job_id

Path parameter

string

Yes

The fine-tuning job ID.

ft-202511111122-xxxx

Response parameters

Field

Type

Description

Example

request_id

string

The unique identifier of the request.

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

output

object

Job details.

-

output.job_id

string

The unique identifier of the model fine-tuning job. This is used to query the job status later.

ft-202511111122-xxxx

output.job_name

string

The name of the model fine-tuning job.

ft-202511111122-xxxx

output.status

string

The status of the fine-tuning job.

  • PENDING: The job is waiting to start.

  • QUEUING: The job is in the queue. Only one training job can run at a time.

  • RUNNING: The job is in progress.

  • CANCELING: The job is being canceled.

  • SUCCEEDED: The job succeeded.

  • FAILED: The job failed.

  • CANCELED: The job was canceled.

PENDING

output.finetuned_output

string

The name of the new model produced after fine-tuning.

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

output.model

string

The base model used.

wan2.5-i2v-preview

output.base_model

string

The base model used.

wan2.5-i2v-preview

output.training_file_ids

array

A list of file IDs for the training dataset used.

["file-ft-b2416bacc4d742xxxx"]

output.validation_file_ids

array

A list of file IDs for the validation set used. If no validation set was uploaded, this is an empty list.

[]

output.hyper_parameters

object

The hyperparameters actually used.

{...}

output.training_type

string

The training method for model fine-tuning. The value is fixed to efficient_sft.

efficient_sft

output.create_time

string

The time the fine-tuning job was created.

2025-11-11 11:22:22

output.end_time

string

The time the fine-tuning job was completed.

2025-11-11 16:49:01

output.workspace_id

string

The ID of the workspace to which the Model Studio API key belongs.

For more information, see Get a Workspace ID.

llm-xxxxxxxxx

output.user_identity

string

The user identity, which is the Alibaba Cloud account ID.

12xxxxxxx

output.modifier

string

The Alibaba Cloud account ID of the user who made the modification.

12xxxxxxx

output.creator

string

The Alibaba Cloud account ID of the creator.

12xxxxxxx

output.group

string

The group of the model fine-tuning job.

llm

output.max_output_cnt

integer

The maximum number of checkpoints to save.

This is equivalent to the value of the hyperparameter save_total_limit.

20

output.output_cnt

integer

The actual number of saved checkpoints.

This value is less than or equal to output.max_output_cnt.

20

output.usage

integer

The total number of tokens consumed for training. This is used for model training billing.

432000

Request example

Replace <your_fine-tuning_job_id> in the URL with the job_id value from the Create a fine-tuning job response.

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

Response example

Take note of the following two parameters: output.status, where a status of SUCCEEDED indicates that the training is complete, and output.usage, which is the total number of tokens consumed for training.

{
    "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": 20
        },
        "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": 20,
        "output_cnt": 20
    }
}

Deploy the model

API description: This API is used to deploy a trained model as an online service. Before you call this API, query the status of a fine-tuning job to ensure that the job status is SUCCEEDED.

Request endpoint

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

Request parameters

Field

Parameter passing

Type

Required

Description

Example

model_name

Body

string

Yes

The name of the model to deploy.

  • To deploy a model generated by a fine-tuning job: Use the value of the output.finetuned_output parameter from the response of the Create a fine-tuning job operation.

  • Deployment of an exported model: Enter the value of the output[].model_name response parameter from Query exported model details.

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

capacity

Body

integer

Yes

The number of model instances to deploy. The recommended value is 1.

1

plan

Body

string

Yes

The deployment method. The value is fixed to lora for LoRA efficient fine-tuning.

lora

aigc_config

Body

object

Yes

AIGC-specific configuration.

-

aigc_config.prompt

Body

string

Yes

A preset prompt template.

The model combines this template with the input image to automatically generate a video description that includes specific effects.
Note: After you configure this parameter, the template has the highest priority. The prompt parameter passed in the model calling API will no longer take effect.

Provide a video description based on the image content...

For more information, see Request example

aigc_config.lora_prompt_default

Body

string

Yes

The default fallback prompt.

If generation fails when using aigc_config.prompt, this parameter is used to generate the video.

Then, the s86b5p money rain effect begins...

For more information, see Request example

Description of the aigc_config.prompt parameter

  • Why should you set this parameter?

    If you do not set this parameter, you must provide a complete prompt for each model call. If you set this parameter, you only need to upload an image when you call the fine-tuned model. The system then automatically generates the prompt based on this parameter, which eliminates the need for manual input.

  • How to configure

    Prompt = Task instruction (describes the task for the model) + Output template (specifies the output format) + Example (provides a sample structure for the model to follow).

    Provide a video description based on the image content. The description must include "Then, the s86b5p money rain effect begins. Countless large USD bills (beige with dark green patterns) pour down like a storm, densely hitting and surrounding him/her. The bills continue to fall as the camera slowly zooms in. He/She stretches his/her arms upward, neck slightly tilted back, with a surprised expression, fully immersed in this wild money rain".
    Output template:
    The video begins by showing [entity description]. [background description]. Then, the s86b5p money rain effect begins. Countless large USD bills (beige with dark green patterns) pour down like a storm, densely hitting and surrounding him/her. The bills continue to fall as the camera slowly zooms in. He/She stretches his/her arms upward, neck slightly tilted back, with a surprised expression, fully 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 crashing waves and distant mountains. Then, the s86b5p money rain effect begins. Countless large USD bills (beige with dark green patterns) pour down like a storm, 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, fully immersed in this wild money rain.
    For more information about the output template, see Video annotation: Write a prompt for a video.

Response parameters

Field

Type

Description

Example

request_id

string

The unique identifier of the request.

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

output

object

Job details.

-

output.deployed_model

string

The unique identifier of the deployed model.

The unique identifier of the deployed model. This is used to query the model deployment status and call the model.

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

output.model_name

string

The model identifier.

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

output.status

string

The deployment status:

  • PENDING: Deploying

  • RUNNING: Running

  • FAILED: Deployment failed

PENDING

output.base_model

string

The base model used.

wan2.5-i2v-preview

output.gmt_create

string

The time the deployment task was created.

2025-11-11T17:46:53.294

output.gmt_modified

string

The time the deployment task was updated.

2025-11-11T17:46:53.294

output.workspace_id

string

The ID of the workspace to which the Model Studio API key belongs.

For more information, see Get a Workspace ID.

llm-xxxxxxxxx

output.charge_type

string

The billing method. post_paid indicates pay-as-you-go.

post_paid

output.creator

string

The Alibaba Cloud account ID of the creator.

12xxxxxxx

output.modifier

string

The Alibaba Cloud account ID of the user who made the modification.

12xxxxxxx

output.plan

string

The deployment method.

lora

Request example

Replace <your_model_name> with the finetuned_output value from the Create a fine-tuning job response.

curl --location 'https://dashscope-intl.aliyuncs.com/api/v1/deployments' \
--header "Authorization: Bearer $DASHSCOPE_API_KEY" \
--header 'Content-Type: application/json' \
--data '{
    "model_name": "<your_model_name>",
    "aigc_config": {
        "prompt": "Provide a video description based on the image content. The description must include \"Then, the s86b5p money rain effect begins. Countless large USD bills (beige with dark green patterns) pour down like a storm, densely hitting and surrounding him/her. The bills continue to fall as the camera slowly zooms in. He/She stretches his/her arms upward, neck slightly tilted back, with a surprised expression, fully immersed in this wild money rain\".\nOutput template:\nThe video begins by showing [entity description] [background description]. Then, the s86b5p money rain effect begins. Countless large USD bills (beige with dark green patterns) pour down like a storm, densely hitting and surrounding him/her. The bills continue to fall as the camera slowly zooms in. He/She stretches his/her arms upward, neck slightly tilted back, with a surprised expression, fully immersed in this wild money rain.\nExample:\nThe 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 crashing waves and distant mountains. Then, the s86b5p money rain effect begins. Countless large USD bills (beige with dark green patterns) pour down like a storm, 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, fully immersed in this wild money rain.",
        "lora_prompt_default": "Then, the s86b5p money rain effect begins. Countless large USD bills (beige with dark green patterns) pour down like a storm, densely hitting and surrounding the main character. The bills continue to fall as the camera slowly zooms in. The main character stretches their arms upward, neck slightly tilted back, with a surprised expression, fully immersed in this wild money rain."
    },
    "capacity": 1,
    "plan": "lora"
}'

Response example

Pay attention to the following two parameters in the response: output.deployed_model (the unique identifier of the deployed model) and output.status (a status of PENDING indicates that the model is being deployed).

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

Query the model deployment status

API description: Poll this endpoint until the task status changes to RUNNING. This status indicates that the model is successfully deployed.

Note

The deployment process for the fine-tuned model in this example is expected to take 5 to 10 minutes.

Request endpoint

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

Request parameters

Field

Parameter passing

Type

Required

Description

Example

deployed_model

Path parameter

string

Yes

The unique identifier of the deployed model.

Use the value of the output.deployed_model parameter from the response of the Deploy the model operation.

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

Response parameters

Field

Type

Description

Example

request_id

string

The unique identifier of the request.

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

output

object

Job details.

-

output.deployed_model

string

The unique identifier of the deployed model. This is used for subsequent model calls.

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

output.model_name

string

The model identifier.

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

output.status

string

The deployment status:

  • PENDING: Deploying

  • RUNNING: Running

  • ARREARS_DOWN: Service stopped due to overdue payment

  • ARREARS_RECOVERING: Recovering from service stop due to overdue payment

  • FAILED: Deployment failed

  • OFFLINING: Service is being taken offline

  • UPDATING: Upgrading or downgrading

  • UPDATING_FAILED: Upgrade or downgrade failed

RUNNING

output.base_model

string

The base model used.

wan2.5-i2v-preview

output.gmt_create

string

The time the deployment task was created.

2025-11-11T17:46:53.294

output.gmt_modified

string

The time the deployment task was updated.

2025-11-11T18:02:2

output.workspace_id

string

The ID of the workspace to which the Model Studio API key belongs.

For more information, see Get a Workspace ID.

llm-xxxxxxxxx

output.charge_type

string

The billing method. post_paid indicates pay-as-you-go.

post_paid

output.creator

string

The Alibaba Cloud account ID of the creator.

12xxxxxxx

output.modifier

string

The Alibaba Cloud account ID of the user who made the modification.

12xxxxxxx

output.plan

string

The deployment method.

lora

Request example

Replace <your_deployed_model> with the value of the output.deployed_model parameter from the Deploy the model response.

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

Response example

Check the status field. When the status changes to RUNNING, the model is successfully deployed and ready to be called.

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

Call the model to generate a video

For more information, see Call the model to generate a video.

Checkpoint management

1. Query the checkpoint list

API description: Retrieves a list of checkpoints that have successfully generated preview videos from the validation set. The list does not include checkpoints that failed validation.

Limitation: Call this API after the model fine-tuning is complete. Otherwise, an empty list is returned.

Request endpoint

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

Request parameters

Field

Parameter passing

Type

Required

Description

Example

job_id

Path parameter

string

Yes

The fine-tuning job ID.

ft-202511111122-xxxx

Response parameters

Field

Type

Description

Example

request_id

string

The unique identifier of the request.

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

output

array[string]

A list of checkpoints.

-

output[].checkpoint

string

The checkpoint name.

checkpoint-160

Request example

Replace <your_fine-tuning_job_id> in the URL with the job_id value from the Create a fine-tuning job response.

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

Response example

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

2. Query checkpoint validation results

API description: Retrieves the video generated by a specific checkpoint, such as "checkpoint-160".

Request endpoint

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

Request parameters

Field

Parameter passing

Type

Required

Description

Example

job_id

Path parameter

string

Yes

The fine-tuning job ID.

ft-202511111122-xxxx

checkpoint

Path parameter

string

Yes

The checkpoint name.

checkpoint-160

page_no

Query parameter

integer

No

The page number. Default is 1.

1

page_size

Query parameter

integer

No

The number of entries per page. Default is 10.

10

Response parameters

Field

Type

Description

Example

request_id

string

The unique identifier of the request.

375b3ad0-d3fa-451f-b629-xxxxxxx

output

object

The output result.

-

output.page_no

integer

The page number.

1

output.page_size

integer

The number of entries per page.

10

output.total

integer

The total number of items in the validation set list.

1

output.list

array[object]

A list of validation sets.

-

output.list[].video_path

string

The video generated by the checkpoint.

The video_path is valid for 24 hours. Download the video promptly.

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

output.list[].prompt

string

The prompt for the validation data. This is obtained from the data.jsonl annotation file in the dataset.

The video begins by showing a young man sitting in a cafe...

output.list[].first_frame_path

string

The URL of the validation image. The system reads the image from the dataset and generates a public URL.

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

Request example

  • <your_fine-tuning_job_id>: Replace this with the value of the job_id parameter from the Create a fine-tuning job response.

  • <your_selected_checkpoint>: Replace this with the name of the selected checkpoint, such as "checkpoint-160".

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

Response example

The video_path is valid for 24 hours. Download the video before it expires.
{
    "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 by showing a young man sitting in a cafe. He is wearing a beige Polo shirt, looking focused and slightly contemplative, with his fingers gently supporting his chin. A cup of hot coffee is placed in front of him, and the background features a striped wooden wall and a decorative sign. Then, the s86b5p money rain effect begins. Countless large USD bills (beige with dark green patterns) pour down like a storm, densely hitting and surrounding him. The bills continue to fall as he stretches his arms upward, neck slightly tilted back, with a surprised expression, fully immersed in this wild money rain.",
                "first_frame_path": "https://finetune-swap-wulanchabu.oss-cn-wulanchabu.aliyuncs.com/xxx.jpeg"
            }
        ]
    }
}

3. Export a checkpoint

API description: Exports a checkpoint as a deployable model.

Request endpoint

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

Request parameters

Field

Parameter passing

Type

Required

Description

Example

job_id

Path parameter

string

Yes

The fine-tuning job ID.

ft-202511111122-xxxx

checkpoint

Path parameter

string

Yes

The checkpoint name.

checkpoint-160

model_name

Query parameter

string

Yes

The name of the exported model to be displayed in the console.

The name must be globally unique. We recommend that you use Chinese and English characters, numbers, underscores (_), and hyphens (-).

Note: This parameter is for display in the console only. The actual name of the exported model is determined by the Query exported model details response parameter output[].model_name.

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

Response parameters

Field

Type

Description

Example

request_id

string

The unique identifier of the request.

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

output

boolean

Indicates whether the export request was submitted successfully.

  • true: The request was submitted successfully.

  • false: The request failed to submit. Try again.

true

Request example

  • <your_fine-tuning_job_id>: Replace this with the value of the job_id parameter from the Create a fine-tuning job response.

  • <checkpoint_to_export>: Replace this with the name of the checkpoint, such as "checkpoint-160".

  • <display_name_for_exported_model>: Replace this with a custom model name for display in the console.

curl --location 'https://dashscope-intl.aliyuncs.com/api/v1/fine-tunes/<your_fine-tuning_job_id>/export/<checkpoint_to_export>?model_name=<display_name_for_exported_model>' \
--header "Authorization: Bearer $DASHSCOPE_API_KEY"

Response example

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

4. Query the details of an exported model

API description: Queries the status of a checkpoint export operation. You can use this operation to confirm that the export is complete and to obtain the unique model name (model_name) for deployment.

Request endpoint

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

Request parameters

Field

Parameter passing

Type

Required

Description

Example

job_id

Path parameter

string

Yes

The fine-tuning job ID.

ft-202511111122-xxxx

Response parameters

Field

Type

Description

Example

request_id

string

The unique identifier of the request.

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

output

array[object]

Details of the checkpoint list.

-

output[].create_time

string

The creation time.

2025-11-11T13:27:29

output[].job_id

string

The fine-tuning job ID.

ft-202511111122-xxxx

output[].checkpoint

string

The checkpoint name.

checkpoint-160

output[].full_name

string

The full name identifier of the checkpoint.

ft-202511111122-496e-checkpoint-160

output[].model_name

string

The name of the exported model. This is used for model deployment and calling.

This parameter is returned when the status is SUCCEEDED.

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

output[].model_display_name

string

The display name of the model.

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

output[].status

string

Model export status:

  • PENDING: In queue

  • PROCESSING: Exporting

  • SUCCEEDED: Export successful

  • FAILED: Export failed

  • UNSUPPORTED: Export is not supported

SUCCEEDED

Request example

Replace <your_fine-tuning_job_id> with the job_id from the Create a fine-tuning job response.

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

Response example

In the returned list, locate the target checkpoint, such as checkpoint-160. When its status changes to SUCCEEDED, the export is successful. Make sure to obtain and save the model_name, which is the unique identifier for subsequent model deployment and calls.

{
    "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" // A checkpoint that has not been exported does not have a model_name field.
        },
        {
            "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", // Important field, used for model deployment and calling.
            "model_display_name": "wan2.5-i2v-preview-ft-202511111122-xxxx", 
            "status": "SUCCEEDED" // A successfully exported checkpoint.
        },
        ......
        
    ]
}

5. Deploy and call the model

After you successfully export a checkpoint and obtain its model_name, perform the following steps:

Fine-tuning job management

Query fine-tuning job logs

Request example

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

Response example

{
    "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 !",
            " Actual number of consumed tokens is 829440 !",
            " Actual number of consumed tokens is 1034240 !",
            " Actual number of consumed tokens is 1239040 !",
            " Actual number of consumed tokens is 1443840 !",
            " Actual number of consumed tokens is 1648640 !",
            " Actual number of consumed tokens is 1853440 !",
            " Actual number of consumed tokens is 2058240 !",
            " Actual number of consumed tokens is 2263040 !",
            " Actual number of consumed tokens is 2467840 !",
            " Actual number of consumed tokens is 2672640 !",
            " Actual number of consumed tokens is 2877440 !",
            " Actual number of consumed tokens is 3082240 !",
            " Actual number of consumed tokens is 3287040 !",
            " Actual number of consumed tokens is 3491840 !",
            " Actual number of consumed tokens is 3696640 !",
            " Actual number of consumed tokens is 3901440 !",
            "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##"
        ]
    }
}

Query the list of fine-tuning jobs

Request example

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

Response example

{
    "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": 20
                },
                "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": 20,
                "output_cnt": 20
            }
        ]
    }
}

Cancel a fine-tuning job

Request example

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

Response example

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

Delete a fine-tuning job

Request example

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

Response example

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