All Products
Search
Document Center

Alibaba Cloud Model Studio:Delete an import job

Last Updated:Jun 06, 2026

Deletes a specified import job.

Delete an import job

This operation deletes a specified import job and its associated model files. You can only delete jobs with a status of SUCCESSED or FAILED. A successful request returns the details of the deleted job.

Endpoint

DELETE https://dashscope-intl.aliyuncs.com/api/v1/custom_models/import/{job_id}

Request example

curl -X DELETE "https://dashscope-intl.aliyuncs.com/api/v1/custom_models/import/937b****-2a4f-****-8abe-c2fa********" \
    --header "Authorization: Bearer $DASHSCOPE_API_KEY" \
    --header "Content-Type: application/json"

Request parameters

Parameter

Type

Location

Required

Description

job_id

String

path

Yes

The ID of the import job. You can get this ID by calling the Create an import job or List import jobs API operations.

Response example

{
    "request_id": "e22b****-b20a-****-bf23-9b53********",
    "output": {
        "job_id": "937b****-2a4f-****-8abe-c2fa********",
        "model_name": "qwen3-32b-offline-20240101-abc1",
        "display_name": "My LoRA fine-tuned model",
        "source": "OSS",
        "storage_info": {
            "bucket_name": "my-model-bucket",
            "object_key": "models/qwen3-32b-lora/"
        },
        "status": "SUCCESSED",
        "gmt_create": "2024-01-01T12:00:00.000+00:00"
    }
}

Response parameters

Parameter

Type

Description

request_id

String

The request ID.

output

Object

Details of the deleted import job. The object structure is identical to the response from the Create an import job operation, but excludes the weight_type field.

Error response

An error response has the following format:

{
    "request_id": "ca21****-b91b-****-bd35-c41c********",
    "code": "OperationDenied",
    "message": "The import job is currently running and cannot be deleted."
}

Error codes

Error code

Description

InvalidParameter

One or more request parameters are invalid. For example, a required parameter is missing, the parameter format is incorrect, or the parameter value is invalid.

NotFound

The specified resource was not found. This error is returned if the specified job_id does not exist, you lack permission to access it, or the associated base model does not support this operation.

OperationDenied

The operation is not permitted. For example, you cannot delete an import job that has a RUNNING status.

InvalidApiKey

The API key is invalid or was not provided.

InternalError

An internal system error occurred. Try again later.