Appearance
How to use the API to fine-tune Wan image-to-video and image generation models by training a LoRA model?
Reference, synced 2026-06-13.
flowchart TD n0["Models"] n1["Overview"] n2["Products"] n3["Solutions"] n4["Pricing"] n5["Resources"] n6["Partners"] n7["Support"] n8["Language"] n0 --> n1 n1 --> n2 n2 --> n3 n3 --> n4 n4 --> n5 n5 --> n6 n6 --> n7 n7 --> n8
Free access Accelerate Delivery with Fixed-Cost Agentic CodingWatch how it works
Models
Empowering AI innovation for both enterprises and developers with Alibaba Cloud’s best-in-class Qwen models, AI-native apps, and AI solutions.
Alibaba Cloud Model Studio \ Enterprise-grade large model service and application development platform.
Try Visual Model \ Supports image understanding, image generation, and video generation.
Models
HappyHorse-1.0-T2V \ Cinematic creative generation, ultimate dynamic details Qwen3-VL-Plus \ Native VL, spatial reasoning, 1M-context video analysis Wan2.7-VideoEdit \ Supports both localized and global editing with prompt
Qwen3.6-Plus \ Native multimodal, 1M context, agentic coding Wan2.7-Image-Pro \ Interactive editing, long-text rendering, precise prompt following Qwen-Plus \ Balanced intelligence, efficient inference, production-ready performance
Qwen-Image-2.0 \ Professional infographics, exquisite photorealism Z-Image-Turbo \ Ultra-fast image generation, high throughput, cost-optimized inference Qwen3-Coder-Next \ Multi-turn tool interactions, future-ready development support
Wan2.7-T2V \ High-fidelity T2V, 15s duration, advanced camera control Wan2.7-I2V \ Cinematic I2V with emotional depth and visceral impact Wan2.7-R2V \ Up to 5 mixed image/video inputs and audio timbre cloning
GenAI Application
Qoder \ Intelligent coding assistant, available for enterprise-dedicated deployment. Qoder CN \ AI-powered coding assistant that boosts developer productivity with intelligent code completion, AI chat, multi-file editing, and task automation.
AI Service
Model Experience \ Experience full-scale, multimodal model capabilities online. Platform for AI \ An AI-native algorithm engineering platform for end-to-end modeling, training, and inference service deployment. Fine-tune Video Generation Model \ Customize Wan’s text-to-video capabilities through model fine-tuning to meet your unique requirements.
AI Use Case
AI Savings Plan Hot \ Save up to 47% on AI costs. Limited-time offer tailored to your usage. AI Video Creation \ Elevate your professional video production with Wan 2.6.
AI Token Plan \ One plan. Multiple models. Big Savings with a Fixed Subscription. AI Image Creation \ All-in-one creative suite for copywriting, image generation, and poster design.
Overview
As a global full-stack AI leader, Alibaba Cloud aims to make computing accessible to everyone and help worldwide customers accelerate innovation.
Why Alibaba Cloud
About Alibaba Cloud \ AI Powered Cloud Technology Our Global Network \ Explore our global presence and deployment regions around the world Our Global Offices \ With offices in 4 continents, we're always close to where it matters.
Asia Accelerator \ Accelerate Success in Asia with Alibaba Cloud Go Global \ Benefits of our Global Alliance Trust Center \ Empowering enterprises with a secure, compliant, and globally trusted cloud infrastructure
Customers and Insights
Olympic Games \ Alibaba Cloud Powers Olympic Games with AI-powered cloud technology Case Studies \ Learn how customers are scaling their businesses on Alibaba Cloud Analyst Reports \ Learn what the top industry analyst firms are saying about Alibaba Cloud
What's New
Events and Webinars \ Quick access to upcoming and on-demand events Product Updates \ Stay informed of the latest innovations Press Room \ Latest news and media releases
Products
Featured ProductsAI & Machine Learning Computing Container Storage Networking & CDN Security Middleware Database Analytics ComputingMedia ServicesEnterprise Services & Cloud CommunicationDomain Names and WebsitesEnd User ComputingServerlessDeveloper ToolsMigration & O&M ManagementApsara Stack
Featured Products
Alibaba Cloud Model Studio \ Supercharge your AI journey effortlessly with industry-leading GenAI models ApsaraDB RDS \ Store and manage your business data, with automated monitoring and backups Certificate Management Service (Original SSL Certificate) \ Create a safe and secure connection between your website and users
Elastic Compute Service (ECS) \ Host websites anywhere and scale enterprise workloads Container Service for Kubernetes (ACK) \ Run and scale containerized applications on managed Kubernetes infrastructure Object Storage Service (OSS) \ Store large amounts of data in the cloud and access it anywhere, anytime
Simple Application Server (SAS) \ All-in-one services for fast deployment Elastic IP Address (EIP) \ Manage your public IPs independently to improve internet network quality Domain Names and Website \ Get the perfect domain name to suit your every need
Related Programs
Solutions
Solutions by Industry Technical Solutions AI WebsitesNetworking Security and ComplianceData and AnalyticsEnterprise Service and ApplicationCloud MigrationCloud NativeHybrid CloudSMB solutions
Financial Services \ Innovate faster with Alibaba Cloud Games \ Grow your game rapidly with high global availability
New Retail \ Alibaba Cloud enables digital retail transformation to fuel growth and realize an omnichannel customer experience throughout the consumer journey. Media and Entertainment \ Ready your content for today's media market with a digitalized media journey
Supply Chain \ Power your supply chain with intelligent, efficient, and reliable solutions Sports \ Digitizing the sports industry with intelligent tech
Sustainability \ Achieve a sustainable future with low-carbon and energy-efficient technologies
Pricing
Flexible options like pay-as-you-go and clear billing rules to meet diverse business needs.
Overview & Tools
Pricing Calculator \ Get an instant pricing estimate based on your usage and needs Free Trial \ Try our 80+ cloud products for free.
Pricing Options \ Get the most out of Alibaba Cloud with flexible pricing
Optimize your cost
Migrate & Save \ Superior Performance At Lower Pricing. Save up to 50%. Promotion Center \ Unlock the latest Alibaba Cloud offers & promos
Resources
Official documentation, extensive tools, training resources, and a community to grow and innovate in the cloud.
Technical Resources
Documentation \ Product guides and FAQs Architecture Center \ Design reliable, secure, and efficient cloud architecture. Intelligent Solution Explorer \ Find the right solution for you, powered by AI
Blog \ Latest cloud insights and developer trends Whitepapers \ Research that explores the how and why behind our technology
Training&Certification
Alibaba Cloud Academy \ Build cloud skills and earn certifications with expert-led training.
Developer Hub
Alibaba Cloud Project Hub \ Explore real-world projects built by developers using our platform. Our Developer MVPs \ Celebrating the developers who lead, build, and inspire our community
Partners
Partner-first strategy offering collaborative product, sales, and service models, plus high-quality partner solutions that complement Alibaba Cloud’s capabilities.
Marketplace
AI Alliance for ISVs \ Partner with us to build and grow AI solutions together ISV Benefits \ Unlock resources, market access, and go-to-market support as an ISV partner
Alibaba Cloud Marketplace \ Explore ready-to-deploy solutions from our partners and ISVs
Find a Partner
Partner Hub \ Find your ideal partner in no time
Become a Partner
Partner Network \ A partner portal for Alibaba Cloud Channel, Technology, MSP partner and other partner programs
Support
Full-lifecycle support and expert services, from cloud advisory and migration to operations.
Support & Professional Services
Professional Services \ Expert-led services to design, migrate, and optimize your cloud journey Support Plans \ Flexible support for every stage — from startup to enterprise
Partner Support Program \ Priority technical support for partners, with dedicated managers and faster issue resolution
Contact us
Connect With Us \
Talk to a sales expert and get a custom quote for your business
Language
- English
- 简体中文
- 繁體中文
- 日本語
- Bahasa Indonesia
Locale
Visit aliyun.com
Documentation
Alibaba Cloud Model Studio
User Guide (Models) User Guide (Application) API Reference (Models) API Reference (Application)
Search for Help Content
Getting Started
The Beginner's Guide
Well-Architected Framework
AI & Machine Learning
Platform For AI
Alibaba Cloud Model Studio
DashVector
Artificial Intelligence Recommendation
OpenSearch
Image Search
Machine Translation
Intelligent Speech Interaction
Optimization Solver
Intelligent Computing LINGJUN
Computing
Elastic Compute Service
Elastic GPU Service
Elastic Container Instance
Dedicated Host
Compute Nest
Simple Application Server
Cloud Box
Auto Scaling
Elastic High Performance Computing
Batch Compute (Deprecated)
Function Compute
Serverless App Engine
ENS
Elastic Desktop Service
App Streaming
WUYING Terminal
Cloud Phone
Edge Network Acceleration
Alibaba Cloud Linux
AgentBay
Container
Container Service for Kubernetes
Container Compute Service
Container Registry
Storage
Object Storage Service
Cloud Parallel File Storage
File Storage NAS
Tablestore
Storage Capacity Unit
Simple Log Service
Cloud Backup
Intelligent Media Management
Drive and Photo Service
Data Transport
Cloud Storage Gateway
Data Online Migration
Hybrid Cloud Storage Array
Storage Services Overview
Backup and Disaster Recovery Center
Networking and CDN
Server Load Balancer
Elastic IP Address
Internet Shared Bandwidth
Data Transfer Plan
Virtual Private Cloud
NAT Gateway
PrivateLink
Alibaba Cloud DNS PrivateZone
Network Intelligence Service
Cloud Data Transfer
IPv6 Gateway
Anycast Elastic IP Address
Cloud Enterprise Network
Global Accelerator
VPN Gateway
Smart Access Gateway
Express Connect
CDN
Edge Security Acceleration
Cloud Network Well-architected Design Guidelines
Security
Anti-DDoS
Web Application Firewall
Cloud Firewall
Security Center
Bastionhost
Secure Access Service Edge
Certificate Management Service
Key Management Service
Data Security Center
Identity as a Service
Fraud Detection
AI Guardrails
Captcha
Blockchain as a Service
ID Verification
Managed Security Service
Middleware
Enterprise Distributed Application Service
Microservices Engine
Alibaba Cloud Service Mesh
SchedulerX
ApsaraMQ for RocketMQ
ApsaraMQ for Kafka
ApsaraMQ for RabbitMQ
ApsaraMQ for MQTT
Simple Message Queue (formerly MNS)
CloudFlow
EventBridge
Application Real-Time Monitoring Service
Managed Service for Prometheus
Managed Service for Grafana
Managed Service for OpenTelemetry
Performance Testing
STAROps
Databases
ApsaraDB Console
PolarDB
ApsaraDB RDS
ApsaraDB for OceanBase (Deprecated)
Tair (Redis® OSS-Compatible)
Lindorm
Time Series Database
ApsaraDB for MongoDB
ApsaraDB for HBase
ApsaraDB for Memcache
ApsaraDB for MyBase
AnalyticDB
ApsaraDB for ClickHouse
ApsaraDB for SelectDB
Data Transmission Service
Database Autonomy Service
Data Management
Database Gateway - Deprecated
ApsaraDB for Cassandra - Deprecated
Analytics Computing
MaxCompute
Hologres
Realtime Compute for Apache Flink
Elasticsearch
Vector Retrieval Service for Milvus
E-MapReduce
Data Lake Formation
DataV
Quick BI
Quick Audience
Quick Tracking
DataWorks
DataHub
Dataphin
Media Services
ApsaraVideo VOD
ApsaraVideo Live
Intelligent Media Services
ApsaraVideo Media Processing
Apsara Video SDK
Enterprise Services & Cloud Communication
Energy Expert
CloudQuotation
Salesforce on Alibaba Cloud
GoChina ICP Filing Assistant
Marketplace
Alibaba Mail
Direct Mail
Short Message Service
Voice Service
Phone Number Verification Service
Cell Phone Number Service
Chat App Message Service
Financial Intelligence Engine
Domain Names and Websites
Domain Names
ICP Filing
Alibaba Cloud DNS
End User Computing
Elastic Desktop Service
App Streaming
WUYING Terminal
Cloud Phone
AgentBay
Internet of Things
IoT Platform
Serverless
Serverless App Engine
CloudFlow
EventBridge
Simple Message Queue (formerly MNS)
Function Compute
Developer Tools
OpenAPI Explorer
Alibaba Cloud SDK
Cloud Shell
Resource Orchestration Service
Alibaba Cloud CLI
BSS OpenAPI
Terraform
Pulumi
Ticket System API
Mobile Platform as a Service
Alibaba Cloud DevOps
API Gateway
Cloud Control API
AI Coding Assistant Lingma
Cloud Skills Portal
Migration & O&M Management
CloudOps Orchestration Service
Cloud Monitor
Intelligent Advisor
Cloud Governance Center
ActionTrail
Cloud Config
Resource Access Management
Resource Management
Cloud Architect Design Tools
Migration Hub
Server Migration Center
Service Catalog
Logic Composer
Quota Center
CloudSSO
HTTPDNS
Solutions
SAP
SuperApp
OpenLake
Membership Service
Expenses and Costs
Account Center
More
Support
Legal
Tech Share Terms and Conditions
After Sales Support
China Gateway Program
Service Level Objectives
Management Console
Security Control
You can fine-tune the Wan image-to-video model using the Model Studio API. This guide details all API operations in the fine-tuning workflow, from dataset upload to model deployment.
Prerequisites
Region: The features described in this document are available only in the Singapore region. You must use an API key created in this region.
Environment variables: You have obtained an API key and configured it as an environment variable.
Preparations:
You have read the Model Fine-tuning Guide for details on supported models, fine-tuning steps, data format, and billing.
Download the sample datasets:
Image-to-video (based on the first frame) : training set, validation set.
Image-to-video (based on the first and last frames): training set, validation set.
Upload a dataset
API description: The operation returns a unique file ID (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.
Request URL
http
POST https://dashscope-intl.aliyuncs.com/compatible-mode/v1/files
Content-type: multipart/form-dataRequest parameters
| Parameter | Parameter location | Type | Required | Description | Example |
|---|
| Parameter | Parameter location | Type | Required | Description | Example |
| file | Body (form-data) | file | Yes | The local dataset file in .zip format. When passing parameters, use the format files=@"<file path>". The path can be a relative path 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 |
Response fields
| Field | Type | Description | Example |
|---|
| Field | Type | Description | Example |
| id | string | The unique file ID, which is used to create a fine-tuning job. | file-ft-b2416bacc4d742xxxx |
| object | string | The object type. The value is always file. | file |
| bytes | integer | The size of the uploaded file in bytes. | 73310369 |
| filename | string | The name of the file. | wan-i2v-training-dataset.zip |
| purpose | string | The purpose of the file. For a fine-tuning task, the value is fine-tune. | fine-tune |
| status | string | The status of the uploaded file. processed indicates that the upload was successful. | processed |
| created_at | integer | The creation time, as a Unix timestamp. | 1766127125 |
Request example
curl
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, which is the unique identifier for your uploaded dataset.
json
{
"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: Starts a model fine-tuning task with a base model and a dataset.
API request
http
POST https://dashscope-intl.aliyuncs.com/api/v1/fine-tunes
Content-type: application/jsonInput parameters
| Parameter | Location | Type | Required | Description | Example value |
|---|
| 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.7-i2v: Recommended for fine-tuning based on the first frame. Not recommended for fine-tuning based on first and last frames or for video continuation scenarios. - wan2.6-i2v - wan2.5-i2v-preview - wan2.2-i2v-flash - Image-to-video (from first and last frames): - wan2.2-kf2v-flash | wan2.7-i2v |
| training_file_ids | Body | array[string] | Yes | An array of file IDs for the training set. | ["file-ft-b2416bacc4d742xxxx"] |
| 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.7-i2v: Recommended value is 1. - wan2.6-i2v: Recommended value is 1. - 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.7-i2v: Recommended 147456. Range: 36864 (192×192) to 147456 (384×384). - wan2.6-i2v: Recommended 36864. Range: 16384 (128×128) to 36864 (192×192). - 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 |
Output parameters
| Parameter | Type | Description | Example value |
|---|
| 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. | ["file-ft-b2416bacc4d742xxxx"] |
| 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
Image-to-video: First and last frames
Multiple training and validation sets
Wan2.7 model
Wan2.6 model
Wan2.5 model
Wan2.2 model
curl
curl --location 'https://dashscope-intl.aliyuncs.com/api/v1/fine-tunes' \
--header "Authorization: Bearer $DASHSCOPE_API_KEY" \
--header 'Content-Type: application/json' \
--data '{
"model": "wan2.7-i2v",
"training_file_ids": [\
"<your-training-dataset-file-id>"\
],
"training_type": "efficient_sft",
"hyper_parameters": {
"n_epochs": 400,
"batch_size": 1,
"learning_rate": 2e-5,
"split": 0.9,
"max_split_val_dataset_sample": 5,
"eval_epochs": 50,
"max_pixels": 147456,
"save_total_limit": 10,
"lora_rank": 32,
"lora_alpha": 32
}
}'curl
curl --location 'https://dashscope-intl.aliyuncs.com/api/v1/fine-tunes' \
--header "Authorization: Bearer $DASHSCOPE_API_KEY" \
--header 'Content-Type: application/json' \
--data '{
"model": "wan2.6-i2v",
"training_file_ids": [\
"<your-training-dataset-file-id>"\
],
"training_type": "efficient_sft",
"hyper_parameters": {
"n_epochs": 400,
"batch_size": 1,
"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
}
}'curl
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": [\
"<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
}
}'curl
curl --location 'https://dashscope-intl.aliyuncs.com/api/v1/fine-tunes' \
--header "Authorization: Bearer $DASHSCOPE_API_KEY" \
--header 'Content-Type: application/json' \
--data '{
"model": "wan2.2-i2v-flash",
"training_file_ids": [\
"<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
}
}'curl
curl --location 'https://dashscope-intl.aliyuncs.com/api/v1/fine-tunes' \
--header "Authorization: Bearer $DASHSCOPE_API_KEY" \
--header 'Content-Type: application/json' \
--data '{
"model": "wan2.2-kf2v-flash",
"training_file_ids": [\
"<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
}
}'curl
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": [\
"<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
}
}'Response example
Focus on these two parameters: output.job_id (job ID) andoutput.finetuned_output (fine-tuned model name).
Video generation model
json
{
"request_id": "0eb05b0c-02ba-414a-9d0c-xxxxxxxxx",
"output": {
"job_id": "ft-202511111122-xxxx",
"job_name": "ft-202511111122-xxxx",
"status": "PENDING",
"finetuned_output": "wan2.5-i2v-preview-ft-202511111122-xxxx",
"model": "wan2.5-i2v-preview",
"base_model": "wan2.5-i2v-preview",
"training_file_ids": [\
"xxxxxxxxxxxx"\
],
"validation_file_ids": [],
"hyper_parameters": {
"n_epochs": 400,
"batch_size": 2,
"learning_rate": 2.0E-5,
"split": 0.9,
"eval_epochs": 50
},
"training_type": "efficient_sft",
"create_time": "2025-11-11 11:22:22"
}
}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
http
GET https://dashscope-intl.aliyuncs.com/api/v1/fine-tunes/{job_id}Request parameters
| Parameter | Location | Type | Required | Description | Example |
|---|
| 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 |
|---|
| 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. | ["file-ft-b2416bacc4d742xxxx"] |
| 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 hyperparametersave_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
curl --location 'https://dashscope-intl.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
json
{
"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
}
}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
http
POST https://dashscope-intl.aliyuncs.com/api/v1/deployments
Content-Type: application/jsonRequest parameters
| Parameter | Location | Type | Required | Description | Example |
|---|
| Parameter | Location | Type | Required | Description | Example |
| model_name | Body | string | Yes | The name of the model to deploy. - To deploy a model from a fine-tuning job, use theoutput.finetuned_output value from the Create a fine-tuning job response. - To deploy an exported model, use theoutput[].model_name value from the Retrieve exported model details response. | 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. | - |
| 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).
plaintext
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 |
|---|
| 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
First and last frames
curl
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": {
"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 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.",
"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"
}'curl
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": {
"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"
}'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).
json
{
"request_id": "96020b2e-9072-4c8a-9981-xxxxxxxxx",
"output": {
"deployed_model": "wan2.5-i2v-preview-ft-202511111122-xxxx",
"gmt_create": "2025-11-11T17:46:53.294",
"gmt_modified": "2025-11-11T17:46:53.294",
"status": "PENDING",
"model_name": "wan2.5-i2v-preview-ft-202511111122-xxxx",
"base_model": "wan2.5-i2v-preview",
"workspace_id": "llm-xxxxxxxxx",
"charge_type": "post_paid",
"creator": "12xxxxxxx",
"modifier": "12xxxxxxx",
"plan": "lora"
}
}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
http
GET https://dashscope-intl.aliyuncs.com/api/v1/deployments/{deployed_model}Request parameters
| Parameter | Location | Type | Required | Description | Example |
|---|
| 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 |
|---|
| 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
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
Monitor the status field. When the status changes to RUNNING , the model is successfully deployed and you can start calling it.
json
{
"request_id": "66d15f35-0772-409f-bc70-xxxxxxxxx",
"output": {
"deployed_model": "wan2.5-i2v-preview-ft-202511111122-xxxx",
"gmt_create": "2025-11-11T17:46:53",
"gmt_modified": "2025-11-11T18:02:24",
"status": "RUNNING",
"model_name": "wan2.5-i2v-preview-ft-202511111122-xxxx",
"base_model": "wan2.5-i2v-preview",
"workspace_id": "llm-xxxxxxxxx",
"charge_type": "post_paid",
"creator": "12xxxxxxx",
"modifier": "12xxxxxxxx",
"plan": "lora"
}
}Generate videos
To invoke the fine-tuned LoRA model, see Invoke the model to generate videos.
Checkpoint
1. List checkpoints
API description: Retrieves a list of checkpoints that successfully generated preview videos 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
http
GET https://dashscope-intl.aliyuncs.com/api/v1/fine-tunes/{job_id}/validation-resultsRequest parameters
| Parameter | Location | Type | Required | Description | Example |
|---|
| 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 |
|---|
| 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
curl --location 'https://dashscope-intl.aliyuncs.com/api/v1/fine-tunes/<job_id>/validation-results' \
--header "Authorization: Bearer $DASHSCOPE_API_KEY" \
--header 'Content-Type: application/json'Response example
json
{
"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.
Request URL
http
GET https://dashscope-intl.aliyuncs.com/api/v1/fine-tunes/{job_id}/validation-details/{checkpoint}?page_no=1&page_size=10Request parameters
| Parameter | Location | Type | Required | Description | Example |
|---|
| 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 |
Request example
Replace
<YOUR_JOB_ID>with thejob_idfrom the Create a fine-tuning job operation.Replace
<YOUR_CHECKPOINT>with the desired checkpoint name, such as "checkpoint-160".
curl
curl --location 'https://dashscope-intl.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
json
{
"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"\
}\
]
}
}3. Export a checkpoint
API description: Exports a checkpoint as a deployable model.
Request URL
http
GET https://dashscope-intl.aliyuncs.com/api/v1/fine-tunes/{job_id}/export/{checkpoint}?model_name={model_name}Request parameters
| Parameter | Location | Type | Required | Description | Example |
|---|
| 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 |
|---|
| 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 parameterjob_idfrom 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
curl --location 'https://dashscope-intl.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
json
{
"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
http
GET https://dashscope-intl.aliyuncs.com/api/v1/fine-tunes/{job_id}/checkpointsRequest parameters
| Parameter | Location | Type | Required | Description | Example |
|---|
| 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 |
|---|
| 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
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 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.
json
{
"request_id": "b0e33c6e-404b-4524-87ac-xxxxxx",
"output": [\
......,\
{\
"create_time": "2025-11-11T13:42:31",\
"full_name": "ft-202511111122-496e-checkpoint-180",\
"job_id": "ft-202511111122-496e",\
"checkpoint": "checkpoint-180",\
"status": "PENDING" // 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:
Deploy the model: For the
model_nameparameter, enter the value from the export.Query deployment status
Call the model to generate videos/images
Fine-tuning job management
Query fine-tuning job logs
Request example
curl
curl --location 'https://dashscope-intl.aliyuncs.com/api/v1/fine-tunes/<fine-tuning-job-id>/logs' \
--header "Authorization: Bearer $DASHSCOPE_API_KEY"Response example
json
{
"request_id": "b7ecb456-6dd1-4f35-a581-xxxxxx",
"output": {
"total": 25,
"logs": [\
"2025-11-11 11:23:37,315 - INFO - data process succeeded, start to fine-tune",\
" Actual number of consumed tokens is 215040 !",\
" Actual number of consumed tokens is 419840 !",\
" Actual number of consumed tokens is 624640 !",\
" 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
curl --location 'https://dashscope-intl.aliyuncs.com/api/v1/fine-tunes' \
--header "Authorization: Bearer $DASHSCOPE_API_KEY"Response example
json
{
"request_id": "bf4d3475-f50c-42e2-a263-xxxxxxxxx",
"output": {
"page_no": 1,
"page_size": 10,
"total": 1,
"jobs": [\
{\
"job_id": "ft-202511111122-xxxx",\
"job_name": "ft-202511111122-xxxx",\
"status": "SUCCEEDED",\
"finetuned_output": "wan2.5-i2v-preview-ft-202511111122-xxxx",\
"model": "wan2.5-i2v-preview",\
"base_model": "wan2.5-i2v-preview",\
"training_file_ids": [\
"xxxxxxxxx"\
],\
"validation_file_ids": [],\
"hyper_parameters": {\
"n_epochs": 400,\
"batch_size": 2,\
"learning_rate": 2.0E-5,\
"split": 0.9,\
"eval_epochs": 50\
},\
"training_type": "efficient_sft",\
"create_time": "2025-11-11 11:22:22",\
"workspace_id": "llm-xxxxxxxxx",\
"user_identity": "xxxxxxxxx",\
"modifier": "xxxxxxxxx",\
"creator": "xxxxxxxxx",\
"end_time": "2025-11-11 16:49:01",\
"group": "llm",\
"usage": 432000,\
"max_output_cnt": 8,\
"output_cnt": 8\
}\
]
}
}Cancel fine-tuning job
Request example
curl
curl --location --request POST 'https://dashscope-intl.aliyuncs.com/api/v1/fine-tunes/<fine-tuning-job-id>/cancel' \
--header "Authorization: Bearer $DASHSCOPE_API_KEY" \
--header 'Content-Type: application/json'Response example
json
{
"request_id": "d8dab938-e32e-40bf-83ab-xxxxxx",
"output": {
"status": "success"
}
}Delete fine-tuning job
Request example
curl
curl --location --request DELETE 'https://dashscope-intl.aliyuncs.com/api/v1/fine-tunes/<fine-tuning-job-id>' \
--header "Authorization: Bearer $DASHSCOPE_API_KEY" \
--header 'Content-Type: application/json'Response example
json
{
"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:
The model is no longer available for inference.
Billing for the deployment stops.
Request example
curl
curl --request DELETE '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
A status of DELETING in the output.status field indicates the deletion is in progress.
json
{
"request_id": "c2ed2aa2-39b8-4a86-b79e-xxxxxx",
"output": {
"deployed_model": "wan2.5-i2v-preview-ft-202511111122-xxxx",
"gmt_create": "2025-11-11T17:46:53",
"gmt_modified": "2025-12-22T11:18:27.532",
"status": "DELETING",
"model_name": "wan2.5-i2v-preview-ft-202511111122-xxxx",
"base_model": "wan2.5-i2v-preview",
"workspace_id": "llm-xxxxxx",
"charge_type": "post_paid",
"creator": "xxxxxx",
"modifier": "xxxxxx",
"plan": "lora"
}
}To verify the deletion, call the Query model deployment status operation. A NotFound error in the response confirms the deployment has been deleted.
json
{
"request_id": "eb619064-0c4£-4d29-aa49-xxxxxx",
"message": "Not found.",
"code": "NotFound"
}Previous: Create a tuning jobNext: Get fine-tuning job details
Is this page helpful?
Prerequisites
Upload a dataset
Request parameters
Response fields
Request example
Response example
Create a fine-tuning job
Input parameters
Output parameters
Request example
Response example
Retrieve a fine-tuning job
Request parameters
Response parameters
Request example
Response example
Deploy a model
Request parameters
Response fields
Request examples
Response example
Query model deployment status
Request parameters
Response fields
Request example
Response example
Generate videos
Checkpoint
1. List checkpoints
2. Retrieve checkpoint validation results
3. Export a checkpoint
4. Retrieve exported model details
5. Deploy and call the model
Fine-tuning job management
Query fine-tuning job logs
List fine-tuning jobs
Cancel fine-tuning job
Delete fine-tuning job
Manage model deployments
Delete a deployment
Contact Us
Sales Support
Live-chat with our sales team or get in touch with a business development professional in your region.
Contact Sales
Technical Support
Open a ticket and get quick help from our technical team.
Open a Ticket >
Connect & Report Abuse
We look forward to your suggestion.
Post a Suggestion > Report Abuse >
\ \ Hi, I'm Alibaba Cloud AI Assistant!\ \ I can help with questions and solutions.
Why Alibaba Cloud
About Alibaba Cloud
Asia Accelerator
Our Global Network
Global Offices
Trust Center
Case Studies
Analyst Reports
Products & Pricings
Pricing Calculator
ECS
SAS
Model Studio
Database
Security
SMS
Solutions
Financial Services
Retail Services
Media Services
Gaming Services
ISV Solutions
Engage
Developer Community
Partner Network
Startups
Marketplace
Join Alibaba Cloud
Resources & Support
Developer Learning Hub
Documentation Center
Training & Certification
Service Notices
Submit a Ticket
Security Report
Qwen Cloud
Careers About Us Privacy Policy Legal Integrity Compliance Reporting Channel Service Notices Links
© 2009-2026 Copyright by Alibaba Cloud All rights reserved
- YouTube
- TikTok
- contact.us@alibabacloud.com
- Call Us Now
- Discord
© 2009-2026 Copyright by Alibaba Cloud All rights reserved
Careers About Us Privacy Policy Legal Integrity Compliance Reporting Channel Service Notices Links