List fine-tuning jobs

更新时间:
复制 MD 格式

Lists all fine-tuning jobs for the current account.

List fine-tuning jobs

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

Input parameters

Parameter

Type

Position

Required

Description

page_no

Integer

Query

No

Defaults to 1.

page_size

Integer

Query

No

Defaults to 10. The value must be between 1 and 100.

model

String

Query

No

The model ID. If specified, the response includes only fine-tuning jobs based on this model.

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": [
                          "976bd01a-f30b-4414-86fd-50c54486e3ef"
                      ],
                      "validation_file_ids": [
      
                      ],
                      "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": [
                          "86a9fe7f-dd77-43b0-9834-2170e12339ec",
                          "03ead352-6190-4328-8016-61821c23d4fc"
                      ],
                      "validation_file_ids": [
      
                      ],
                      "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

Type

Description

request_id

String

The ID of the request.

output

Object

The object containing the query results.

output.page_no

Integer

The page number.

output.page_size

Integer

The number of items returned per page.

output.total

Integer

The total number of fine-tuning jobs.

output.jobs

Array

An array of fine-tuning job objects. For a description of each object, see response parameters for a fine-tuning job.

Error codes

Returned when a request fails.

Field

Type

Description

Example

code

String

The error code.

NotFound

request_id

String

The unique ID for the request.

6332fb02-3111-43f0-bf79-f9e8c5ffa7f9

message

String

The error message.

Not Found!

Error response example

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

Error code list

HTTP status code

Error code

Error message example

Description

Solution

400

InvalidParameter

Missing training files

A parameter is invalid. This includes missing parameters and format errors.

Check the error message and correct your parameters.

400

UnsupportedOperation

The fine-tuning job cannot be deleted because its status is SUCCEEDED, FAILED, or CANCELED.

The operation is not supported in the resource's current state.

Wait for the resource to enter a supported state before retrying.

404

NotFound

Not found!

The requested resource does not exist.

Verify that the resource ID is correct.

409

Conflict

Model instance xxxxx already exists, please specify a suffix

A model instance with the specified name already exists.

Specify a unique suffix for the model instance.

429

Throttling

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

  • A user can have a maximum of 20 running or succeeded fine-tuning jobs.

The request was rejected because a platform limit was exceeded.

  • Delete unused models.

  • If you need higher fine-tuning job concurrency or to retain more succeeded models, contact your account manager.

500

InternalError

Internal server error!

An internal server error occurred.

Submit a ticket to Alibaba Cloud with the request_id.