Skip to main content

Update parameters online

更新时间:2025-07-03 17:32:25
Update base model information and modify auto-scaling settings.
PUT
https://api.alayanew.com/api/serverless-infer/v1/deployment/{serviceId}/scale
Authorizations
AuthorizationsStringHeaderRequired

用户可通过已获取Open API Key做验证,例如:plain Credential=[YOUR_AK],Signature=[YOUR_SK]。

Path Parameters
serviceIdStringRequired

Service ID.

Query Parameters
scaleObjectRequired

Response
状态码:application/json
codeInt

code is a common return value format, representing the execution result of the query operation.

0 is the success indicator, meaning the operation completed successfully.
dataObject

msgString

Returns error information when the code value is -1.

curl --location --request PUT 'https://api.alayanew.com/api/serverless-infer/v1/deployment/38fbfc3d-6a88-4c35-b8b6-9efc83949d47/scale' 
     --header 'Authorization:plain Credential=YOUR_AK,Signature=YOUR_SK' 
     --header 'Content-Type: application/json' 
        --data '{
            "serviceId": "38fbfc3d-6a88-4c35-b8b6-9efc83949d4",
            "scale": {
                "min": 1,
                "max": 4,
                "rpsValue": 60,
                "idleTime": 300
            }
            } ' 
{
  "code": "0",
  "data": {
  },
  "msg": "string, "
}

tip

模型部署过程中,如进行在线更新、扩缩容或参数调整,将通过启动新实例来替换旧配置的实例。