Obtaining Supported Service Deployment Specifications

Function

This API is used to obtain supported service deployment specifications.

URI

GET /v1/{project_id}/services/specifications

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

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

Table 2 Query Parameters

Parameter

Mandatory

Type

Description

is_personal_cluster

No

Boolean

Whether to obtain the service deployment flavors supported by dedicated resource pool. The default value is false.

infer_type

No

String

Inference mode. Options:

  • real-time, which is the default value

  • batch

limit

No

String

Maximum number of records returned on each page. The default value is 1000.

offset

No

String

Start offset of the returned data. Default value: 0

Request Parameters

Table 3 Request header parameters

Parameter

Mandatory

Type

Description

X-Auth-Token

Yes

String

User token. It can be obtained by calling the IAM API that is used to obtain a user token. The value of X-Subject-Token in the response header is the user token.

Response Parameters

Status code: 200

Table 4 Response body parameters

Parameter

Type

Description

total_count

Integer

Total number of deployed service specifications.

count

Integer

Number of specifications in the current list.

specifications

Array of Specification objects

Supported service deployment flavors

Table 5 Specification

Parameter

Type

Description

is_open

Boolean

Whether to enable the flavor. The default value is true. If this parameter is set to false, submit a service ticket to apply for the flavor.

spec_status

String

Specification status

specification

String

Unique flavor ID

billing_spec

String

Unique ID of the billing specifications

category

String

The flavor type.

cpu_info

CpuInfo object

Specifies the CPU information of the flavor.

memory_info

MemoryInfo object

Specifies the memory information of the flavor.

gpu_info

GpuInfo object

Specifies the GPU information of the flavor.

npu_info

NpuInfo object

NPU information of the flavor.

source_type

String

Model type, which can be empty or auto. The default value is empty, indicating that the model is generated by the user. If the value is auto, the model is trained using ExeML. The billing mode varies depending on the model type.

is_free

Boolean

Whether the flavor is free of charge. The value true indicates that the flavor is free of charge.

over_quota

Boolean

Whether the quota exceeds the upper limit. The value true indicates that the quota exceeds the upper limit.

extend_params

Integer

Billing item

display_en

String

Specifications description in English

display_cn

String

Specification description

Table 6 CpuInfo

Parameter

Type

Description

arch

String

Architecture type.

cpu

Number

Number of CPUs

Table 7 MemoryInfo

Parameter

Type

Description

unit

String

Unit.

memory

Integer

Memory size.

Table 8 GpuInfo

Parameter

Type

Description

brand

String

Brand.

version

String

Card type.

unit

String

Unit

memory

Integer

Memory size of the card.

gpu

Number

Number of GPUs

Table 9 NpuInfo

Parameter

Type

Description

brand

String

Brand.

version

String

Card type.

unit

String

Unit

memory

Integer

Memory size of the card.

npu

Integer

Number of NPUs.

Example Requests

GET https://{endpoint}/v1/{project_id}/services/specifications

Example Responses

Status code: 200

Service deployment flavors

{
  "total_count" : 3,
  "count" : 3,
  "specifications" : [ {
    "specification" : "modelarts.vm.cpu.2u",
    "billing_spec" : "modelarts.vm.cpu.2u",
    "category" : "CPU",
    "cpu_info" : {
      "arch" : "x86",
      "cpu" : 2.0
    },
    "memory_info" : {
      "unit" : "GB",
      "memory" : 8
    },
    "gpu_info" : {
      "unit" : "MB",
      "gpu" : 0.0,
      "memory" : 0
    },
    "npu_info" : {
      "unit" : "MB",
      "npu" : 0,
      "memory" : 0
    },
    "display_en" : "CPU: 2 vCPUs | 8 GiB",
    "display_cn" : "CPU: 2 Core 8 GiB",
    "is_open" : true,
    "spec_status" : "normal",
    "is_free" : false,
    "over_quota" : false,
    "extend_params" : 1
  }, {
    "specification" : "modelarts.vm.gpu.p4",
    "billing_spec" : "modelarts.vm.gpu.p4",
    "category" : "GPU",
    "cpu_info" : {
      "arch" : "x86",
      "cpu" : 8.0
    },
    "memory_info" : {
      "unit" : "GB",
      "memory" : 32
    },
    "gpu_info" : {
      "unit" : "GB",
      "brand" : "NVIDIA",
      "version" : "P4",
      "gpu" : 1.0,
      "memory" : 16
    },
    "npu_info" : {
      "unit" : "MB",
      "npu" : 0,
      "memory" : 0
    },
    "display_en" : "CPU: 8 vCPUs | 32 GiB GPU: P4",
    "display_cn" : "CPU: 8 Core 32 GiB GPU: 1 * P4",
    "is_open" : true,
    "spec_status" : "normal",
    "is_free" : false,
    "over_quota" : false,
    "extend_params" : 1
  }, {
    "specification" : "modelarts.vm.ai1.a310",
    "billing_spec" : "modelarts.vm.ai1.a310",
    "category" : "NPU",
    "cpu_info" : {
      "arch" : "x86",
      "cpu" : 2.0
    },
    "memory_info" : {
      "unit" : "GB",
      "memory" : 8
    },
    "gpu_info" : {
      "unit" : "MB",
      "gpu" : 0.0,
      "memory" : 0
    },
    "npu_info" : {
      "unit" : "GB",
      "brand" : "Ascend",
      "version" : "Snt3",
      "npu" : 1,
      "memory" : 8
    },
    "display_en" : "CPU: 2 vCPUs | 8 GiB Ascend: 1 x Ascend snt3",
    "display_cn" : "CPU: 2 cores 8 GiB Ascend: 1 x Ascend snt3",
    "is_open" : false,
    "spec_status" : "normal",
    "is_free" : false,
    "over_quota" : false,
    "extend_params" : 1
  } ]
}

Status Codes

Status Code

Description

200

Service deployment flavors

Error Codes

See Error Codes.