Help Center/ ModelArts/ API Reference/ Training Management/ Creating a Training Experiment
Updated on 2026-07-24 GMT+08:00

Creating a Training Experiment

Function

This API is used to create an experiment category on ModelArts.

This API is used when you need to add the training job to an experiment category for easy management. Use this API when there are multiple task versions. Before using this API, ensure that you have logged in to ModelArts and have the permission to create training experiments. After the creation is complete, the system returns the details of the training experiment, including the experiment ID and the total number of training jobs in the experiment. If you do not have the permission to perform operations, the API will return an error message.

Debugging

You can debug this API through automatic authentication in API Explorer or use the SDK sample code generated by API Explorer.

Authorization Information

Each account has all the permissions required to call all APIs, but IAM users must be assigned the required permissions.

  • If you are using role/policy-based authorization, see Permissions Policies and Supported Actions for details on the required permissions.
  • If you are using identity policy-based authorization, no identity policy-based permission required for calling this API.

URI

POST /v2/{project_id}/training-experiments

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

Definition: Project ID. For details, see Obtaining a Project ID and Name.

Constraints: The value can contain 1 to 64 characters. Letters, digits, and hyphens (-) are allowed.

Range: N/A

Default Value: N/A

Request Parameters

Table 2 Request body parameters

Parameter

Mandatory

Type

Description

metadata

Yes

TrainingExperimentRequestMetadata object

Definition: Parameters for creating a training experiment.

Constraints: N/A

Table 3 TrainingExperimentRequestMetadata

Parameter

Mandatory

Type

Description

name

Yes

String

Definition: Experiment name.

Constraints: The value can contain at most 64 characters. Special characters are not allowed.

Range: N/A

Default Value: N/A

description

No

String

Definition: Description.

Constraints: The value can contain at most 256 characters. Special characters are not allowed.

Range: N/A

Default Value: N/A

workspace_id

No

String

Definition: Workspace ID.

Constraints: N/A

Range: N/A

Default Value: 0

Response Parameters

Status code: 201

Table 4 Response body parameters

Parameter

Type

Description

metadata

TrainingExperimentResponseMetadata object

Definition: Training experiment data.

statistic

TrainingExperimentStatistic object

Definition: Statistics of the training experiment.

Table 5 TrainingExperimentResponseMetadata

Parameter

Type

Description

name

String

Definition: Experiment name.

Range: N/A

description

String

Definition: Description.

Range: N/A

workspace_id

String

Definition: Workspace ID.

Range: N/A

create_time

Long

Definition: Creation time.

Range: N/A

update_time

Long

Definition: Update time.

Range: N/A

id

String

Definition: Experiment ID.

Range: N/A

Table 6 TrainingExperimentStatistic

Parameter

Type

Description

job_count

Integer

Definition: Total number of training jobs in the current experiment.

Range: N/A

Example Requests

The following is an example of creating a training experiment.

POST https://{endpoint}/v2/{project_id}/training-experiments

{
  "metadata" : {
    "name" : "test",
    "description" : "demo",
    "workspace_id" : "0"
  }
}

Example Responses

Status code: 201

OK

{
  "metadata" : {
    "id" : "6ccc15e6-8a81-4d8e-8bee-53401d850639",
    "name" : "test",
    "description" : "demo",
    "create_time" : 1731552542622,
    "workspace_id" : "0",
    "update_time" : 1731552542000
  },
  "statistic" : {
    "job_count" : 0
  }
}

Status Codes

Status Code

Description

201

OK

Error Codes

See Error Codes.