Query fine-tuning task details

Updated at:

Query the details of a specific model fine-tuning task.

Scope

Query fine-tuning job status

Query the detailed information and running status of a specified fine-tuning job.

Endpoint

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

Request example

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

Request parameters

Field

Type

Parameter passing

Required

Description

job_id

String

Url Path

Yes

The ID of the fine-tuning job to query. This is the job_id returned in the response parameters for creating a fine-tuning job.

Response example

Text generation model

{
    "request_id": "c59b2145-a93c-4e00-b610-4d7cc5c521a2",
    "output": {
        "job_id": "ft-202410291653-1c7f",
        "job_name": "ft-202410291653-1c7f",
        "status": "SUCCEEDED",
        "finetuned_output": "qwen3-14b-suffix-ft-202410291653-1c7f",
        "model": "qwen3-14b",
        "base_model": "qwen3-14b",
        "training_file_ids": [],
        "validation_file_ids": [],
        "training_datasets": [
            {
                "data_source_type": "file_id",
                "file_id": "976bd01a-f30b-4414-86fd-50c54486e3ef"
            }
        ],
        "validation_datasets": [],
        "hyper_parameters": {
            "n_epochs": 3,
            "batch_size": 32,
            "max_length": 8192,
            "learning_rate": "1.6e-5",
            "lr_scheduler_type": "linear",
            "split": 0.9
        },
        "training_type": "sft",
        "create_time": "2024-10-29 16:53:53",
        "workspace_id": "llm-v71tlv***",
        "user_identity": "1396993924585947",
        "modifier": "1396993924585947",
        "creator": "1396993924585947",
        "end_time": "2024-10-29 17:11:26",
        "group": "llm",
        "usage": 279808
    }
}

Video generation model

Note output.status (SUCCEEDED indicates that the training is complete) and output.usage (the total number of tokens consumed by the training).

{
    "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": [],
        "validation_file_ids": [],
        "training_datasets": [
            {
                "data_source_type": "file_id",
                "file_id": "xxxxxxxxxxxx"
            }
        ],
        "validation_datasets": [],
        "hyper_parameters": {
            "n_epochs": 400,
            "learning_rate": 2e-05,
            "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": [],
        "validation_file_ids": [],
        "training_datasets": [
            {
                "data_source_type": "file_id",
                "file_id": "xxxxxxxxxxxx"
            }
        ],
        "validation_datasets": [],
        "hyper_parameters": {
            "max_steps": 800,
            "learning_rate": 3e-05,
            "eval_steps": 200,
            "max_token_length": "2k",
            "max_pixels": "2k",
            "val_img_size": "2k",
            "generation_type": "t2i",
            "lora_rank": 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
    }
}

Response parameters

Parameter Name

Type

Description

request_id

String

The ID of the request.

output

Object

The details of the fine-tuning job.

output.job_id

String

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

Generation rule: ft-{yyyyMMddHHmm}-{4-digit-uuid}.

output.jobs_name

String

Same as output.job_id.

output.status

String

The job status of this fine-tuning job.

output.finetuned_output

String

This parameter appears only when the fine-tuning job status is "SUCCEED". It returns the ID of the fine-tuned model.

output.model

String

The ID of the model used for the fine-tuning job.

output.base_model

String

The ID of the foundation model that corresponds to the model used for the fine-tuning job.

For example, the foundation model for the fine-tuning job ft-202410291653-1c7f is qwen3-14b.

output.training_file_ids

Array

A field for compatibility. For new jobs, this parameter always returns an empty array. Use training_datasets instead.

output.validation_file_ids

Array

A field for compatibility. For new jobs, this parameter always returns an empty array. Use validation_datasets instead.

output.training_datasets

Array of Dataset

A list of training datasets.

output.validation_datasets

Array of Dataset

A list of test datasets.

output.hyper_parameters

Object

A table of explicitly declared hyperparameters.

output.training_type

String

The fine-tuning method.

output.create_time

String

The time when the fine-tuning job was created.

output.workspace_id

String

The ID of the workspace to which the fine-tuning job belongs.

output.user_identity

String

The UID of the Alibaba Cloud account to which the fine-tuning job belongs.

output.modifier

String

The UID of the account that last operated on the fine-tuning job. (For example, if a RAM user cancels the job, the UID of the RAM user is displayed here.)

output.creator

String

The UID of the user who created the fine-tuning job.

output.end_time

String

The time when the fine-tuning job ended. This parameter appears when the job status is "SUCCEED", "FAILED", or "CANCELED".

output.group

String

The type of the model fine-tuning job.

output.usage

Integer

The number of tokens (count) consumed by the fine-tuning job. For the billing formula, see Billing instructions. This parameter appears when the job status is "SUCCEED" or "CANCELED".

output.output_cnt

Integer

The number of checkpoints that the current job has generated. This parameter is returned only for models that support multiple checkpoint outputs, such as cosyvoice-v3-flash. You can obtain the detailed list of checkpoints by calling the Query Checkpoint API.

output.max_output_cnt

Integer

The maximum number of checkpoints that a single job can generate. If the value of output_cnt exceeds this limit, the excess part is truncated based on the fine-tuning sufficiency. This parameter is returned only for models that support multiple checkpoint outputs.

Cancel fine-tuning job

Cancel a running fine-tuning job. Only jobs in the running state can be canceled.

Endpoint

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

Request example

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

Request parameters

Field

Type

Parameter passing

Required

Description

job_id

String

Url Path

Yes

The ID of the fine-tuning job to cancel. You can obtain this ID by calling the Create training job or List training jobs operation.

Response example

{
    "request_id": "670fca9d-48dd-4c5a-83e7-33bcc20420f8",
    "output": {
        "status": "success"
    }
}

Response parameters

Parameter Name

Type

Description

request_id

String

The ID of the request.

output

Object

The details returned for the cancel operation.

Delete fine-tuning job

Delete the record of a specified fine-tuning job.

Endpoint

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

Request example

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

Request parameters

Field

Type

Parameter passing

Required

Description

job_id

String

Url Path

Yes

The ID of the fine-tuning job to delete. You can obtain this ID by calling the Create training job or List training jobs operation.

Response example

{
    "request_id": "7d7e1469-df77-4163-83ce-54425df744ed",
    "output": {
        "status": "success"
    }
}

Response parameters

Parameter Name

Type

Description

request_id

String

The ID of the request.

output

Object

The details returned for the delete operation.

List fine-tuning jobs

Query the fine-tuning jobs of the current account by page.

Endpoint

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

Request example

curl --location --request GET "https://dashscope.aliyuncs.com/api/v1/fine-tunes?model=qwen3-14b&page_no=2" \
      --header "Authorization: Bearer $DASHSCOPE_API_KEY" \
      --header 'Content-Type: application/json'

Request parameters

Parameter Name

Type

Parameter passing

Required

Description

page_no

Integer

Query

No

Default value: 1.

page_size

Integer

Query

No

Default value: 10. Maximum: 1000. Minimum: 1.

model

String

Query

No

The model ID. If you specify this parameter, only fine-tuning jobs based on this model are listed.

Response example

{
    "request_id": "2182ef64-6398-457b-b3f6-5fde5fd6b388",
    "output": {
        "page_no": 2,
        "page_size": 10,
        "total": 12,
        "jobs": [
            {
                "job_id": "ft-202410291653-1c7f",
                "job_name": "ft-202410291653-1c7f",
                "status": "SUCCEEDED",
                "finetuned_output": "qwen3-14b-suffix-ft-202410291653-1c7f",
                "model": "qwen3-14b",
                "base_model": "qwen3-14b",
                "training_file_ids": [],
                "validation_file_ids": [],
                "training_datasets": [
                    {
                        "data_source_type": "file_id",
                        "file_id": "976bd01a-f30b-4414-86fd-50c54486e3ef"
                    }
                ],
                "validation_datasets": [],
                "hyper_parameters": {
                    "n_epochs": 3,
                    "batch_size": 32,
                    "max_length": 8192,
                    "learning_rate": "1.6e-5",
                    "lr_scheduler_type": "linear",
                    "split": 0.9
                },
                "training_type": "sft",
                "create_time": "2024-10-29 16:53:53",
                "workspace_id": "llm-v71tlv***",
                "user_identity": "1396993924585947",
                "modifier": "1396993924585947",
                "creator": "1396993924585947",
                "end_time": "2024-10-29 17:11:26",
                "group": "llm",
                "usage": 279808
            },
            {
                "job_id": "ft-202410291512-1851",
                "job_name": "ft-202410291512-1851",
                "status": "CANCELED",
                "model": "qwen3-14b",
                "base_model": "qwen3-14b",
                "training_file_ids": [],
                "validation_file_ids": [],
                "training_datasets": [
                    {
                        "data_source_type": "file_id",
                        "file_id": "86a9fe7f-dd77-43b0-9834-2170e12339ec"
                    },
                    {
                        "data_source_type": "file_id",
                        "file_id": "03ead352-6190-4328-8016-61821c23d4fc"
                    }
                ],
                "validation_datasets": [],
                "hyper_parameters": {
                    "n_epochs": 3,
                    "batch_size": 32,
                    "max_length": 8192,
                    "learning_rate": "1.6e-5",
                    "lr_scheduler_type": "linear",
                    "split": 0.9
                },
                "code": "1",
                "training_type": "sft",
                "create_time": "2024-10-29 15:12:00",
                "workspace_id": "llm-v71tlv***",
                "user_identity": "1396993924585947",
                "modifier": "1396993924585947",
                "creator": "1396993924585947",
                "end_time": "2024-10-29 15:16:00",
                "group": "llm",
                "usage": 0
            }
        ]
    }
}

Response parameters

Parameter NameTypeDescription

request_id

String

The ID of the request.

output

Object

The details returned for the query.

output.page_no

Integer

The page number.

output.page_size

Integer

The number of entries per page.

output.total

Integer

The total number of fine-tuning jobs.

output.jobs

Array

The details of multiple fine-tuning jobs.

Click here to view the fine-tuning job details object

Parameter Name

Type

Description

request_id

String

The ID of the request.

output

Object

The details of the fine-tuning job.

output.job_id

String

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

Generation rule: ft-{yyyyMMddHHmm}-{4-digit-uuid}.

output.jobs_name

String

Same as output.job_id.

output.status

String

The job status of this fine-tuning job.

output.finetuned_output

String

This parameter appears only when the fine-tuning job status is "SUCCEED". It returns the ID of the fine-tuned model.

output.model

String

The ID of the model used for the fine-tuning job.

output.base_model

String

The ID of the foundation model that corresponds to the model used for the fine-tuning job.

For example, the foundation model for the fine-tuning job ft-202410291653-1c7f is qwen3-14b.

output.training_file_ids

Array

A field for compatibility. For new jobs, this parameter always returns an empty array. Use training_datasets instead.

output.validation_file_ids

Array

A field for compatibility. For new jobs, this parameter always returns an empty array. Use validation_datasets instead.

output.training_datasets

Array of Dataset

A list of training datasets.

output.validation_datasets

Array of Dataset

A list of test datasets.

output.hyper_parameters

Object

A table of explicitly declared hyperparameters.

output.training_type

String

The fine-tuning method.

output.create_time

String

The time when the fine-tuning job was created.

output.workspace_id

String

The ID of the workspace to which the fine-tuning job belongs.

output.user_identity

String

The UID of the Alibaba Cloud account to which the fine-tuning job belongs.

output.modifier

String

The UID of the account that last operated on the fine-tuning job. (For example, if a RAM user cancels the job, the UID of the RAM user is displayed here.)

output.creator

String

The UID of the user who created the fine-tuning job.

output.end_time

String

The time when the fine-tuning job ended. This parameter appears when the job status is "SUCCEED", "FAILED", or "CANCELED".

output.group

String

The type of the model fine-tuning job.

output.usage

Integer

The number of tokens (count) consumed by the fine-tuning job. For the billing formula, see Billing instructions. This parameter appears when the job status is "SUCCEED" or "CANCELED".

output.output_cnt

Integer

The number of checkpoints that the current job has generated. This parameter is returned only for models that support multiple checkpoint outputs, such as cosyvoice-v3-flash. You can obtain the detailed list of checkpoints by calling the Query Checkpoint API.

output.max_output_cnt

Integer

The maximum number of checkpoints that a single job can generate. If the value of output_cnt exceeds this limit, the excess part is truncated based on the fine-tuning sufficiency. This parameter is returned only for models that support multiple checkpoint outputs

Query fine-tuning job logs

Query the training logs of a specified fine-tuning job.

Endpoint

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

Request example

curl --location --request GET "https://dashscope.aliyuncs.com/api/v1/fine-tunes/<your-fine-tuning-job-id>/logs?offset=10&line=10" \
      --header "Authorization: Bearer $DASHSCOPE_API_KEY" \
      --header 'Content-Type: application/json'

Request parameters

Field

Type

Parameter passing

Required

Description

job_id

String

Url Path

Yes

The ID of the fine-tuning job whose logs you want to print. You can obtain this ID by calling the Create training job or List training jobs operation.

offset

Number

Query

No

Skips the first offset lines of the output and starts reading from the offset+1 line. This value must not be greater than the total number of output lines. Otherwise, no output is returned. The default value is 0.

line

Number

Query

No

Reads the number of output lines specified by line, starting from the offset+1 line (inclusive). If the number of available lines is less than the value of line, the actual number of available lines is returned. The default value is 100. The maximum is 1000.

Response example

{
    "request_id": "ce49b45d-fe46-474e-9e1b-3e7427ffdf5a",
    "output": {
        "total": 20,
        "logs": [
            "{'train_runtime': 216.3999, 'train_samples_per_second': 2.066, 'train_steps_per_second': 0.014, 'train_loss': 0.9122632344563802, 'epoch': 0.8571428571428571}",
            " Actual number of consumed tokens is 279808!",
            " Uploaded checkpoint!",
            " Fine-tune succeeded!",
            " use checkpoint-3 as final checkpoint",
            "2024-10-29 17:03:47,719 - INFO - transfer for inference succeeded, start to deliver it for inference",
            "2024-10-29 17:09:43,322 - INFO - start to save checkpoint",
            "2024-10-29 17:11:24,689 - INFO - finetune-job succeeded",
            "2024-10-29 17:11:25,130 - INFO - training usage 279808",
            "2024-10-29 17:11:25,175 - INFO - ##FT_COMPLETE##"
        ]
    }
}

Response parameters

Parameter Name

Type

Description

request_id

String

The ID of the request.

output

Object

The details returned for the query.

output.total

Integer

The total number of log lines.

output.logs

Array

The returned logs.

Error responses

Response example

{
    "code": "NotFound",
    "request_id": "BE213CDD-8A5C-59EE-9A67-055EAB0CB59B",
    "message": "Not Found!"
}

Response parameters

Field

Type

Description

Example value

code

String

The error code.

NotFound

request_id

String

The unique system code for the request.

6332fb02-3111-43f0-bf79-f9e8c5ffa7f9

message

String

The error message.

Not Found!

When a request fails, the following errors may be returned:

HTTP status code

Error code

Sample error message

Meaning

Solution

400

InvalidParameter

Missing training files

A parameter is invalid. For example, a parameter is missing or has an incorrect format.

Correct the parameter based on the error message.

400

UnsupportedOperation

The fine-tune job can not be canceled because it is succeeded or failed

The operation cannot be performed on the resource because the resource is in a specific state.

Wait for the resource to enter an operable state before performing the operation.

400

UnsupportedOperation

The fine-tune job can not be deleted because it is succeeded,failed or canceled

The operation cannot be performed on the resource because the resource is in a specific state.

Wait for the resource to enter an operable state before performing the operation.

404

NotFound

Not found!

The resource to query or operate on does not exist.

Check whether the ID of the resource to query or operate on is incorrect.

409

Conflict

Model instance xxxxx already exists, please specify a suffix

A deployment instance with the deployed_model name xxxxx already exists. You must specify a suffix to distinguish it.

Specify a unique suffix for the deployment.

429

Throttling

  • Too many fine-tune job in running, please retry later.

  • Only 20 fine-tune job in running or succeeded allowed per user.

The resource creation triggers a platform limit.

  • Delete models that are no longer used.

  • If you need to increase the concurrency of fine-tuning jobs or retain more successfully fine-tuned models, contact your account manager.

500

InternalError

Internal server error!

An internal error occurred.

Record the request_id and contact Alibaba Cloud engineers by submitting a ticket for troubleshooting.