All Products
Search
Document Center

Hologres:CreateModelService

Last Updated:May 14, 2026

Creates a model service that allows AI functions to invoke models. You can create a service for two types of models: a model from Alibaba Cloud Model Studio or a model on a Hologres AI node. If you use a Hologres AI node, you must purchase the AI node resources separately.

Operation description

To create a model service, you must specify several parameters. Use the ListModelCatalog operation to find the parameters for a model from Alibaba Cloud Model Studio, and use the GetAvailableModelsResource operation for a model on a Hologres AI node.

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

No authorization for this operation. If you encounter issues with this operation, contact technical support.

Request syntax

POST /api/v1/instances/{instanceId}/createModelService HTTP/1.1

Path Parameters

Parameter

Type

Required

Description

Example

instanceId

string

Yes

The ID of the instance.

hgpostcn-cn-lbj335xxxx

Request parameters

Parameter

Type

Required

Description

Example

body

object

No

The request body.

modelType

string

Yes

The name of the model. To find the name, call ListModelCatalog for a model from Alibaba Cloud Model Studio, or GetAvailableModelsResource for a model on a Hologres AI node.

qwen3.5-plus

cpu

integer

No

The number of vCPUs. This parameter is required only for a Hologres AI node.

16

memory

integer

No

The memory size in GB. This parameter is required only for a Hologres AI node.

64

gpu

integer

No

The number of GPUs. This parameter is required only for a Hologres AI node.

1

serviceCount

integer

No

The number of replicas. This parameter is required only for a Hologres AI node.

2

modelServiceName

string

Yes

A custom name for the model service.

my_model

gpuMemory

integer

No

The GPU memory size in GB. This parameter is required only for a Hologres AI node.

64

taskType

string

No

The type of task the model performs, such as chat/completions or embedding. To find the supported task types, see the output of the ListModelCatalog operation.

embedding

provider

string

No

The provider of the underlying model.

Valid values:

  • hologres :

    Hologres

  • bailian :

    Alibaba Cloud Model Studio

bailian

apiKey

string

No

The API key for Alibaba Cloud Model Studio. This parameter is required only for Model Studio models. You can obtain this key from the Model Studio console or by calling an API.

api-key-xxx

modelParams

string

No

The model parameters, required only for Model Studio models. You can provide the default parameters returned by the ListModelCatalog operation or a modified version of them.

{"timeout":600,"max_retries":10,"max_retry_delay":8,"initial_retry_delay":0.5}

Response elements

Element

Type

Description

Example

object

The response schema.

requestId

string

The ID of the request.

819A7F0F-2951-540F-BD94-6A41ECF0281F

data

boolean

Indicates whether the operation was successful. A value of true indicates success, and false indicates failure.

true

Examples

Success response

JSON format

{
  "requestId": "819A7F0F-2951-540F-BD94-6A41ECF0281F",
  "data": true
}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.