Video and image generation model fine-tuning API

更新时间:
复制 MD 格式

You can fine-tune the Wan image-to-video model and image generation model using the Model Studio API. This guide details all API operations in the fine-tuning workflow, from dataset upload to model deployment.

Prerequisites

Upload a dataset

API description: The operation returns a unique file ID (file_id) to use for subsequent tasks, such as creating a fine-tuning job.

Note
  • The maximum size for a .zip file uploaded via the API is 1 GB.

  • For batch uploads, see the Upload File API.

Request URL

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

Request parameters

Parameter

Parameter location

Type

Required

Description

Example

files

Body (form-data)

file

Yes

The local dataset file in .zip format.

When you pass parameters, you must use the format files=@"<file path>". The path can be a relative or an absolute path.

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

purpose

Body (form-data)

string

Yes

For a fine-tuning task, set this to fine-tune.

fine-tune

descriptions

Body (form-data)

string

No

A description of the dataset.

a fine-tune training data file for wan

Response fields

Field

Type

Description

Example

request_id

string

The unique request ID.

1f3f1c5b-7418-4976-aaea-xxxxxx

data

object

The response data object.

-

data.uploaded_files

array

A list of successfully uploaded files.

-

data.uploaded_files[].file_id

string

The unique identifier for the file, used to create a fine-tuning job.

3bff1ef7-f72d-4285-bb75-xxxxxx

data.uploaded_files[].name

string

The name of the file.

wan-i2v-training-dataset.zip

data.failed_uploads

array

A list of files that failed to upload.

[]

Request example

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

Response example

Copy and save the file_id, which is the unique identifier for your uploaded dataset.

{
    "data": {
        "uploaded_files": [
            {
                "name": "wan-i2v-training-dataset.zip",
                "file_id": "3bff1ef7-f72d-4285-bb75-xxxxxx"
            }
        ],
        "failed_uploads": []
    },
    "request_id": "1f3f1c5b-7418-4976-aaea-xxxxxx"
}

Create a fine-tuning job

API: Starts a model fine-tuning task with a base model and a dataset.

API request

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

Input parameters

Parameter

Location

Type

Required

Description

Example value

model

Body

string

Yes

Specifies the base model to use for fine-tuning.

  • Image-to-video (from first frame):

    • wan2.5-i2v-preview

    • wan2.2-i2v-flash

  • Image-to-video (from first and last frames):

    • wan2.2-kf2v-flash

  • Image generation (text-to-image/image-to-image):

    • wan2.7-image-pro

wan2.7-i2v

training_file_ids

Body

array[string]

Yes

An array of file IDs for the training set.

["3bff1ef7-f72d-4285-bb75-xxxxxx"]

validation_file_ids

Body

array[string]

No

An array of file IDs for the validation set.

If not provided, the system automatically creates a validation set by splitting the training set.

-

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 tables below

Hyperparameters (hyper_parameters)

For your first training job, we recommend using the default values. Because hyperparameters vary by model, be sure to select the configuration that matches your base model.

Video generation models

If the model performs poorly or fails to converge, consider adjusting parameters such as n_epochs or learning_rate.

Parameter

Type

Required

Description

Recommended value

batch_size

int

Yes

batch size.

The number of data samples to process in a single training iteration.

  • wan2.5-i2v-preview: Recommended value is 2.

  • wan2.2-i2v-flash: Recommended value is 4.

  • wan2.2-kf2v-flash: Recommended value is 4.

Varies by model

n_epochs

int

Yes

Number of epochs.

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

To ensure the model is fully trained, we recommend a minimum of 800 total training steps. You can estimate the minimum required number of epochs using this formula: n_epochs = 800 / ceil(dataset_size / batch_size).

For example: If your dataset has 5 samples and the batch_size is 2, the number of steps per epoch is ceil(5/2) = 3. The minimum recommended n_epochs would be 800 / 3 ≈ 267. This is a minimum; you can increase it as needed.

400

learning_rate

float

Yes

learning rate. Controls the magnitude of model weight updates.

A value that is too high can degrade model performance, while a value that is too low may result in insignificant changes.

2e-5

eval_epochs

int

Yes

validation interval. The value must be ≥ n_epochs/10.

Specifies how often (in epochs) to evaluate the model on the validation set during training.

50

max_pixels

int

Yes

Maximum resolution for training videos.

Sets the maximum resolution (width × height) for videos in the training set. Videos exceeding this limit are scaled down, while smaller videos remain unchanged.

  • wan2.5-i2v-preview: Recommended 36864. Range: 16384 (128×128) to 36864 (192×192).

  • wan2.2-i2v-flash: Recommended 262144. Range: 65536 (256×256) to 262144 (512×512).

  • wan2.2-kf2v-flash: Recommended 262144. Range: 65536 (256×256) to 262144 (512×512).

Varies by model

split

float

No

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

This parameter applies only if validation_file_ids is not provided.

This parameter automatically splits a portion of the training set to be used as a validation set. For example, a value of 0.9 means 90% of the data is used for training and 10% for validation. The final size of the validation set is also constrained by max_split_val_dataset_sample.

0.9

max_split_val_dataset_sample

int

No

Maximum number of validation samples to split from the training set. The value must be ≥ 1.

This parameter applies only if validation_file_ids is not provided.

This parameter sets an upper limit on the size of the validation set, calculated as follows:

validation_set_size = min(total_dataset_size × (1 − split), max_split_val_dataset_sample)

For example: If a dataset has 100 samples, split is 0.9 (reserving 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 samples will be used for validation.

5

save_total_limit

int

No

Checkpoint save limit.

The maximum number of model checkpoints to save. The system keeps only the N most recent checkpoints, where N is this value.

10

lora_rank

int

No

LoRA rank.

The rank (dimension) of the LoRA low-rank matrices. This value determines the number of trainable parameters for fine-tuning. A larger value increases the model's fitting capability but slows down training.

The value must be a power of 2 (e.g., 16, 32, 64).

32

lora_alpha

int

No

LoRA alpha.

The scaling factor for LoRA weights. It adjusts the impact of the fine-tuned parameters on the original model weights and is typically used in conjunction with lora_rank.

The value must be a power of 2 (e.g., 16, 32, 64).

32

Image generation models

Image generation models use max_steps and eval_steps to control the total training steps and the validation interval, unlike video models which use n_epochs and eval_epochs. If the model performs poorly or fails to converge, consider adjusting max_steps or learning_rate.

Parameter

Type

Required

Description

Recommended value

max_steps

int

Yes

Total training steps. A core parameter that determines the total number of training iterations. We recommend at least 500 steps to ensure model convergence, and a higher value for larger datasets.

800

eval_steps

int

Yes

Validation interval. The value must be ≥ 0. Specifies the frequency (in steps) at which to evaluate the model during training. A checkpoint is also saved at each interval.

200

learning_rate

float

Yes

learning rate. Controls the magnitude of model weight updates. A value that is too high can degrade model performance, while a value that is too low may result in insignificant changes. We recommend using the default value.

3e-5

generation_type

string

Yes

generation mode. Use "t2i" for text-to-image or "i2i" for image-to-image. This setting determines the training data format and inference method.

t2i

max_pixels

string

Yes

Maximum resolution for training images. For example, "1k" or "2k" (1K = 1024×1024, 2K = 2048×2048). Sets an upper limit on the total number of pixels (width × height) for images in the training set. The system only scales down images that exceed this value; images below the limit remain unchanged. We recommend keeping the three resolution-related parameters (max_pixels, max_token_length, and val_img_size) consistent.

text-to-image: "2k"
image-to-image: "1k"















val_img_size

string

Yes

Validation image generation resolution. For example, "1k" or "2k" (1K = 1024×1024, 2K = 2048×2048). The target resolution for images generated during validation evaluation.

text-to-image: "2k"
image-to-image: "1k"















max_token_length

string

Yes

Maximum token length per step. For example, "1k" or "2k". This parameter, along with max_steps, controls the training process: max_steps determines the number of iterations, while max_token_length determines the amount of data processed in each step.

text-to-image: "2k"
image-to-image: "1k"















gradient_clip

float

Yes

gradient clipping. The threshold for global gradient norm clipping across all trainable parameters, used to prevent exploding gradients. Set to -1 to disable clipping.

0.5

weight_decay

float

Yes

weight decay. The decoupled weight decay coefficient for the AdamW optimizer. It applies to all trainable parameters and is used for regularization to prevent overfitting.

0.02

lora_rank

int

Yes

LoRA rank. The rank (dimension) of the LoRA low-rank matrices. This value determines the number of trainable parameters for fine-tuning. A larger value increases the model's fitting capability but slows down training. The value must be a power of 2 (e.g., 16, 32, 64).

32

lora_alpha

int

Yes

LoRA alpha. The scaling factor for LoRA weights. It adjusts the impact of the fine-tuned parameters on the original model weights and is typically used in conjunction with lora_rank. The value must be a power of 2 (e.g., 16, 32, 64).

32

save_total_limit

int

No

Checkpoint save limit. The maximum number of model checkpoints to save. The system keeps only the N most recent checkpoints, where N is this value.

10

split

float

No

Training set split ratio. The value range is (0, 1). This parameter takes effect only when validation_file_ids is not specified. This parameter is used to automatically split a portion of the training set to be used as a validation set. For example, a value of 0.9 means that 90% of the data is used as the training set and 10% is used as the validation set.

0.9

Output parameters

Parameter

Type

Description

Example value

request_id

string

The unique identifier for the request.

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

output

object

The job details.

-

output.job_id

string

The unique ID for the model fine-tuning job. Use this ID to query the job status.

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. Valid values:

  • PENDING: Waiting to start.

  • QUEUING: Queued. Only one fine-tuning job can run at a time.

  • RUNNING: In progress.

  • CANCELING: Being canceled.

  • SUCCEEDED: Completed successfully.

  • FAILED: The job failed.

  • CANCELED: Canceled.

PENDING

output.finetuned_output

string

The name of the fine-tuned model. This name is used for model deployment and inference.

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

output.model

string

See output.base_model.

wan2.5-i2v-preview

output.base_model

string

The base model used for fine-tuning.

wan2.5-i2v-preview

output.training_file_ids

array

File IDs of the training set.

["3bff1ef7-f72d-4285-bb75-xxxxxx"]

output.validation_file_ids

array

File IDs of the validation set. This field is an empty array if no validation set is provided.

[]

output.hyper_parameters

object

The hyperparameters for the job.

{...}

output.training_type

string

The fine-tuning method used. The recommended value is efficient_sft.

efficient_sft

output.create_time

string

The creation time of the job.

2025-11-11 11:22:22

output.workspace_id

string

The ID of the workspace that contains the job.

See Get a Workspace ID.

llm-xxxxxxxxx

output.user_identity

string

The Alibaba Cloud account ID of the job owner.

12xxxxxxx

output.modifier

string

The Alibaba Cloud account ID of the user who last modified the job.

12xxxxxxx

output.creator

string

The Alibaba Cloud account ID of the user who created the job.

12xxxxxxx

output.group

string

The group associated with the model fine-tuning job.

llm

output.max_output_cnt

integer

Maximum number of checkpoints to save during training.

This value is equivalent to the save_total_limit hyperparameter.

8

Request example

Replace <your-training-dataset-file-id> with the file ID from the Upload Dataset operation.

Image-to-video: First frame

Wan2.5 model

curl --location 'https://dashscope.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": [
        "<your-training-dataset-file-id>"
    ],
    "training_type": "efficient_sft",
    "hyper_parameters": {
        "n_epochs": 400,
        "batch_size": 2,
        "learning_rate": 2e-5,
        "split": 0.9,
        "max_split_val_dataset_sample": 5,
        "eval_epochs": 50,
        "max_pixels": 36864,
        "save_total_limit": 10,
        "lora_rank": 32,
        "lora_alpha": 32
    }
}'

Wan2.2 model

curl --location 'https://dashscope.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": [
        "<your-training-dataset-file-id>"
    ],
    "training_type": "efficient_sft",
    "hyper_parameters": {
        "n_epochs": 400,
        "batch_size": 4,
        "learning_rate": 2e-5,
        "split": 0.9,
        "max_split_val_dataset_sample": 5,
        "eval_epochs": 50,
        "max_pixels": 262144,
        "save_total_limit": 10,
        "lora_rank": 32,
        "lora_alpha": 32
    }
}'

Image-to-video: First and last frames

curl --location 'https://dashscope.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": [
        "<your-training-dataset-file-id>"
    ],
    "training_type": "efficient_sft",
    "hyper_parameters": {
        "n_epochs": 400,
        "batch_size": 4,
        "learning_rate": 2e-5,
        "split": 0.9,
        "max_split_val_dataset_sample": 5,
        "eval_epochs": 50,
        "max_pixels": 262144,
        "save_total_limit": 10,
        "lora_rank": 32,
        "lora_alpha": 32
    }
}'

Multiple training and validation sets

curl --location 'https://dashscope.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": [
        "<your-training-set-file-id_1>",
        "<your-training-set-file-id_2>"
    ],
    "validation_file_ids": [
         "<your-validation-set-file-id_1>",
         "<your-validation-set-file-id_2>"
    ],
    "training_type": "efficient_sft",
    "hyper_parameters": {
        "n_epochs": 400,
        "batch_size": 2,
        "learning_rate": 2e-5,
        "split": 0.9,
        "max_split_val_dataset_sample": 5,
        "eval_epochs": 50,
        "max_pixels": 36864,
        "save_total_limit": 10,
        "lora_rank": 32,
        "lora_alpha": 32
    }
}'

Image generation

Text-to-image (t2i)

curl --location 'https://dashscope.aliyuncs.com/api/v1/fine-tunes' \
--header "Authorization: Bearer $DASHSCOPE_API_KEY" \
--header 'Content-Type: application/json' \
--data '{
    "model": "wan2.7-image-pro",
    "training_file_ids": ["<your-training-dataset-file-id>"],
    "validation_file_ids": ["<your-validation-dataset-file-id>"],
    "training_type": "efficient_sft",
    "hyper_parameters": {
        "learning_rate": 3e-5,
        "max_steps": 800,
        "eval_steps": 200,
        "max_token_length": "2k",
        "gradient_clip": 0.5,
        "weight_decay": 0.02,
        "max_pixels": "2k",
        "val_img_size": "2k",
        "generation_type": "t2i",
        "lora_rank": 32,
        "lora_alpha": 32,
        "save_total_limit": 10
    }
}'

Image-to-image (i2i)

curl --location 'https://dashscope.aliyuncs.com/api/v1/fine-tunes' \
--header "Authorization: Bearer $DASHSCOPE_API_KEY" \
--header 'Content-Type: application/json' \
--data '{
    "model": "wan2.7-image-pro",
    "training_file_ids": ["<your-training-dataset-file-id>"],
    "validation_file_ids": ["<your-validation-dataset-file-id>"],
    "training_type": "efficient_sft",
    "hyper_parameters": {
        "learning_rate": 3e-5,
        "max_steps": 800,
        "eval_steps": 200,
        "max_token_length": "1k",
        "gradient_clip": 0.5,
        "weight_decay": 0.02,
        "max_pixels": "1k",
        "val_img_size": "1k",
        "generation_type": "i2i",
        "lora_rank": 32,
        "lora_alpha": 32,
        "save_total_limit": 10
    }
}'

Response example

Focus on these two parameters: output.job_id (job ID) and output.finetuned_output (fine-tuned model name).

Video generation model
{
    "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"
    }
}
Image generation model
{
    "request_id": "0eb05b0c-02ba-414a-9d0c-xxxxxxxxx",
    "output": {
        "job_id": "ft-202606030110-xxxx",
        "job_name": "ft-202606030110-xxxx",
        "status": "PENDING",
        "finetuned_output": "wan2.7-image-pro-ft-202606030110-xxxx",
        "model": "wan2.7-image-pro",
        "base_model": "wan2.7-image-pro",
        "training_file_ids": [
            "xxxxxxxxxxxx"
        ],
        "validation_file_ids": [],
        "hyper_parameters": {
            "max_steps": 800,
            "learning_rate": 3.0E-5,
            "eval_steps": 200,
            "max_token_length": "2k",
            "max_pixels": "2k",
            "val_img_size": "2k",
            "generation_type": "t2i",
            "lora_rank": 32,
            "lora_alpha": 32
        },
        "training_type": "efficient_sft",
        "create_time": "2026-06-03 01:10:47"
    }
}

Retrieve a fine-tuning job

API description: Retrieves the status of a fine-tuning job using its job_id. Poll this endpoint to monitor the job's progress. When the job's status becomes SUCCEEDED, the model has successfully completed training.

Note

The fine-tuning job in this example can take several hours to complete. The actual time required depends on the base model.

Request

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

Request parameters

Parameter

Location

Type

Required

Description

Example

job_id

Path parameter

string

Yes

The ID of the fine-tuning job.

ft-202511111122-xxxx

Response parameters

Parameter

Type

Description

Example

request_id

string

The unique ID of the request.

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

output

object

The details of the job.

-

output.job_id

string

The ID of the fine-tuning job. You can use this ID to query the job status.

ft-202511111122-xxxx

output.job_name

string

The name of the fine-tuning job.

ft-202511111122-xxxx

output.status

string

The status of the fine-tuning job. Possible values include:

  • PENDING: The job is waiting to start.

  • QUEUING: The job is in the queue. Only one fine-tuning job can be trained at a time.

  • RUNNING: The job is in progress.

  • CANCELING: The job is being canceled.

  • SUCCEEDED: The job completed successfully.

  • FAILED: The job failed.

  • CANCELED: The job has been canceled.

PENDING

output.finetuned_output

string

The name of the model generated by the fine-tuning job.

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

output.model

string

The model used for fine-tuning. This is the same as base_model.

wan2.5-i2v-preview

output.base_model

string

The base model used for fine-tuning.

wan2.5-i2v-preview

output.training_file_ids

array

A list of file IDs for the training set.

["3bff1ef7-f72d-4285-bb75-xxxxxx"]

output.validation_file_ids

array

A list of file IDs for the validation set. This list is empty if no validation set was provided.

[]

output.hyper_parameters

object

The hyperparameters used for the job.

{...}

output.training_type

string

The training method used for fine-tuning. The recommended method is efficient_sft.

efficient_sft

output.create_time

string

The time when the fine-tuning job was created.

2025-11-11 11:22:22

output.end_time

string

The time when the fine-tuning job completed.

2025-11-11 16:49:01

output.workspace_id

string

The ID of the Alibaba Cloud Model Studio workspace associated with the API key.

See Get a Workspace ID.

llm-xxxxxxxxx

output.user_identity

string

The user's Alibaba Cloud account ID.

12xxxxxxx

output.modifier

string

The Alibaba Cloud account ID of the user who last modified the job.

12xxxxxxx

output.creator

string

The Alibaba Cloud account ID of the user who created the job.

12xxxxxxx

output.group

string

The group associated with the fine-tuning job.

llm

output.max_output_cnt

integer

The maximum number of checkpoints to save.

This value is equivalent to the hyperparameter save_total_limit.

8

output.output_cnt

integer

The actual number of checkpoints saved.

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

8

output.usage

integer

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

432000

Request example

Replace <your-job-id> in the URL with the job_id you received when you created the fine-tuning job.

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

Response example

The key parameters in the response are output.status and output.usage. A status of SUCCEEDED means the training is complete. The usage value indicates the total number of tokens consumed for billing.

Video generation model
{
    "request_id": "9bbb953c-bef2-4b59-9fc5-xxxxxxxxx",
    "output": {
        "job_id": "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,
            "learning_rate": 2.0E-5,
            "split": 0.9,
            "eval_epochs": 50
        },
        "training_type": "efficient_sft",
        "create_time": "2025-11-11 11:22:22",
        "end_time": "2025-11-11 16:49:01",
        "usage": 432000,
        "output_cnt": 8
    }
}
Image generation model
{
    "request_id": "03d738f5-3720-90b0-9c7b-xxxxxxxxx",
    "output": {
        "job_id": "ft-202606030110-xxxx",
        "status": "SUCCEEDED",
        "finetuned_output": "wan2.7-image-pro-ft-202606030110-xxxx",
        "model": "wan2.7-image-pro",
        "base_model": "wan2.7-image-pro",
        "training_file_ids": ["xxxxxxxxxxxx"],
        "validation_file_ids": [],
        "hyper_parameters": {
            "max_steps": 800,
            "learning_rate": 3.0E-5,
            "eval_steps": 200,
            "max_token_length": "2k",
            "max_pixels": "2k",
            "val_img_size": "2k",
            "generation_type": "t2i",
            "lora_rank": 32,
            "lora_alpha": 32
        },
        "training_type": "efficient_sft",
        "create_time": "2026-06-03 01:10:47",
        "end_time": "2026-06-03 01:38:53",
        "usage": 10273216,
        "output_cnt": 1
    }
}

Deploy a model

API description: Deploys a trained model as an API service. Before proceeding, query the fine-tuning job status to ensure the job'sstatus is SUCCEEDED.

Request URL

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

Request parameters

Parameter

Location

Type

Required

Description

Example

model_name

Body

string

Yes

The name of the model to deploy.

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 plan. For LoRA efficient fine-tuning, the recommended value islora.

lora

aigc_config

Body

object

Yes

The prompt configuration.This parameter is not supported for wan2.7-image-pro.

-

aigc_config.use_input_prompt

Body

boolean

Yes

Specifies the prompt generation logic for inference.

  • false (default): Automatic mode. The system ignores the prompt from the API request and generates one using the configured templates.

  • true: Manual mode. The system uses the prompt from the API request and ignores the configured templates.

false

aigc_config.prompt

Body

string

Yes

The preset prompt template.

This parameter applies only whenuse_input_prompt=false.

During inference, the system uses this template to automatically generate a full description from the input image, including special effect instructions.

Note: This parameter automatically overrides the prompt parameter passed in the inference API call.

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

See Request examples.

aigc_config.lora_prompt_default

Body

string

Yes

The fallback prompt template.

This parameter applies only whenuse_input_prompt=false.

If prompt generation usingaigc_config.prompt fails, the system uses this parameter to generate the video.

Then the s86b5p money rain effect begins...

See Request examples.

About the aigc_config.prompt parameter

  • Why set this parameter?

    Without this parameter, you must write a full prompt for each inference call. When this parameter is set, you only need to upload an image when calling the model. The system then uses the template to add special effect instructions, eliminating the need for manual prompt input.

  • How to set it?

    A prompt consists of a task instruction (what the model should do), an output template (to standardize the format), and an example (to guide the model's structure).

    Provide a video description based on the image content. The description must include "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 them. The bills continue to fall, while the camera slowly zooms in, they stretch their arms upward, neck slightly tilted back, expression surprised, completely immersed in this wild money rain".
    Output template:
    The 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 them. The bills continue to fall, while the camera slowly zooms in, they stretch their arms upward, neck slightly tilted back, expression surprised, completely immersed in this wild money rain.
    Example:
    The 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, while the camera slowly zooms in, she stretches her arms upward, neck slightly tilted back, expression surprised, completely immersed in this wild money rain.
    For more information about the output template, see Video Annotation: Write Prompts for Videos.

Response fields

Field

Type

Description

Example

request_id

string

The unique identifier for the request.

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

output

object

Details about the deployment.

-

output.deployed_model

string

The unique ID of the deployed model.

Use this ID to retrieve the deployment status and invoke the model.

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

output.model_name

string

The name of the model.

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

output.status

string

The deployment status:

  • PENDING: The model is being deployed.

  • RUNNING: The model is running.

  • FAILED: The deployment failed.

PENDING

output.base_model

string

The base model used.

wan2.5-i2v-preview

output.gmt_create

string

The creation timestamp of the deployment.

2025-11-11T17:46:53.294

output.gmt_modified

string

The timestamp of the last update.

2025-11-11T17:46:53.294

output.workspace_id

string

The ID of the workspace associated with the Alibaba Cloud Model Studio API key.

See Get a Workspace ID.

llm-xxxxxxxxx

output.charge_type

string

The billing model. post_paid indicates the post-paid model.

post_paid

output.creator

string

The Alibaba Cloud account ID of the user who created the deployment.

12xxxxxxx

output.modifier

string

The Alibaba Cloud account ID of the user who last modified the deployment.

12xxxxxxx

output.plan

string

The deployment plan.

lora

Request examples

Replace <your-model-name> with thefinetuned_output value from the Create a fine-tuning job response.

First frame

curl --location 'https://dashscope.aliyuncs.com/api/v1/deployments' \
--header "Authorization: Bearer $DASHSCOPE_API_KEY" \
--header 'Content-Type: application/json' \
--data '{
    "model_name": "<your-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 them. The bills continue to fall, while the camera slowly zooms in, they stretch their 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 them. The bills continue to fall, while the camera slowly zooms in, they stretch their arms upward, neck slightly tilted back, expression surprised, completely immersed in this wild money rain.\nExample:\nThe video begins with a scene of 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 features crashing waves and distant mountains. 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, while 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.",
        "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 the main character. The bills continue to fall, while the camera slowly zooms in, the main character stretches their arms upward, neck slightly tilted back, with a surprised expression, completely immersed in this wild money rain."
    },
    "capacity": 1,
    "plan": "lora"
}'

First and last frames

curl --location 'https://dashscope.aliyuncs.com/api/v1/deployments' \
--header "Authorization: Bearer $DASHSCOPE_API_KEY" \
--header 'Content-Type: application/json' \
--data '{
    "model_name": "<your-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 they begin the s86b5p transformation.”\nOutput Template:\nThe video begins with a shot of [subject description]. [Environment description]. Then they begin 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 they begin the s86b5p transformation."
    },
    "capacity": 1,
    "plan": "lora"
}'

Image generation

Theaigc_config parameter is not supported when deploying wan2.7-image-pro models.

curl --location 'https://dashscope.aliyuncs.com/api/v1/deployments' \
--header "Authorization: Bearer $DASHSCOPE_API_KEY" \
--header 'Content-Type: application/json' \
--data '{
    "model_name": "<your-model-name>",
    "capacity": 1,
    "plan": "lora"
}'

Response example

Note the following parameters in the response: output.deployed_model (the unique ID for the deployed model) and output.status (which shows PENDING while the deployment is in progress).

{
    "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 model deployment status

API description: Poll this API. When the task status status changes to RUNNING, the model is successfully deployed.

Note

Deploying the fine-tuned model in this example takes approximately 5 to 10 minutes.

Request URL

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

Request parameters

Parameter

Location

Type

Required

Description

Example

deployed_model

Path parameter

string

Yes

The unique ID of the deployed model.

Specify the value for the deployed model output parameter output.deployed_model.

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

Response fields

Field

Type

Description

Example

request_id

string

The unique identifier for the request.

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

output

object

Details about the deployment task.

-

output.deployed_model

string

The unique ID of the deployed model. Use this ID to invoke the model.

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

output.model_name

string

The model name.

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

output.status

string

The deployment status:

  • PENDING: Deploying

  • RUNNING: Ready

  • ARREARS_DOWN: Stopped (overdue payment)

  • ARREARS_RECOVERING: Resuming (overdue payment)

  • FAILED: Deployment failed

  • OFFLINING: Taking offline

  • UPDATING: Updating

  • UPDATING_FAILED: Update failed

RUNNING

output.base_model

string

The base model used for fine-tuning.

wan2.5-i2v-preview

output.gmt_create

string

The creation time of the deployment task.

2025-11-11T17:46:53.294

output.gmt_modified

string

The last update time of the deployment task.

2025-11-11T18:02:2

output.workspace_id

string

The ID of the workspace associated with the Model Studio API key.

See Get Workspace ID.

llm-xxxxxxxxx

output.charge_type

string

The billing model. The value post_paid indicates that the service is post-paid.

post_paid

output.creator

string

The Alibaba Cloud account ID of the user who created the deployment.

12xxxxxxx

output.modifier

string

The Alibaba Cloud account ID of the user who last modified the deployment.

12xxxxxxx

output.plan

string

The deployment plan.

lora

Request example

Replace <replace_with_deployed_model> with the value of the deployed model output parameter output.deployed_model.

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

Response example

Monitor the status field. When the status changes to RUNNING , the model is successfully deployed and you can start calling it.

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

Generate videos and images

To invoke the fine-tuned LoRA model, see Invoke the model to generate videos or Invoke the model to generate images.

Checkpoint

1. List checkpoints

API description: Retrieves a list of checkpoints that successfully generated preview videos or images from the validation set. The list excludes checkpoints that failed validation.

Usage limitations: Call this API after model fine-tuning is complete. Otherwise, the API returns an empty list.

Request URL

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

Request parameters

Parameter

Location

Type

Required

Description

Example

job_id

Path

string

Yes

The fine-tuning job ID.

ft-202511111122-xxxx

Response parameters

Parameter

Type

Description

Example

request_id

string

The request ID.

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

output

array[string]

A list of checkpoints.

-

output[].checkpoint

string

The checkpoint name.

checkpoint-160

Request example

Replace <job_id> in the URL with the value of the Create fine-tuning job output parameter: job_id.

curl --location 'https://dashscope.aliyuncs.com/api/v1/fine-tunes/<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. Retrieve checkpoint validation results

API description: Retrieves the validation results of a specific checkpoint (e.g., "checkpoint-160") to review the generated video or image.

Request URL

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

Request parameters

Parameter

Location

Type

Required

Description

Example

job_id

Path

string

Yes

The fine-tuning job ID.

ft-202511111122-xxxx

checkpoint

Path

string

Yes

The checkpoint name.

checkpoint-160

page_no

Query

integer

No

The page number. Defaults to 1.

1

page_size

Query

integer

No

The page size. Defaults to 10.

10

Response parameters

Video generation model

Parameter

Type

Description

Example

request_id

string

The request ID.

375b3ad0-d3fa-451f-b629-xxxxxxx

output

object

The output object.

-

output.page_no

integer

The page number.

1

output.page_size

integer

The page size.

10

output.total

integer

The total number of entries in the validation set.

1

output.list

array[object]

A list of validation set results.

-

output.list[].video_path

string

The public URL of the preview video generated from the checkpoint. This URL expires in 24 hours. Download the video before it expires.

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

output.list[].prompt

string

The prompt for the validation data, from the data.jsonl annotation file in the dataset.

-

output.list[].first_frame_path

string

The public URL of the first frame image for the validation sample, generated from the source image in the dataset.

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

Image generation model

Parameter

Type

Description

Example

request_id

string

The request ID.

375b3ad0-d3fa-451f-b629-xxxxxxx

output

object

The output object.

-

output.page_no

integer

The page number.

1

output.page_size

integer

The page size.

10

output.total

integer

The total number of entries in the validation set.

1

output.list

array[object]

A list of validation set results.

-

output.list[].img_path

string

The public URL of the preview image generated from the checkpoint. This URL expires in 24 hours. Download the image before it expires.

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

output.list[].prompt

string

The prompt for the validation data, from the data.jsonl annotation file in the dataset.

-

output.list[].input_img

string

Returned only in image-to-image mode. The public URL of the input image for the validation sample, generated from the source image in the dataset.

https://finetune-result.oss-cn-wulanchabu.aliyuncs.com/val_dataset/input_001.png?Expires=xxxx

Request example

  • Replace <YOUR_JOB_ID> with the job_id from the Create a fine-tuning job operation.

  • Replace <YOUR_CHECKPOINT> with the desired checkpoint name, such as "checkpoint-160".

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

Response example

The preview URL expires in 24 hours. Download the file before it expires.
Video generation model
{
    "request_id": "375b3ad0-d3fa-451f-b629-xxxxxxx",
    "output": {
        "page_no": 1,
        "page_size": 10,
        "total": 1,
        "list": [
            {
                "video_path": "https://finetune-result.oss-cn-wulanchabu.aliyuncs.com/xxx.mp4?Expires=xxxx",
                "prompt": "The video begins with a young man sitting in a cafe...",
                "first_frame_path": "https://finetune-result.oss-cn-wulanchabu.aliyuncs.com/xxx.jpeg"
            }
        ]
    }
}
Image generation model
{
    "request_id": "375b3ad0-d3fa-451f-b629-xxxxxxx",
    "output": {
        "page_no": 1,
        "page_size": 10,
        "total": 1,
        "list": [
            {
                "img_path": "https://finetune-result.oss-cn-wulanchabu.aliyuncs.com/xxx.png?Expires=xxxx",
                "prompt": "s86b5p, Change the background to an elevator equipped with a white ceiling lighting...",
                "input_img": "https://finetune-result.oss-cn-wulanchabu.aliyuncs.com/val_dataset/input_001.png?Expires=xxxx"
            }
        ]
    }
}

3. Export a checkpoint

API description: Exports a checkpoint as a deployable model.

Request URL

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

Request parameters

Parameter

Location

Type

Required

Description

Example

job_id

Path

string

Yes

The fine-tuning job ID.

ft-202511111122-xxxx

checkpoint

Path

string

Yes

The checkpoint name.

checkpoint-160

model_name

Query

string

Yes

The display name for the exported model in the console.

This name must be globally unique. We recommend using English letters, digits, underscores (_), and hyphens (-).

Note: This name is for display in the console only. The Get exported model details operation returns the actual model name in the output[].model_name parameter.

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

Response parameters

Parameter

Type

Description

Example

request_id

string

The request ID.

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. Retry the operation.

true

Request example

  • <The ID of the fine-tuning job>: Replace the entire placeholder with the value of the output parameter job_id from Create a fine-tuning job.

  • <checkpoint_to_export>: The value of the checkpoint to export, such as "checkpoint-160".

  • <exported_model_name>: The custom name of the exported model, used only for display in the console.

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

Response example

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

4. Retrieve exported model details

API description: Retrieves the status of all checkpoints for a fine-tuning job. Use this operation to confirm that a checkpoint export is complete and to get the uniquemodel_name required for model deployment and invocation.

Request API

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

Request parameters

Parameter

Location

Type

Required

Description

Example

job_id

Path parameter

string

Yes

The fine-tuning job ID.

ft-202511111122-xxxx

Response fields

Field

Type

Description

Example

request_id

string

The unique request ID.

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

output

array[object]

A list of checkpoint details.

-

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 checkpoint ID.

ft-202511111122-496e-checkpoint-160

output[].model_name

string

The name of the exported model, used for model deployment and invocation.

Returned only 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

The model export status:

  • PENDING: Queued for export.

  • PROCESSING: Export in progress.

  • SUCCEEDED: Export successful.

  • FAILED: Export failed.

  • UNSUPPORTED: Export not supported.

SUCCEEDED

Request example

Replace <your-fine-tuning-job-id> with thejob_id returned from the Create a fine-tuning job operation.

curl --location 'https://dashscope.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 your target checkpoint, such as checkpoint-160. When its status becomes SUCCEEDED, the export is complete. Save the model_name, which is the unique identifier for subsequent model deployment and invocation.

{
    "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" // An unexported checkpoint 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 invocation.
            "model_display_name": "wan2.5-i2v-preview-ft-202511111122-xxxx", 
            "status": "SUCCEEDED" // A successfully exported checkpoint.
        },
        ......
        
    ]
}

5. Deploy and call the model

After you export a checkpoint and retrieve its model_name, follow these steps:

Fine-tuning job management

For input and output parameters, see the model tuning API reference.

Query fine-tuning job logs

Request example

curl --location 'https://dashscope.aliyuncs.com/api/v1/fine-tunes/<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##"
        ]
    }
}

List fine-tuning jobs

Request example

curl --location 'https://dashscope.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": 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 fine-tuning job

Request example

curl --location --request POST 'https://dashscope.aliyuncs.com/api/v1/fine-tunes/<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 fine-tuning job

Request example

curl --location --request DELETE 'https://dashscope.aliyuncs.com/api/v1/fine-tunes/<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"
    }
}

Manage model deployments

Delete a deployment

Important

This operation immediately stops the model deployment service and is irreversible:

  1. The model is no longer available for inference.

  2. Billing for the deployment stops.

Request example

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

Response example

A status of DELETING in the output.status field indicates the deletion is in progress.

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

To verify the deletion, call the Query model deployment status operation. A NotFound error in the response confirms the deployment has been deleted.

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