Help Center/ ModelArts/ API Reference/ Model Training/ Training Job Management (New Version)/ Publishing a Fine-tuning Training Artifact as a Model Asset
Updated on 2026-09-01 GMT+08:00

Publishing a Fine-tuning Training Artifact as a Model Asset

Function

This API is used to publish the generated model information to the asset center when the training task is executed.

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-jobs/{training_job_id}/ft-artifacts/publish

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: N/A

Range: The value can contain 1 to 64 characters. Only letters, digits, and hyphens (-) are allowed.

Default Value: N/A

training_job_id

Yes

String

Definition: Training job ID. For details, see Obtaining Training Jobs.

Constraints: N/A

Range: N/A

Default Value: N/A

Request Parameters

Table 2 Request body parameters

Parameter

Mandatory

Type

Description

workspace_id

No

String

Workspace ID

publish_artifacts

No

Array of ArtifactsPublish objects

Artifact publish request list

Table 3 ArtifactsPublish

Parameter

Mandatory

Type

Description

is_ckpt

No

Boolean

Whether the asset is an intermediate artifact. The value false indicates the model artifact, and the value true indicates the intermediate artifact.

artifact_id

No

String

Breakpoint ID, used during CKPT publish.

asset_name

No

String

Asset name after the model artifact is published. The default value is {source model name}-{training type}-{training duration}.

visibility

No

String

Global visibility, which is used to control whether an asset is visible in the current space or all spaces. The value can be current or all.

description

No

String

Description about the published asset. Final output model of {task name}.

publish_asset_type

No

String

Model publish mode

asset_source_type

No

String

Asset source

asset_code

No

String

Select a model.

asset_version

No

String

Version.

version_description

No

String

Version description.

Response Parameters

Status code: 200

Table 4 Response body parameters

Parameter

Type

Description

model_id

String

Model ID

Status code: 400

Table 5 Response body parameters

Parameter

Type

Description

error_msg

String

Error message

error_code

String

Error code

error_solution

String

Solution

Example Requests

The following shows how to query a training job whose UUID is 3faf5c03-aaa1-4cbe-879d-24b05d997347.

GET https://{endpoint}/v2/{project_id}/training-jobs/3faf5c03-aaa1-4cbe-879d-24b05d997347/ft-artifacts/publish

Example Responses

Status code: 200

Model ID

{
  "model_id" : "28f61af50fc9452aa0ed5ea25c3cc3d3"
}

Status code: 400

Format of the body for a common error response. The following shows the returned information when a training job with ID 3f5d6706-7b67-408d-8ba0-ec08048c45ee is not found.

{
  "error_msg" : "Job not found.",
  "error_code" : "ModelArts.2755",
  "error_solution" : "Check whether the training job in the request is valid."
}

Status Codes

Status Code

Description

200

Model ID

400

Format of the body for a common error response. The following shows the returned information when a training job with ID 3f5d6706-7b67-408d-8ba0-ec08048c45ee is not found.

Error Codes

See Error Codes.