Query fine-tuning task details

更新时间:
复制 MD 格式

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

List fine-tuning jobs

For Windows CMD, replace ${DASHSCOPE_API_KEY} with %DASHSCOPE_API_KEY%. For PowerShell, replace it with $env:DASHSCOPE_API_KEY
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: 100. Minimum: 1.

model

String

Query

No

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

Sample response

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

Type

Description

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. 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 job status is SUCCEEDED. 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 SUCCEEDED, FAILED, or CANCELED.

output.group

String

The type of the model fine-tuning job.

output.usage

Integer

The number of tokens consumed by the fine-tuning job. For the billing formula, see Billing items. This parameter appears when the job status is SUCCEEDED 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. To get a detailed list of checkpoints, call 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 task details

For Windows CMD, replace ${DASHSCOPE_API_KEY} with %DASHSCOPE_API_KEY%. For PowerShell, replace it with $env:DASHSCOPE_API_KEY
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.

Sample response

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": 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": [],
        "validation_file_ids": [],
        "training_datasets": [
            {"data_source_type": "file_id", "file_id": "xxxxxxxxxxxx"}
        ],
        "validation_datasets": [],
        "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
        },
        "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 model fine-tuning job.

output.job_id

String

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

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

output.jobs_name

String

Same as output.job_id.

output.status

String

The job status of the model fine-tuning job.

output.finetuned_output

String

This parameter is returned only when the job status is SUCCEEDED. The value is the ID of the fine-tuned model.

output.model

String

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

output.base_model

String

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

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

output.training_file_ids

Array

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

output.validation_file_ids

Array

This field is retained 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

The explicitly declared hyperparameters.

output.training_type

String

The model fine-tuning method.

output.create_time

String

The time when the model fine-tuning job was created.

output.workspace_id

String

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

output.user_identity

String

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

output.modifier

String

The UID of the account that last modified the model fine-tuning job. For example, if a RAM user cancels the job, the UID of the RAM user is returned in this field.

output.creator

String

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

output.end_time

String

The time when the model fine-tuning job ended. This parameter is returned when the job status is SUCCEEDED, FAILED, or CANCELED.

output.group

String

The type of the model fine-tuning job.

output.usage

Integer

The number of tokens consumed by the model fine-tuning job. For the billing formula, see Billing items. This parameter is returned when the job status is SUCCEEDED or CANCELED.

output.output_cnt

Integer

The number of checkpoints that the job has generated. This parameter is returned only for models that support multiple checkpoint outputs, such as cosyvoice-v3-flash. To obtain a detailed list of checkpoints, you can call 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 checkpoints are truncated based on fine-tuning sufficiency. This parameter is returned only for models that support multiple checkpoint outputs.

Get fine-tuning task logs

For Windows CMD, replace ${DASHSCOPE_API_KEY} with %DASHSCOPE_API_KEY%. For PowerShell, replace it with $env:DASHSCOPE_API_KEY
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

Path

Yes

The ID of the fine-tuning job whose logs you want to retrieve. 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 line at offset+1. 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.

Sample response

{
          "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 query results.

output.total

Integer

The total number of log lines.

output.logs

Array

The returned log entries.

Request error codes

The following error codes are returned when a request is abnormal.

Field

Type

Description

Example

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!

Example of an abnormal request

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

Error codes

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-tuning job cannot be deleted because it has succeeded, failed, or been 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 specified resource does not exist.

Verify that the resource ID is correct.

409

Conflict

Model instance 'xxxxx' already exists. Please specify a suffix.

A deployed model instance named xxxxx already exists. Specify a suffix to distinguish it.

Specify a unique suffix for the deployment.

429

Throttling

  • Too many fine-tuning jobs are running. Please try again later.

  • Only 20 running or succeeded fine-tuning jobs are allowed per user.

The resource creation triggered a platform limit.

  • Delete models that are no longer in use.

  • 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 submit a ticket to Alibaba Cloud for troubleshooting.