All Products
Search
Document Center

PolarDB:RegisterAIDBClusterCustomModel

Last Updated:Oct 28, 2026

Registers a custom model for an AI cluster.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

Action

Access level

Resource type

Condition key

Dependent action

polardb:RegisterAIDBClusterCustomModel

none

*All Resource

*

None None

Request parameters

Parameter

Type

Required

Description

Example

RegionId

string

Yes

The region ID.

cn-beijing

ModelName

string

Yes

The registration key and directory name of the custom model.

Qwen3-32B

CustomOssBucketName

string

Yes

The name of the OSS bucket.

my-model-bucket

CustomOssBucketPath

string

Yes

The path of the model in the OSS bucket.

models/qwen3

DisplayModelName

string

No

The display name in the candidate list and the initial invocation name for clients.

my-qwen3

InferenceEngine

string

No

The inference engine. This parameter is required when configuring deployment parameters. Valid values: vllm and sglang.

vllm

DBInstanceClass

string

No

The GPU instance type used for model deployment. This parameter is required when configuring deployment parameters.

polardb.gpu.gn8is.4xlarge

ModelParams

object

No

The startup parameters of the model. The parameter key must start with --.

{"--max-model-len":"32768"}

string

No

The value of the model startup parameter.

32768

DirectCommand

string

No

The direct startup command for the model container.

python -m vllm.entrypoints.openai.api_server

ContainerEnv

object

No

The startup environment variables of the container. The variable name cannot be empty or contain whitespace, and the variable value can be an empty string.

{"HF_HOME":"/cache/hf","EMPTY_VALUE":""}

string

No

The value of the container environment variable, which can be an empty string.

/cache/hf

ImageName

string

No

The full reference of the customer-owned inference image, in the format of registry/repository:tag.

registry.example.com/customer/model:v1

RegistryUsername

string

No

The username for the customer's image repository. This parameter is required when ImageName is specified.

temporary-user

RegistryPassword

string

No

The password or temporary token for the customer's image repository. This parameter is required when ImageName is specified.

temporary-token

Response elements

Element

Type

Description

Example

object

Schema of Response

Created

boolean

Indicates whether a new registration is created. A value of false indicates that an existing registration is updated.

true

DisplayModelName

string

The display name and the initial invocation name for clients.

my-qwen3

ImageImportStatus

string

The import status of the image. The initial value is Importing after the image is registered.

Importing

ModelId

integer

The registration ID of the model.

123456

ModelName

string

The registration key of the custom model.

Qwen3-32B

ModelType

string

The type of the model.

custom

OssPath

string

The normalized OSS path.

/my-model-bucket/models/qwen3

RequestId

string

Id of the request

3AA6E0E4-1234-5678-90AB-1234567890AB

Examples

Success response

JSON format

{
  "Created": true,
  "DisplayModelName": "my-qwen3",
  "ImageImportStatus": "Importing",
  "ModelId": 123456,
  "ModelName": "Qwen3-32B",
  "ModelType": "custom",
  "OssPath": "/my-model-bucket/models/qwen3",
  "RequestId": "3AA6E0E4-1234-5678-90AB-1234567890AB"
}

Error codes

HTTP status code

Error code

Error message

Description

400 InvalidParameters RegistryUsername and RegistryPassword are required when ImageName is provided.
400 InvalidParameters.Format The specified parameters are invalid. The specified parameters are invalid.

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.