Registers a custom model for an AI cluster.
Try it now
Test
RAM authorization
|
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.