Help Center/ ModelArts/ API Reference/ Model Inference/ Resource Pool Information/ Obtaining Flavors Available for a Notebook Instance
Updated on 2026-07-24 GMT+08:00

Obtaining Flavors Available for a Notebook Instance

Function

This API is used to query the list of switchable specifications supported by the current resource instance. It is applicable to the scenario where the instance resource configuration needs to be adjusted. Before using this API, ensure that you have logged in and have the query permission. After the execution is successful, you will obtain a detailed list of specifications that can be changed, including the specification ID, name, and resource quota. You can use the list to change the instance specifications. If you do not have the query permission or the resource instance ID is invalid, the API returns an error message, for example, "401 Unauthorized" or "404 Not Found".

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, the following identity policy-based permissions are required.

    Action

    Access Level

    Resource Type (*: required)

    Condition Key

    Alias

    Dependencies

    modelarts::listClusterFlavors

    List

    -

    -

    modelarts:clusterFlavor:list

    -

URI

GET /v2/{project_id}/services/flavors

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

Project ID.

Default Value

N/A

Table 2 Query Parameters

Parameter

Mandatory

Type

Description

flavor_type

No

String

Definition

Specifies the flavor type.

Constraints

N/A

Range

  • CPU

  • GPU

  • ASCEND

Default Value

N/A

limit

No

Integer

Definition

Maximum number of records that can be returned.

Constraints

N/A

Range

[1,500]

Default Value

10.

offset

No

Integer

Definition

Offset of the pagination list query.

Constraints

N/A

Range

N/A

Default Value

0.

Request Parameters

Table 3 Request header parameters

Parameter

Mandatory

Type

Description

X-Auth-Token

Yes

String

Definition

User token. It can be obtained by calling the IAM API used to obtain a user token. The value of X-Subject-Token in the response header is the user token. For details about how to obtain the token, see Obtaining a User Token Through Password Authentication.

Constraints

N/A

Range

N/A

Default Value

N/A

Content-Type

No

String

Definition

Message body type or format.

Constraints

N/A

Range

  • application/json: JSON format

  • application/json;charset=utf-8: JSON format and UTF-8 encoding

Default Value

N/A

Response Parameters

Status code: 200

Table 4 Response body parameters

Parameter

Type

Description

current

Integer

Definition

Current page number.

Range

N/A

data

Array of NotebookFlavor objects

Definition

Specification list.

Range

N/A

pages

Integer

Definition

Total number of pages.

Range

N/A

size

Integer

Definition

Number of records per page.

Range

N/A

total

Integer

Definition

The total number of records.

Range

N/A

Table 5 NotebookFlavor

Parameter

Type

Description

arch

String

Definition

Architecture type.

Range

  • x86_64

  • aarch64

ascend

AscendInfo object

Definition

NPU information.

billing

BillingInfo object

Definition

Bill information.

category

String

Definition

Processor type.

Range

  • CPU

  • GPU

  • ASCEND

description

String

Definition

Specification description.

Range

N/A

feature

String

Definition

Flavor type.

Range

  • DEFAULT: CodeLab

  • NOTEBOOK: notebook

free

Boolean

Definition

Specifies whether the flavor is free.

Range

  • true: free flavor.

  • false: paid flavor.

gpu

GPUInfo object

Definition

GPU information.

Range

N/A

id

String

Definition

Specification ID.

Range

N/A

memory

Long

Definition

Memory size.

Range

N/A

name

String

Definition

Flavor name.

Range

N/A

sold_out

Boolean

Definition

Indicates whether resources are sufficient.

Range

  • true: Resources are insufficient.

  • false: Resources are sufficient.

storages

Array of strings

Definition

Storage type.

vcpus

Integer

Definition

CPU cores.

Range

N/A

evs_max_size

String

Definition

Specifies the maximum capacity of an EVS disk.

Range

N/A

Table 6 AscendInfo

Parameter

Type

Description

npu

Integer

Definition

Number of NPUs.

Range

N/A

npu_memory

String

Definition

NPU memory.

Range

N/A

type

String

Definition

NPU type.

Range

N/A

ai_core

String

Definition

Number of AI cores in the allocated specifications.

Range

N/A

ai_cpu

String

Definition

Number of AI CPUs in the allocated specifications.

Range

N/A

Table 7 BillingInfo

Parameter

Type

Description

code

String

Definition

Billing code.

Range

N/A

unit_num

Integer

Definition

Billing unit.

Range

N/A

Table 8 GPUInfo

Parameter

Type

Description

gpu

Integer

Definition

Number of GPUs.

Range

N/A

gpu_memory

String

Definition

GPU memory.

Range

N/A

type

String

Definition

GPU type.

Range

N/A

Status code: 401

Table 9 Response body parameters

Parameter

Type

Description

error_code

String

  • Definition: ModelArts error code.

Range: N/A.

error_msg

String

Definition: Error message.

Range: N/A.

Status code: 403

Table 10 Response body parameters

Parameter

Type

Description

error_code

String

  • Definition: ModelArts error code.

Range: N/A.

error_msg

String

Definition: Error message.

Range: N/A.

Status code: 404

Table 11 Response body parameters

Parameter

Type

Description

error_code

String

  • Definition: ModelArts error code.

Range: N/A.

error_msg

String

Definition: Error message.

Range: N/A.

Example Requests

Obtain flavors available for a notebook instance.

GET https://{endpoint}/v2/04f258c84780d5a52f3bc00dc15aa5e7/services/flavors

Example Responses

Status code: 200

Flavor list.

{
  "current" : 1,
  "data" : [ {
    "arch" : "x86_64",
    "billing" : {
      "unit_num" : 1
    },
    "category" : "CPU",
    "description" : "General computing-plus CPU flavors, ideal for compute-intensive applications.",
    "evs_max_size" : "4096",
    "feature" : "NOTEBOOK",
    "free" : false,
    "id" : "modelarts.vm.cpu.8u.32g",
    "memory" : 33554432,
    "name" : "CPU: 8 vCPUs 32GB",
    "sold_out" : true,
    "storages" : [ "EFS", "OBS", "EVS", "OBSFS" ],
    "vcpus" : 8
  }, {
    "arch" : "x86_64",
    "billing" : {
      "unit_num" : 1
    },
    "category" : "CPU",
    "description" : "General-purpose CPU flavor, ideal for rapid data exploration and experiments.",
    "evs_max_size" : "4096",
    "feature" : "NOTEBOOK",
    "free" : false,
    "id" : "modelarts.vm.cpu.2u.8g",
    "memory" : 8388608,
    "name" : "CPU: 2 vCPUs 8GB",
    "sold_out" : true,
    "storages" : [ "EFS", "OBS", "EVS", "OBSFS" ],
    "vcpus" : 2
  } ],
  "pages" : 1,
  "size" : 8,
  "total" : 8
}

Status Codes

Status Code

Description

200

Flavor list.

401

Authentication failed.

403

Insufficient permissions.

404

Resource not found.

Error Codes

See Error Codes.